Want to upload recipe master tcode c201

Hello Friends,
I want to upload recipe master tcode c201, can any one suggest which method will be useful for it ie BAPI or bdc or lsmw.
Pls let me knw is there any bapi available for this purpose
Regards,
Sunny

Hi
we have two BAPI's but i think these are not to upload the data into c201
BAPI_CONTROL_RECIPE_GET_LIST         Read Control Recipe List
BAPI_CONTROL_RECIPE_REQUEST          Request and Transfer Control Recipes
but it is better to go for BDc or LSMW.
Regards
Pavan

Similar Messages

  • I want to upload material master (MM01) using LSMW with BAPI method

    I want to upload material master (MM01) using LSMW with BAPI method and also later on I may need to change the updated data.
    Which business object and Method I should use so that i can do both.
    Thanks
    kumar n

    Hi,
    The business object is BUS1001.
    Thanks,
    Murali

  • Best method to upload Recipe

    Hello Gurus,
    What is the best way to upload recipe for transaction c201.
    Please suggest...
    Thanks & Regards
    Raghuvarun

    If you have a legacy system in place with most of the data - then LSMW is the most preferred route. Check this message -Re: SAP MASTER DATA
    Using BDC will be the recommended approach in other scenarios. Please make sure that you are manually able to create a recipe the way you want in the system and design the BDC accordingly (Rules: At least one operation/phase mandatory; PV is created first, etc).
    Also, you can explore eCATT scripts - could not find a suitable thread with the detailed steps - but that is an option too.

  • Upload Material master with long text using LSMW

    Hello,
    i want ot upload material master data via MM01 using LSMW in following views: basic data 1 ,2,  purchasing, purchase order text, plant data 1,2.
    i have to upload long text in purchase order text with length more then 132 char. (approx 700 char long text). and i have text file in which long text is maintained in a single row. then how can i do it without formating text file or anyother possible solution.
    please help.

    ca u clarify how can i do it.
    suppos i have longtext   "Air cooled type air-conditioning unit complete with following components & distance between indoor & outdoor unit is  10 RMT.  A).Indoor evaporating unit comprising of cooling coils,insulated drain tray,20 micron HDPE washable filters,blower,motor,electical junction box etc. B).Outdoor condensing unit comprising of hermatic/semiharmetic compressor's.condenser coils,propeller/axial fans,motors,pressure switches/cutout etc.C).Charging of refrigerant gas & oil.D).Inter connecting refrigerating piping  of copper duly insulated with EXPANDED POLYETHYLENE tubing.E).Complete electical power wiring of AL.&Control wirng of copper required from indoor & outdoor units.Earthing of the complete system with 8 G G.I.wire.  F).Electrical panel will be completed with necessary starter,fuses,switches,timers,over-load relays,contactors,push button and indicating lamps,single phasing preventer etc..and also with remote control with cording. G).The panel should have 1 no.potential free contactor to connect with central fire detection system.The panel should have voltage scanner to ensure stabilized power input to the machine.H).Outdoor unit shall be mounted on MS angle base frame structure duly black painted with synthetic epoxy paint.I).The frame structure shall be mounted on MS plate & serrated rubber pads."
    then what i have to do changes in lsmw.?

  • How to get legacy customer no. while uploading Customer master and vendor

    Hi All,
    I want to upload Customer master and Vendor master data from legacy using LSMW. I am using SAP standard programs available for the same. I am using internal number assignment in SAP for these masters.
    I case of material master these is a field in MARA named BISMT which is populated with old material no. used in legacy. Is there any corresponding field for customer and vendor master upload?. Moreover is this field automatically populated by SAP report while uploading?.I want to know which old material no. is mapped to which new internally generated number.
    Your feedback is highly appreciated.

    Hi,
    if you are looking for a field in customer and vendor master data that should contain the old (legacy number), take a look at knb1-altkn and in case of a vendor at lfb1-altkn.
    regards
    Siggi

  • Upload vendor master in LSMW

    Hi, all, i want to upload vendor master in mass. And for the upload data, there is same vendoer with different company code or purcharsing organization, how should I complete it?

    Object 0040 Vendor master
    Method 0001 Standard
    Program Name RFBIKR00
    yeah, in fact, I use this method. In the upload file, I create two same records except the company code or purcharsing organization. But it is not OK.
    Is there anything should I take care?

  • Upload HR master data - Infotype 0005 error!

    Hi all,
    I want to upload HR master data with FM HR_MAINTAIN_MASTERDATA. I pass the right values and several infotypes are processed correctly.
    the only infotype which is giving me problems is infotype 0005.
    Every field in this infotype is filled except P0005-UANSP (leave entitlement value).
    I tried passing the fieldname as Q0005-UAN01 with value and also P0005-UAN01 with value, but neither work!
    It is a table type on the screen that's why we have to use 01 at the end of fieldname. the other data on the line of the table is filled correctly.
    Does anyone have any idea on how to solve this?
    Thanks in advance.
    Marcel

    I found during debugging that formroutine CLEAR_P0005 is called in programm MP000500 which clears the fields ending on 01, 02, 03, 04, 05 and 06.
    I don't want this clear to be done, so the only option i have is making a modification i guess to avoid this routine to be called in my specific situation.
    Problem solved.

  • Upload vendor master data from legacy system to internal table tcode xk01

    through batch input program how to upload vendor master data from legacy system to internal table and then to SAP R/3 database(transaction XK01) by using recording method.

    By learning the basics of BDC recording and the use of GUI_UPLOAD

  • Batch Input Tcode C201

    I need upload data for Master Recipe (TCODE C201) using LSMW, how do I it do ?
    what is the another opcion for upload data.
    Thanks for you help.
    Carlos Orden

    Try BDC .
    Hope it helps:
    http://wiki.sdn.sap.com/wiki/display/SAPMDM/RelationofProductionVersionwithRecipeGroupandIts+Creation

  • Steps to upload vendor invoice(tcode fb60) in bdc

    hi, iam srinivas can any one plz send me the steps to upload veneor invoice tcode is (fb60).i dont want the code but i want the steps to create .
    thanks and regards.
    Srinivas.

    refer this site.
    FI_AP_FBR2_Post_With_Reference (FBR2)
    Business Process Description Overview
    Use this procedure to copy a previously posted non-PO invoice document that uses many of the same values.
    This may help reduce data entry time if used correctly.  For example, the library invoice vouchers that have the same vendor but many invoices on them might be a good example of when to use this transaction code.
    Trigger
    Perform this procedure when there is an invoice that needs to have data entered where most of the fields are the same as a prior invoice document already entered in the system.
    Prerequisites
    ·         Security Role:  AP_DIR_INV_ENTRY
    ·         An FB60 invoice has already been data entered.
    Menu Path
    None
    Transaction Code
    FBR2
    Tips and Tricks
    ·         If you would like to save this transaction under your "Favorites" folder, right-click on the "Favorites" folder, select "Insert Transaction" and type in this t-code when the box appears.
    ·         You may use the transaction code:  search_sap_menu to search for a transaction codes menu path.
    Procedure
    Enter Vendor Invoice: Company Code PUR
    Typically the FBR2 - Post With Reference transaction is accessed from the Financial transaction code that you just used.  For Accounts Payable, typically we would use the FB60 transaction code to enter invoices that are not PO-related.  After you have entered an invoice, you can now post a second invoice.  Feel free to post an invoice in DEV to the Vendor ID number:  31.  Choose today's date as the Invoice Date.  Enter a Vendor Invoice in the Reference Field. Enter $1000 as the Amount.  Enter a Text that you want to show on the remittance advice to the vendor.  Choose your own GL Account and Cost Center.  Enter 21010000 as the Fund.  Make sure to also enter $1000 in the Amount in doc. curr. field.
        Please be aware that the FB60 screenshot above is using the ZPurdue Variant so unless you are also using that same variant the order of your columns may differ.
        Refer to FB60 documentation for more information regarding entering a non-PO related invoice.
        After an invoice has been entered, you may proceed to step 1.  If you prefer not to enter an FB60 invoice then after you open FB60, immediately do step 1, but enter "1900001354" in the Document Number field.
    1.       Select Goto Post with reference           Shift+F9 to go to the FBR2 transaction.
    Post Document: Header Data
    The document number you just entered in FB60 should now display.  If you did not first enter your own FB60 invoice, please enter 1900001354 in the Document Number field.  Make sure Company Code is PUR and Fiscal Year is 2007.
        If you did enter your own FB60 invoice to reference to, please be aware that the data entry fields will have different content in the screen shots than what you are seeing on your screen.
    2.       Click  or the "Enter" key to proceed.
    Post Document: Header Data
    Because we want to avoid paying the same invoice twice, we must change the reference field to another Vendor Invoice text.
    3.       As required, complete/review the following fields:
    Field Name
    R/O/C
    Description
    Reference
    R
    Allows for further clarification of an entry by reference to other sources of information, either internal or external to SAP.  Any SAP-posted document number can be used as a "reference" when entering a new document.
    Example:          VENDORINVOICE#2
        Your reference number should be different than the one above.  Otherwise, the system will think you are entering a duplicate invoice.  Please change your text slightly.
    Post Document: Header Data
    4.       Click  or the "Enter" key to proceed.
    Post Document Display Overview
    You are now viewing the document overview screen.
    5.       Double-click  to open that line item.
    Post Document Correct Vendor item
    When you open the Vendor line item, you may change the Text field here to change what appears on the remittance advice.
    6.       As required, complete/review the following fields:
    Field Name
    R/O/C
    Description
    Text
    O
    Description field for an entry.
    Example:          prints on remittance advice - for second invoice
    Post Document Correct Vendor item
    7.       Click  to return to the document overview screen.
    Post Document Display Overview
    The document overview screen.
    8.       Click  to post this second invoice which has the same fields as the original except a different vendor invoice number and a different remittance advice text.
    Information
    Pending upon your user settings, you may not get this pop up box, but just a message in the bottom left hand corner of the screen.
    9.       Click  to close the box.
    Enter Vendor Invoice: Company Code PUR
    Because you used the menu (Goto Post with reference) from FB60 to access the FBR2 transaction code, you are then returned to the FB60 transaction after you have posted the invoice.
    10.     Another way to access FBR2 is to just type the t-code in the field at the top of the screen.  As required, complete/review the following fields:
    Field Name
    R/O/C
    Description
    Transaction Code
    R
    A unique four-character (in most cases) identification assigned to each SAP transaction based on its purpose.
    Example:          /nfbr2
    11.     Click  or the "Enter" key to proceed.
    Post Document: Header Data
    The FBR2 transaction code opens with the last document number entered as the default.
    12.     Click  or the "Enter" key to proceed.
    Post Document: Header Data
    This time we will change the vendor number
    13.     Change the Reference field.  As required, complete/review the following fields:
    Field Name
    R/O/C
    Description
    Reference
    R
    Allows for further clarification of an entry by reference to other sources of information, either internal or external to SAP.  Any SAP-posted document number can be used as a "reference" when entering a new document.
    Example:          VENDORINVOICE
        Your reference number should be different than the one above.  Otherwise, the system will think you are entering a duplicate invoice.  Please change your text slightly.
    Post Document: Header Data
    14.     As required, complete/review the following fields:
    Field Name
    R/O/C
    Description
    Account
    R
    Unique identification number. SAP uses several kinds of accounts. SAP's general ledger accounts are similar to standard in most accounting systems. SAP also uses sub-ledger accounts for customers (accounts receivable), vendors (accounts payable), and assets (asset accounts). These sub-ledger accounts roll-up to a general ledger account.
    Example:          5000129
        Vendor 5000129 in DEV has withholding tax applied to it in the vendor master.
    Post Document: Header Data
    15.     Click  or the "Enter" key to proceed.
    Post Document Add Vendor item
    If the vendor invoice date was a date in the past, the due date for pay immediately will be in the past.  You may get the above informational message to alert you of the date.  If you do, just hit the "Enter" key to acknowledge it.
    Enter Withholding Tax Information
    Because this vendor has withholding tax information in its vendor master, you will receive this popup up box.
    16.     Click  to accept it.
        Refer to the Tax Department for more information regarding withholding tax.
    Post Document Display Overview
    You should now see the document overview screen.  If you do not, then click on .
    17.     Double-click  OR click  to open it.
    Post Document Correct Vendor item
    18.     As required, complete/review the following fields:
    Field Name
    R/O/C
    Description
    Text
    O
    Description field for an entry.
    Example:          change remittance advice text
    Post Document Correct Vendor item
    19.     Click  to view that Vendor's Withholding tax information again.
    Enter Withholding Tax Information
        If for some reason, for this invoice the vendor should not have any withholdings, you would enter a 0.00 in both the W/Tax Base and W/Tax Amt fields.
        When using the FBR2 to change withholding tax amounts, you need to be very careful if using this new invoice as the "reference" invoice for the next one.  For example, if you put 0.00 in both W/Tax Base and W/Tax Amt fields then if this is the reference invoice, those 0.00 amounts will automatically be applied to the next; however, you won't see the 0.00 displayed.  The 0.00 will be assumed.
    20.     Click  to close the box.
    Post Document Correct Vendor item
    21.     Click  to post the invoice.
    Post Document: Header Data
    Your new document number will display in the bottom left hand corner.  Pending upon your user settings, you may also get a pop up box to acknowledge.
    You have posted another invoice, but this time you changed the vendor ID used, the vendor invoice, and the text on the remittance advice.
        Notice that the "Document Number" field now defaults to the newly posted invoice number.
        Because you entered FBR2 in the transaction code field to access this screen, when you post an invoice you are returned to the beginning of the FBR2 screen.  Remember, when you accessed it from the menu line of FB60?  If you access it that way, you are then returned to FB60 after the Post with Reference document is posted.
    22.     Because you are returned to the start of FBR2 again, you may just click  or the "Enter" key to proceed.
    Post Document: Header Data
    Now you are at the start of entering a new invoice again.
    23.     Click  to return to the main menu without finishing the process of entering another invoice.
    24.     You have completed this transaction.
    Result
    You have posted two documents by using a reference document.  This reduced the data entry required since it defaults the fields from the reference document.
    Comments
    Be very careful using this transaction if you change withholding tax amounts.
    To see the results/calculations of discounts and withholdings, you must run F110, the Payment Program.
    http://www.purdue.edu/onepurduehelp/content/fi_ap_fbr2_post_with_reference/wi/html/index.htm
    Message was edited by:
            Karthikeyan Pandurangan
    Message was edited by:
            Karthikeyan Pandurangan

  • Uploading HR Master Data through LSMW or BDC

    I want to upload the HR Master Data to the system through LSMW or BDC, I am aware that for some infotypes like 000,1 &2 BDC is more suited, whereas for other infotypes LSMW is more convenient. I would like to understand how to start the activity. Should I start with infotype 0000 first and then 0001 and so on or can I take any infotype randomly and upload? What I mean is, is there any dependency that an infotype data can be loaded only after certain other related infotype data is loaded first? e.g. can load infotype 0006 first and then infotype 0001?
    Also please guide me on for which infotype LSMW is preferred and for which infotype BDC is preferred? Can BDC be used within LSMW?
    -Shambhvi

    Hi,
    Do it like this way:- come into recording screen and give tcode PA40 now select in PA40 screen hiring action>execute> fill the details>save when 0001 screen wil open click on back button.> now in second step> give any name and discr.>save>back> third step> click on table button and give >
    PERNR     c     8
    EINDA     ddmm     10
    SELEC_01     c     1
    BEGDA     ddmm     10
    ENDDA     ddmm     10
    MASSN     c     2
    MASSG     c     2
    PLANS     c     8
    WERKS     c     4
    PERSG     c     1
    PERSK     c     2
    4) save it
    5) select PA40 click on etras> auto feild mapping press enter when date format will come select 2nd option. save
    7)specify flat file with tabular option
    8) assign it
    9, 10,11,12,13 & 14 just execute
    Thanks and regards,
    ARU

  • Outbond interface programme to upload customer master data.

    Hi experts,
              i need to develop an outbound interface programme to upload customer
    master data,which will be received from sap and posted to web methods using
    standard function mudule.can any one help me?

    Hi,
              Hi,
    Primary you should have Message type, Idoc type and Function module or Report to process Outbound interface.
    If your's is an Customized Process, then follow this.
    1. Create Message type in we81.
    2. Create segments in We31
    3. Create Idoc Type in WE30.
    4. Assign Message type to idoc type in WE82.
    5.Create an Partner profile in WE20.
    6.If you are creating an function Module create it in SE37.
    7. Assign it to process code in WE41.
    8. Charactersitics of FM in BD51.
    9. Assign FM and IDoc And Message type in WE57.
    <b>ALE IDOC</b>
    Sending System(Outbound ALE Process)
    Tcode SALE ? for
    a) Define Logical System
    b) Assign Client to Logical System
    Tcode SM59-RFC Destination
    Tcode BD64 ? Create Model View
    Tcode BD82 ? Generate partner Profiles & Create Ports
    Tcode BD64 ? Distribute the Model view
    Message Type MATMAS
    Tcode BD10 ? Send Material Data
    Tcode WE05 ? Idoc List for watching any Errors
    Receiving System(Inbound ALE )
    Tcode SALE ? for
    a) Define Logical System
    b) Assign Client to Logical System
    Tcode SM59-RFC Destination
    Tcode BD64 ? Check for Model view whether it has distributed or not
    Tcode BD82 -- Generate partner Profiles & Create Ports
    Tcode BD11 Getting Material Data
    Tcode WE05 ? Idoc List for inbound status codes
    ALE IDOC Steps
    Sending System(Outbound ALE Process)
    Tcode SALE ?3 for
    a) Define Logical System
    b) Assign Client to Logical System
    Tcode SM59-RFC Destination
    Tcode BD64 !V Create Model View
    Tcode BD82 !V Generate partner Profiles & Create Ports
    Tcode BD64 !V Distribute the Model view
    This is Receiving system Settings
    Receiving System(Inbound ALE )
    Tcode SALE ?3 for
    a) Define Logical System
    b) Assign Client to Logical System
    Tcode SM59-RFC Destination
    Tcode BD64 !V Check for Model view whether it has distributed or not
    Tcode BD82 -- Generate partner Profiles & Create Ports
    Tcode BD11 Getting Material Data
    Tcode WE05 !V Idoc List for inbound status codes
    Message Type MATMAS
    Tcode BD10 !V Send Material Data
    Tcode WE05 !V Idoc List for watching any Errors
    1)a Goto Tcode SALE
    Click on Sending & Receiving Systems-->Select Logical Systems
    Here Define Logical Systems---> Click on Execute Button
    go for new entries
    1) System Name : ERP000
    Description : Sending System
    2) System Name : ERP800
    Description : Receiving System
    press Enter & Save
    it will ask Request
    if you want new request create new Request orpress continue for transfering the objects
    B) goto Tcode SALE
    Select Assign Client to Logical Systems-->Execute
    000--> Double click on this
    Give the following Information
    Client : ERP 000
    City :
    Logical System
    Currency
    Client role
    Save this Data
    Step 2) For RFC Creation
    Goto Tcode SM59-->Select R/3 Connects
    Click on Create Button
    RFC Destination Name should be same as partner's logical system name and case sensitive to create the ports automatically while generating the partner profiles
    give the information for required fields
    RFC Destination : ERP800
    Connection type: 3
    Description
    Target Host : ERP000
    System No:000
    lan : EN
    Client : 800
    User : Login User Name
    Password:
    save this & Test it & RemortLogin
    3)
    Goto Tcode BD64 -- click on Change mode button
    click on create moduleview
    short text : xxxxxxxxxxxxxx
    Technical Neme : MODEL_ALV
    save this & Press ok
    select your just created modelview Name :'MODEL_ALV'.
    goto add message type
    Model Name : MODEL_ALV
    sender : ERP000
    Receiver : ERP800
    Message type :MATMAS
    save & Press Enter
    4) Goto Tcode BD82
    Give Model View : MODEL_ALV
    Partner system : ERP800
    execute this by press F8 Button
    it will gives you sending system port No :A000000015(Like)
    5) Goto Tcode BD64
    seelct the modelview
    goto >edit>modelview-->distribute
    press ok & Press enter
    6)goto Tcode : BD10 for Material sending
    Material : mat_001
    Message Type : MATMAS
    Logical System : ERP800
    and Execute
    7)goto Tcode : BD11 for Material Receiving
    Material : mat_001
    Message Type : MATMAS
    and Execute --> 1 request idoc created for message type Matmas
    press enter
    Here Master Idoc set for Messge type MATMAS-->press Enter
    1 Communication Idoc generated for Message Type
    this is your IDOC
    Change Pointers
    I know how to change the description of a material using ALE Change Pointers.
    I will give the following few steps
    1) Tcode BD61---> check the change pointers activated check box
    save and goback.
    2) Tcode BD50---> check the MATMAS check box save and comeback.
    3) Tcode BD51---> goto IDOC_INPUT_MATMAS01 select the checkbox save and comeback.
    4) Tcode BD52---> give message type : matmas press ok button.
    select all what ever you want and delete remaining fields.
    save & come back.
    5) 5) go to Tcode MM02 select one material and try to change the description and save it
    it will effects the target systems material desciption will also changes
    6) goto Tcode SE38 give program Name is : RBDMIDOC and Execute
    give Message type : MATMAS and Executte
    ALE/IDOC Status Codes/Messages
    01 Error --> Idoc Added
    30 Error --> Idoc ready for dispatch(ALE Service)
    then goto SE38 --> Execute the Program RBDMIDOC
    29 Error --> ALE Service Layer
    then goto SE38 --> Execute the Program RSEOUT00
    03 Error --> Data Passed to Port ok
    then goto SE38 --> Execute the Program RBDMOIND
    12 Error --> Dispatch ok
    Inbound Status Codes
    50 Error --> It will go for ALE Service Layer
    56 Error --> Idoc with Errors added
    51 Error --> Application Document not posted
    65 Error --> Error in ALE Service Layer
    for 51 or 56 Errors do the following steps
    goto WE19 > give the IDOC Number and Execute>
    Press on Inbound function Module
    for 65 Error --> goto SE38 --> Execute the Program RBDAPP01 then your getting 51 Error
    Regards

  • Upload HR master data Parmanent Address & home address  by a BDC Program.

    Hi exparts,
    I writte a BDC program to upload HR master data for tcode PA30.
    But I can upload parmanet address with this program.
    I want to upload parmanent address then home address .
    Can anybody help , how can I upload  Parmanent Address & home address   by a single BDC program.
    Thanks
    Edited by: Abu Rayhan on Jun 2, 2011 1:01 PM

    report ZHR_SMP
           no standard page heading line-size 255.
    Internal Table TYPE Declaration for keeping Legacy Data
    TYPES: BEGIN OF TW_MAIN,
            PERNR LIKE RP50G-PERNR,
            BEGDA LIKE P0006-BEGDA,
            ANSSA LIKE P0006-ANSSA,
            STRAS LIKE P0006-STRAS,
            ORT01 LIKE P0006-ORT01,
            STATE LIKE P0006-STATE,
            PSTLZ LIKE P0006-PSTLZ,
            LAND1 LIKE P0006-LAND1,
            END OF TW_MAIN,
           TT_MAIN TYPE STANDARD TABLE OF TW_MAIN.
    DATA : WA_MAIN TYPE TW_MAIN,
           IT_MAIN TYPE TT_MAIN,
           WA_ITEM TYPE TW_MAIN,
           IT_ITEM TYPE TT_MAIN,
           WA_BDCDATA TYPE BDCDATA,
           IT_BDCDATA TYPE STANDARD TABLE OF BDCDATA,
           WA_BDCMSGCOLL TYPE BDCMSGCOLL,
           IT_BDCMSGCOLL TYPE STANDARD TABLE OF BDCMSGCOLL.
    Internal table for enable Required options using Call transaction & Session Method.
    DATA: it_intern TYPE alsmex_tabline OCCURS 0 WITH HEADER LINE.
    DATA ls_ctu_params TYPE ctu_params.
    DATA : U_MODE(1),
           U_UPDT(1),
           FNAM(30),
           STR TYPE STRING.
    SELECTION-SCREEN BEGIN OF BLOCK bk1 WITH FRAME TITLE text-001.
    PARAMETERS p_fname TYPE localfile OBLIGATORY.
    PARAMETERS: p_begcol TYPE i DEFAULT 1,
                p_begrow TYPE i DEFAULT 2,
                p_endcol TYPE i DEFAULT 20,
                p_endrow TYPE i DEFAULT 1600.
    SELECTION-SCREEN END OF BLOCK bk1.
    SELECTION-SCREEN : BEGIN OF BLOCK B4 WITH FRAME TITLE TEXT-004.
    SELECTION-SCREEN : BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-002.
    PARAMETERS : P_FIRST RADIOBUTTON GROUP RB  DEFAULT 'X',
                 P_SECOND RADIOBUTTON GROUP RB,
                 P_THIRD RADIOBUTTON GROUP RB.
    SELECTION-SCREEN : END OF BLOCK B2.
    SELECTION-SCREEN : BEGIN OF BLOCK B3 WITH FRAME TITLE TEXT-003.
    PARAMETERS : P_SYN RADIOBUTTON GROUP RB1,
                 P_ASYN RADIOBUTTON GROUP RB1   DEFAULT 'X'.
    SELECTION-SCREEN : END OF BLOCK B3.
    SELECTION-SCREEN : END OF BLOCK B4.
    Initialize the work are and internal table body
    INITIALIZATION.
      PERFORM INTIALIZE_ITAB.
    *Get F4 help based on which file need to selected
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fname.
      PERFORM GETFILENAME.
    START-OF-SELECTION.
    Upload the file from Excel to Internal Table
      PERFORM FILE_UPLOAD.
    Selection Method for Foreground or background or call transactio or session method.
      PERFORM SCREEN_FLAG.
    Uploading the data from Legacy Sytem to SAP.
      PERFORM BDC_TRANSACTION.
    END-OF-SELECTION.
    *&      Form  BDC_TRANSACTION
          text
    -->  p1        text
    <--  p2        text
    FORM BDC_TRANSACTION.
      IT_ITEM = IT_MAIN.
      PERFORM CALL_TRANSACTION.
    ENDFORM.                    " BDC_TRANSACTION
    *&      Form  CALL_TRANSACTION
          text
    -->  p1        text
    <--  p2        text
    FORM CALL_TRANSACTION .
      LOOP AT IT_MAIN INTO WA_MAIN.
        CLEAR WA_BDCDATA.
        REFRESH IT_BDCDATA.
        perform bdc_dynpro      using 'SAPMP50A' '1300'.
        perform bdc_field       using 'BDC_OKCODE' '/00'.
        perform bdc_field       using 'RP50G-PERNR' WA_MAIN-PERNR.
        perform bdc_field       using 'RP50G-TIMR6' 'X'.
        perform bdc_field       using 'BDC_CURSOR' 'RP50G-CHOIC'.
        perform bdc_field       using 'RP50G-CHOIC' '0006'.
        perform bdc_dynpro      using 'SAPMP50A' '1300'.
        perform bdc_field       using 'BDC_OKCODE' '=INS'.
        perform bdc_field       using 'BDC_CURSOR' 'RP50G-PERNR'.
        perform bdc_field       using 'RP50G-PERNR' WA_MAIN-PERNR.
        perform bdc_field       using 'RP50G-TIMR6' 'X'.
        perform bdc_field       using 'RP50G-CHOIC' 'Addresses'.
        perform bdc_dynpro      using 'SAPMSSY0' '0120'.
        perform bdc_field       using 'BDC_CURSOR' '04/03'.
        perform bdc_field       using 'BDC_OKCODE' '=ENTR'.
        perform bdc_dynpro      using 'MP000600_CE' '2010'.
        perform bdc_field       using 'BDC_CURSOR' 'P0006-PSTLZ'.
        perform bdc_field       using 'BDC_OKCODE' '/00'.
        perform bdc_field       using 'P0006-BEGDA' WA_MAIN-BEGDA.
        perform bdc_field       using 'P0006-ENDDA' '12-31-9999'.
        perform bdc_field       using 'P0006-ANSSA' WA_MAIN-ANSSA.
        perform bdc_field       using 'P0006-STRAS' WA_MAIN-STRAS.
        perform bdc_field       using 'P0006-ORT01' WA_MAIN-ORT01.
        perform bdc_field       using 'P0006-STATE' WA_MAIN-STATE.
        perform bdc_field       using 'P0006-PSTLZ' WA_MAIN-PSTLZ.
        perform bdc_field       using 'P0006-LAND1' WA_MAIN-LAND1.
        perform bdc_dynpro      using 'SAPLSBAL_DISPLAY' '0200'.
        perform bdc_field       using 'BDC_OKCODE' '=&ONT'.
        perform bdc_dynpro      using 'MP000600_CE' '2010'.
        perform bdc_field       using 'BDC_CURSOR' 'P0006-STATE'.
        perform bdc_field       using 'BDC_OKCODE'  '/00'.
        perform bdc_field       using 'P0006-BEGDA' WA_MAIN-BEGDA.
        perform bdc_field       using 'P0006-ENDDA' '12-31-9999'.
        perform bdc_field       using 'P0006-ANSSA' WA_MAIN-ANSSA.
        perform bdc_field       using 'P0006-STRAS' WA_MAIN-STRAS.
        perform bdc_field       using 'P0006-ORT01' WA_MAIN-ORT01.
        perform bdc_field       using 'P0006-STATE' WA_MAIN-STATE.
        perform bdc_field       using 'P0006-PSTLZ' WA_MAIN-PSTLZ.
        perform bdc_field       using 'P0006-LAND1' WA_MAIN-LAND1.
        perform bdc_dynpro      using 'MP000600_CE' '2010'.
        perform bdc_field       using 'BDC_OKCODE' '/EBCK'.
        perform bdc_field       using 'BDC_CURSOR' 'P0006-BEGDA'.
        perform bdc_dynpro      using 'SAPLSPO1' '0200'.
        perform bdc_field       using 'BDC_OKCODE' '=YES'.
        perform bdc_dynpro      using 'MP000600_CE' '2010'.
        perform bdc_field       using 'BDC_CURSOR' 'P0006-PSTLZ'.
        perform bdc_field       using 'BDC_OKCODE'  '/00'.
        perform bdc_field       using 'P0006-BEGDA' WA_MAIN-BEGDA.
        perform bdc_field       using 'P0006-ENDDA' '12-31-9999'.
        perform bdc_field       using 'P0006-ANSSA' WA_MAIN-ANSSA.
        perform bdc_field       using 'P0006-STRAS' WA_MAIN-STRAS.
        perform bdc_field       using 'P0006-ORT01' WA_MAIN-ORT01.
        perform bdc_field       using 'P0006-STATE' WA_MAIN-STATE.
        perform bdc_field       using 'P0006-PSTLZ' WA_MAIN-PSTLZ.
        perform bdc_field       using 'P0006-LAND1' WA_MAIN-LAND1.
        perform bdc_dynpro      using 'SAPLSBAL_DISPLAY' '0200'.
        perform bdc_field       using 'BDC_OKCODE' '=&ONT'.
        perform bdc_dynpro      using 'MP000600_CE' '2010'.
        perform bdc_field       using 'BDC_CURSOR' 'P0006-PSTLZ'.
        perform bdc_field       using 'BDC_OKCODE'  '/00'.
        perform bdc_field       using 'P0006-BEGDA' WA_MAIN-BEGDA.
        perform bdc_field       using 'P0006-ENDDA' '12-31-9999'.
        perform bdc_field       using 'P0006-ANSSA' WA_MAIN-ANSSA.
        perform bdc_field       using 'P0006-STRAS' WA_MAIN-STRAS.
        perform bdc_field       using 'P0006-ORT01' WA_MAIN-ORT01.
        perform bdc_field       using 'P0006-STATE' WA_MAIN-STATE.
        perform bdc_field       using 'P0006-PSTLZ' WA_MAIN-PSTLZ.
        perform bdc_field       using 'P0006-LAND1' WA_MAIN-LAND1.
        perform bdc_dynpro      using 'MP000600_CE' '2010'.
        perform bdc_field       using 'BDC_CURSOR' 'P0006-BEGDA'.
        perform bdc_field       using 'BDC_OKCODE' '=UPD'.
        perform bdc_field       using 'P0006-BEGDA' WA_MAIN-BEGDA.
        perform bdc_field       using 'P0006-ENDDA' '12-31-9999'.
        perform bdc_field       using 'P0006-ANSSA' WA_MAIN-ANSSA.
        perform bdc_field       using 'P0006-STRAS' WA_MAIN-STRAS.
        perform bdc_field       using 'P0006-ORT01' WA_MAIN-ORT01.
        perform bdc_field       using 'P0006-STATE' WA_MAIN-STATE.
        perform bdc_field       using 'P0006-PSTLZ' WA_MAIN-PSTLZ.
        perform bdc_field       using 'P0006-LAND1' WA_MAIN-LAND1.
        ls_ctu_params-dismode = U_MODE.
        ls_ctu_params-updmode = U_UPDT.
        ls_ctu_params-NOBINPT = 'X'.
        CALL TRANSACTION 'PA30' USING it_bdcdata
               OPTIONS FROM ls_ctu_params MESSAGES INTO IT_BDCMSGCOLL.
        PERFORM message.
        CLEAR: WA_MAIN, WA_ITEM.
      ENDLOOP.
    ENDFORM.                    " CALL_TRANSACTION
    *&      Form  INTIALIZE_ITAB
          text
    -->  p1        text
    <--  p2        text
    FORM INTIALIZE_ITAB .
      CLEAR: WA_MAIN,
             WA_ITEM,
             WA_BDCDATA,
             WA_BDCMSGCOLL,
             LS_CTU_PARAMS.
      REFRESH: IT_MAIN,
               IT_ITEM,
               IT_INTERN,
               IT_BDCDATA,
               IT_BDCMSGCOLL.
    ENDFORM.                    " INTIALIZE_ITAB
    *&      Form  GETFILENAME
          text
    -->  p1        text
    <--  p2        text
    FORM GETFILENAME .
      CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          PROGRAM_NAME  = SYST-CPROG
          DYNPRO_NUMBER = SYST-DYNNR
          FIELD_NAME    = ' '
        IMPORTING
          FILE_NAME     = p_fname.
    ENDFORM.                    " GETFILENAME
    *&      Form  FILE_UPLOAD
          text
    -->  p1        text
    <--  p2        text
    FORM FILE_UPLOAD .
      CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
        EXPORTING
          filename    = p_fname
          i_begin_col = p_begcol
          i_begin_row = p_begrow
          i_end_col   = p_endcol
          i_end_row   = p_endrow
        TABLES
          intern      = it_intern.
    Moving the data to internal table.
      PERFORM MOVE_DATA.
    ENDFORM.                    " FILE_UPLOAD
    *&      Form  MOVE_DATA
          text
    -->  p1        text
    <--  p2        text
    FORM MOVE_DATA .
      DATA : lv_index TYPE i.
      FIELD-SYMBOLS <fs>.
    *--- Sorting the internal table
      SORT it_intern BY row col.
      CLEAR it_intern.
      LOOP AT it_intern.
        MOVE it_intern-col TO lv_index.
    *--- Assigning the each WA_DATA to an internal table row
        ASSIGN COMPONENT lv_index OF STRUCTURE wa_main TO <fs>.
    *--- Asigning the field value to a field symbol
        MOVE it_intern-value TO <fs>.
        AT END OF row.
          APPEND wa_main to it_main.
          CLEAR wa_main.
        ENDAT.
      ENDLOOP.
    ENDFORM.                    " MOVE_DATA
    *&      Form  SCREEN_FLAG
          text
    -->  p1        text
    <--  p2        text
    FORM SCREEN_FLAG .
      IF P_FIRST = 'X'.
        U_MODE = 'A'.
      ENDIF.
      IF P_SECOND = 'X'.
        U_MODE = 'N'.
      ENDIF.
      IF P_THIRD = 'X'.
        U_MODE = 'E'.
      ENDIF.
      IF P_SYN = 'X'.
        U_UPDT = 'S'.
      ENDIF.
      IF P_ASYN = 'X'.
        U_UPDT = 'A'.
      ENDIF.
    ENDFORM.                    " SCREEN_FLAG
    *&      Form  BDC_DYNPRO
          text
         -->P_0161   text
         -->P_0162   text
    FORM BDC_DYNPRO  USING   program dynpro.
      CLEAR WA_BDCDATA.
      wa_bdcdata-program = program.
      wa_bdcdata-dynpro = dynpro.
      wa_bdcdata-dynbegin = 'X'.
      APPEND WA_BDCDATA TO IT_BDCDATA.
    ENDFORM.                    " BDC_DYNPRO
    *&      Form  BDC_FIELD
          text
         -->P_0211   text
         -->P_LW_MAIN_TEXT1  text
    FORM BDC_FIELD  USING   FNAM FVAL.
      CLEAR WA_BDCDATA.
      WA_BDCDATA-FNAM = FNAM.
      WA_BDCDATA-FVAL = FVAL.
      APPEND WA_BDCDATA TO IT_BDCDATA.
    ENDFORM.                    " BDC_FIELD
    *&      Form  MESSAGE
          text
    -->  p1        text
    <--  p2        text
    FORM MESSAGE .
      DATA: MSG TYPE STRING.
      LOOP AT IT_BDCMSGCOLL INTO WA_BDCMSGCOLL.
        CALL FUNCTION 'FORMAT_MESSAGE'
          EXPORTING
            ID   = SY-MSGID
            LANG = SY-LANGU
          IMPORTING
            MSG  = MSG.
        IF WA_BDCMSGCOLL-MSGTYP = 'S'.
          WRITE:/ MSG,'For',WA_MAIN-PERNR.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    " MESSAGE
    FILE FORMAT:
    PERNR     BEGDA     ANSSA     STRAS     ORT01     STATE     PSTLZ     LAND1
    10270     8/2/2011     1(Permanent)     SSS     ban     01     578987     IN
    10270     8/2/2011     3(Home)     SSS     ban     01     578987     IN

  • Error while uploading HR master data from inQuality server

    Hi, Expert. While uploading of MAster data from Developement to Quality by BDC. When program starts for Tcode PA40, selecting Hiring Action, it is goining to the Action Screen. Here while taking the position from HR template, it gives error as Position is not in Table T428B. Payroll area on the date (Date of original hiring, of the person) it is taking DM as defalt in place of our created Area and terminating. When i am trying entering the data manually, it is giving same error for Position. I am not able to upload the data. Kindly help me by suggesting me the correct sequence and steps for uploading the data. Correct answer will be provided with STARSSSSSS **. Regds Punit.

    Have all your configurations been transported to Quality?
    Have you created the positions before initiating BDC for Hiring?
    Check Feature ABKRS in Quality. Is this same as in Development?
    Is your BDC running OK in Development?
    Regards,

  • LSMW Upload vendor master data

    I am uploading vendor master data via a batch input in LSMW (program RFBIKR00).
    I uploaded all the vendors for 1 company code.
    When I try to upload the vendors for another company code, in the step “Create Batch Input Session” I get the error: “Trans. 1 XK01 : Acct already exists; general area not being processed, ... Data in table BLFA1 cannot be processed”.
    When I try to manually create a vendor for another company code via tcode XK01, I have no problems. But when I create an existing vendor manually for another company code I don’t have to add the information which is contained in table lfa1.
    Therefore I tried to upload the vendor, which has to be created for the company code, with a “/” in the data for table lfa1. But this doesn’t work.
    Has somebody a suggestion to solve this problem?
    Thanks

    In the similar thread you said:
    "If the vendor exists in LFA1 but not LFB1, use XK02 with the structures for LFA1. Then use XK01 with the structures for LFB1."
    It is not possible to use XK02 in order to create the vendor for another company code if the vendor already exists with a certain company code. You will get the error "Vendor xxx has not been created for company code yyy".
    The problem is that LSMW requires a mapping onto structure LFA1, but when the vendor already exists for a certain company code, LSMW returns in the step "Create Batch Input Session" the error: "Trans. 1 XK01 : Acct already exists; general area not being processed, ... Data in table BLFA1 cannot be processed".

Maybe you are looking for