For uploading master data(ex:customer data) into sap,

hi
for uploading master data(ex:customer data) into sap,
which methods you prefer? call
transaction/session/lsmw/bapi? why?
Thanks
Rama

Hello,
Check this:
COde:
REPORT zprataptable2
       NO STANDARD PAGE HEADING LINE-SIZE 255.
DATA : BEGIN OF itab OCCURS 0,
        i1 TYPE i,
        lifnr LIKE   rf02k-lifnr,
        bukrs LIKE   rf02k-bukrs,
        ekorg LIKE   rf02k-ekorg,
        ktokk LIKE   rf02k-ktokk,
        anred LIKE lfa1-anred,
        name1 LIKE lfa1-name1,
        sortl LIKE lfa1-sortl,
        land1 LIKE lfa1-land1,
        akont LIKE lfb1-akont,
        fdgrv LIKE lfb1-fdgrv,
         waers LIKE lfm1-waers,
        END OF itab.
DATA : BEGIN OF jtab OCCURS 0,
        j1 TYPE i,
        banks LIKE lfbk-banks,
        bankl LIKE lfbk-bankl,
        bankn LIKE lfbk-bankn,
         END OF jtab.
DATA : cnt(4) TYPE n.
DATA : fdt(20) TYPE c.
DATA : c TYPE i.
INCLUDE bdcrecx1.
START-OF-SELECTION.
  CALL FUNCTION 'WS_UPLOAD'
    EXPORTING
      filename = 'C:\first1.txt'
      filetype = 'DAT'
    TABLES
      data_tab = itab.
  CALL FUNCTION 'WS_UPLOAD'
   EXPORTING
     filename                      = 'C:\second.txt'
     filetype                      = 'DAT'
    TABLES
      data_tab                      = jtab.
  LOOP AT itab.
    PERFORM bdc_dynpro      USING 'SAPMF02K' '0100'.
    PERFORM bdc_field       USING 'BDC_CURSOR'
                                  'RF02K-KTOKK'.
    PERFORM bdc_field       USING 'BDC_OKCODE'
                                  '/00'.
    PERFORM bdc_field       USING 'RF02K-LIFNR'
                                  itab-lifnr.
    PERFORM bdc_field       USING 'RF02K-BUKRS'
                                  itab-bukrs.
    PERFORM bdc_field       USING 'RF02K-EKORG'
                                   itab-ekorg.
    PERFORM bdc_field       USING 'RF02K-KTOKK'
                                   itab-ktokk.
    PERFORM bdc_dynpro      USING 'SAPMF02K' '0110'.
    PERFORM bdc_field       USING 'BDC_CURSOR'
                                  'LFA1-LAND1'.
    PERFORM bdc_field       USING 'BDC_OKCODE'
                                  '/00'.
    PERFORM bdc_field       USING 'LFA1-ANRED'
                                  itab-anred.
    PERFORM bdc_field       USING 'LFA1-NAME1'
                                  itab-name1.
    PERFORM bdc_field       USING 'LFA1-SORTL'
                                  itab-sortl.
    PERFORM bdc_field       USING 'LFA1-LAND1'
                                  itab-land1.
    PERFORM bdc_dynpro      USING 'SAPMF02K' '0120'.
    PERFORM bdc_field       USING 'BDC_CURSOR'
                                  'LFA1-KUNNR'.
    PERFORM bdc_field       USING 'BDC_OKCODE'
                                  '/00'.
    PERFORM bdc_dynpro      USING 'SAPMF02K' '0130'.
    PERFORM bdc_field       USING 'BDC_CURSOR'
                                  'LFBK-BANKN(01)'.
    PERFORM bdc_field       USING 'BDC_OKCODE'
                                  '=ENTR'.
    cnt = 0.
    LOOP AT jtab WHERE j1 = itab-i1.
      cnt = cnt + 1.
      CONCATENATE 'LFBK-BANKS(' cnt ')' INTO fdt.
      PERFORM bdc_field  USING fdt jtab-banks.
      CONCATENATE 'LFBK-BANKL(' cnt ')' INTO fdt.
      PERFORM bdc_field USING fdt jtab-bankl.
      CONCATENATE 'LFBK-BANKN(' cnt ')' INTO fdt.
      PERFORM bdc_field   USING fdt jtab-bankn.
      IF cnt = 5.
        cnt = 0.
        PERFORM bdc_dynpro      USING 'SAPMF02K' '0130'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'LFBK-BANKS(01)'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=P+'.
        PERFORM bdc_dynpro      USING 'SAPMF02K' '0130'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'LFBK-BANKN(02)'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=ENTR'.
      ENDIF.
    ENDLOOP.
    PERFORM bdc_dynpro      USING 'SAPMF02K' '0130'.
    PERFORM bdc_field       USING 'BDC_CURSOR'
                                  'LFBK-BANKS(01)'.
    PERFORM bdc_field       USING 'BDC_OKCODE'
                                  '=ENTR'.
    PERFORM bdc_dynpro      USING 'SAPMF02K' '0210'.
    PERFORM bdc_field       USING 'BDC_CURSOR'
                                  'LFB1-FDGRV'.
    PERFORM bdc_field       USING 'BDC_OKCODE'
                                  '/00'.
    PERFORM bdc_field       USING 'LFB1-AKONT'
                                  itab-akont.
    PERFORM bdc_field       USING 'LFB1-FDGRV'
                                  itab-fdgrv.
    PERFORM bdc_dynpro      USING 'SAPMF02K' '0215'.
    PERFORM bdc_field       USING 'BDC_CURSOR'
                                  'LFB1-ZTERM'.
    PERFORM bdc_field       USING 'BDC_OKCODE'
                                  '/00'.
    PERFORM bdc_dynpro      USING 'SAPMF02K' '0220'.
    PERFORM bdc_field       USING 'BDC_CURSOR'
                                  'LFB5-MAHNA'.
    PERFORM bdc_field       USING 'BDC_OKCODE'
                                  '/00'.
    PERFORM bdc_dynpro      USING 'SAPMF02K' '0310'.
    PERFORM bdc_field       USING 'BDC_CURSOR'
                                  'LFM1-WAERS'.
    PERFORM bdc_field       USING 'BDC_OKCODE'
                                  '/00'.
    PERFORM bdc_field       USING 'LFM1-WAERS'
                                  itab-waers.
    PERFORM bdc_dynpro      USING 'SAPMF02K' '0320'.
    PERFORM bdc_field       USING 'BDC_CURSOR'
                                  'RF02K-LIFNR'.
    PERFORM bdc_field       USING 'BDC_OKCODE'
                                  '=ENTR'.
    PERFORM bdc_dynpro      USING 'SAPLSPO1' '0300'.
    PERFORM bdc_field       USING 'BDC_OKCODE'
                                  '=YES'.
    PERFORM bdc_transaction USING 'XK01'.
  ENDLOOP.
  PERFORM close_group.
Header file:
1     63190      0001     0001     0001     mr     bal188     b     in     31000     a1     inr
2     63191      0001     0001     0001     mr     bal189     b     in     31000     a1     inr
TC file:
1 in sb 11000
1 in sb 12000
1 in sb 13000
1 in sb 14000
1 in sb 15000
1 in sb 16000
1 in sb 17000
1 in sb 18000
1 in sb 19000
1 in sb 20000
1 in sb 21000
1 in sb 22000
2 in sb 21000
2 in sb 22000
Regards,
Vasanth

Similar Messages

  • For uploading master data

    hi
    for uploading master data (ex: customerd data) into sap, which methods we prefer
    (call transaction/ session/ LSMW) . why?

    depends on how much data you want to upload..
    LSMW itself will give you multiple options to load data.
    if there is a huge number of records that you want to upload, do not go for a call transaction method, rather use sessions method if you want to use BDCs. explore in LSMW that which options are available for customer data while uploading it.

  • Can you tell me how I can put the data of sql server into SAP to auto gener

    Dear all,
             Can you tell me how I can put the data of sql server into SAP to auto generate PR?
    Best regards,
    Merry zhang

    Many thanks ,it is ok now.

  • ECATT Use for upload master data

    Hi
    Please Guide me how to use ECATT , when  we Upload the Master data in SAP Best Practice ,not in SAP R/3 ( note : for SAP Best Practice system only) through ECATT.
    Can anybody have any idea about this
    Guide me
    Regards
    Roobal

    ECATT can be used by using transaction code SECATT.
    This tool is used for data uploading and regression testing.
    You need to prepare a scenario for regression testing.
    You should create
    1. Test Script
    2. Test Data
    3. Test Configuration.
    If you want to upload master data, LSMW is the best tool.
    http://www.scmexpertonline.com/downloads/SCM_LSMW_StepsOnWeb.doc
    Regards,
    Ravi
    Edited by: Ravi Sankar Venna on Apr 22, 2009 12:54 PM

  • Cannot upload csv file of customer data on sample application...

    Hi I am learning about APEX through the Oracle hosted site and I've been trying the data upload on the customers table.
    I downloaded the sample data from the customer table into a csv file using the apex download feature. I then just left the first row which
    contains the column names,deleted the other rows in the csv,except for one where I changed the data.
    When i try to upload the csv file back,using the sample app with comma as separator,and first row as column data, I get the error "Do not Load"
    in the column names although the row1 of the data displays correctly under each column.
    Here's the Copy and Paste text:
    "CUSTOMER_ID","CUST_FIRST_NAME","CUST_LAST_NAME","CUST_STREET_ADDRESS1","CUST_STREET_ADDRESS2","CUST_CITY","CUST_STATE",
    "CUST_POSTAL_CODE","PHONE_NUMBER1","PHONE_NUMBER2","CREDIT_LIMIT","CUST_EMAIL"
    "9","Rahul","Surname","46 Somewhere","Some Town","MyTown","MA","230","(230) 434-2443","(230) 733-4344","200","[email protected]"
    Can anyone help please?

    Hi again
    I did use a comma. I did it again just to be sure.
    Using the Data Workshop->Text Data and a csv file I was able to load the data without any problem.
    Using the same csv, but from the sample application,same problem. Pasting in the Data Field,same problem.
    Also I was trying to load about 20 records to another table from an Excel file,by copying the range and pasting in the Date Field of the Data Workshop.
    The rows displayed correctly in the Data Field but on loading,got "No Data Found".
    Saving the Excel data to a csv and again using the Data Workshop>Text Data >csv file etc,no problem at all,data was loaded instantly.
    The safest bet is to use the Data Workshop and a csv file,but thats only for developers.
    Probably a simple error somewhere ,but if (thats a big if) anyone could paste the data I posted earlier in the demo_customers and see if they have the same error,
    I would be grateful. Having endusers upload their Excel-based data is a central part of my planned site.Here it is again:
    "CUSTOMER_ID","CUST_FIRST_NAME","CUST_LAST_NAME","CUST_STREET_ADDRESS1","CUST_STREET_ADDRESS2","CUST_CITY","CUST_STATE",
    "CUST_POSTAL_CODE","PHONE_NUMBER1","PHONE_NUMBER2","CREDIT_LIMIT","CUST_EMAIL"
    "9","Rahul","Surname","46 Somewhere","Some Town","MyTown","MA","230","(230) 434-2443","(230) 733-4344","200","[email protected]".
    Regards

  • Uploading data from MS Access into SAP R3 v3.1

    Hey Gurus,
    I am wondering which options I have to import data from a MS Access database into SAP R3 version3.1. For example, can I make use of the LSM Workbench?
    Regards,
    Pim
    points are awarded if helpfull

    It is much better to take the help of technical person, as directly you can upload the data from MS Access to SAP ..the thing you have to keep in mind is tell theABAPer to convert the file into a .txt one..as then only SAP will allow.
    Reward Points if it helps,
    Regards,
    N

  • Uploading data from Excel sheet into SAP.

    Dear All,
    I want to upload data existing in Excel sheet into SAP. Is there any possibility with the following requirements?
    1) Excel file contains serial numbers with different values.Like power(230Wp),Voc,Isc,Vmp and Imp.
    2) We need to upload the same data into SAP with validations.
    3) Validations are like no serial number should be repeated.
    4) And depending on the Power value, the serial number should be assigned to different batches.Eg:The batches are as follows:
         201 - 210
         210 - 220
         220 - 230
       and if the Pmax of the serial number is 205.It should be assigned to batch 201 - 210 .
    5) At present we are using MB31 to post the serial numbers which are existing in the flat file.
    Thanks and Regards,
    Varun Siddharth

    Hi,
    Refer to the following code:
    DATA: lv_filetype(10) TYPE c,
            lv_gui_sep TYPE c,
            lv_file_name TYPE string.
      lv_filetype = 'ASC'.
      lv_gui_sep = 'X'.
      lv_file_name = pa_dfile.
    FM call to upload file
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename                = lv_file_name
          filetype                = lv_filetype
          has_field_separator     = lv_gui_sep
        TABLES
          data_tab                = gi_zhralcon_file
        EXCEPTIONS
          file_open_error         = 1
          file_read_error         = 2
          no_batch                = 3
          gui_refuse_filetransfer = 4
          invalid_type            = 5
          no_authority            = 6
          unknown_error           = 7
          bad_data_format         = 8
          header_not_allowed      = 9
          separator_not_allowed   = 10
          header_too_long         = 11
          unknown_dp_error        = 12
          access_denied           = 13
          dp_out_of_memory        = 14
          disk_full               = 15
          dp_timeout              = 16
          OTHERS                  = 17.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    The excel file must be a tab delimited file.
    Hope it helps.
    Regards,
    Rajesh Kumar

  • Using MEREQ001 u2013 Checking error for data in customer data tab.

    Hi Guys,
    I have implemented MEREQ001 enhancement to add custom field in CUSTOMER DATA tab at item level. I want to validate the custom fields for error and display RED dot in front of the line item number when user press SAVE button.
    I am using EXIT_SAPLMEREQ_005 for validating the custom field when user press SAVE button.
    Is this the correct exit for this requirement.
    Can somebody share to code to display the RED dot in front of the line item which has error in custom fields?
    Thanks in advance.

    I think it's right
    U need to tranfer the message to exporting parameter or raise an error message

  • How to debug a Diagnostic Data Adapter (custom data collector) for Microsoft Test Manager

    Hello,
    I have created a custom Diagnostic Data Adapter aka. custom data collector for Microsoft Test Manager (MTM) and installed it, all according to the guidelines under  Creating
    a Diagnostic Data Adapter to Collect Custom Data or Affect a Test Machine.
    I would like to debug my data collector. On which machine should I perform the debugging and to which process should I attach from Visual Studio? Are there any restrictions regarding the user who is running the debug session?
    How can I do that?
    Thank you ,
    Ana

    It seems that I found the solution, but I would like someone still to verify if it is the right one.
    Steps:
    Turn on "Microsoft Symbol Server" under In Tools-->Options-->Debugging
    Restart manually "Visual Studio Lab Agent Service" on the machine where the collector is installed (this actionautomatically restarts the  Visual Studio Test Agent ("C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\QTAgentService.exe")) 
    Load code for your collector in Visual Studio 
    Attach the Visual Studio debugger to the processes QTAgentService.exe and QTDCAgent32.exe
    Start test in MTM on client machine using test setting which trigger the data collector (diagnostic data adapter)
    and finally hit a brake point in your code...
    Thank you,
    Ana

  • IDOC :: how to send data from Custom Infotype in SAP HR to third party

    Hi,
    I have created one custom Infotype by number 9020. How to send data from this infotype to third party system and also change pointers need to trigger for this infotype.
    Please help me in doing it.
    I am using one Custom Message type ZTALENT and Custom Idoc Type ZTALENT.
                                                                                    ZTALENT                        Talent Management                                                                               
    5  E1PLOGI                        Header for an HR Object (Master Data or Organizational Data)                                                                               
    5  E1PITYP                        HR: Transported Infotypes and Subtypes for an Object                                                                               
    ZPUSER                         User base Data File                                          
                    ZPERSON                        Personal Information File Segment                            
                    ZPOST                          Position File                                                
                    ZOPE                           Overall Performance                                          
                    ZPWORK                         Outside Work Experience                                      
                    ZPEDUC                         Education Details of Employee                                
                    E1P0000                        HR: HR Master Record Infotype 0000 (Actions)                 
                    E1P0001                        HR: HR Master Record Infotype 0001 (Org. Assignment)         
                    E1P0002                        HR: HR Master Record Infotype 0002 (Personal Data)           
                    E1P0016                        HR Master Record: Infotype 0016 (Contract Elements)          
                    E1P0022                        HR Master Record: Infotype 0022 (Education)                  
                    E1P0023                        HR Master Record: Infotype 0023 (Other/Previous Employers)   
                    E1P0041                        HR Master Record: Infotype 0041 (Date Specifications)        
                    E1P0105                        HR: HR Master Record Infotype 0105 (Communications)       
                   ZE1P9020
                    ZPLANG                         Language Details                                             
                    ZACTION                        Actions Changes            
    Regards,
    Krishna

    Hello Shankar,
             Technically TEMSE files are read by calling the following 3 function modules in sequence,
                  1) RSTS_OPEN_RLC or RP_TS_OPEN: open the temse object
                  2) RSTS_READ : read the object
                  3) RSTS_CLOSE: close the object
    Regards,
    Rajesh

  • To read data from exel file into sap

    hi all,
    How to read data from exel file into the internal table in abap?
    Regards,
    sugeet.

    Hi Sugeet,
    Use the following code.
    DATA : BEGIN OF tbl_asset occurs 0,
             anlkl LIKE anla-anlkl,          " Asset Class
             bukrs LIKE anla-bukrs,          " Company Code
             ranl1 LIKE ra02s-ranl1,         " Asset #
             txt50 LIKE anla-txt50,          " Description 1
             txa50 LIKE anla-txa50,          " Description 2
             sernr LIKE anla-sernr,          " Serial #
             invnr LIKE anla-invnr,          " Inventory #
             menge LIKE anla-menge,          " Quantity
             meins LIKE anla-meins,          " Base UOM
             inken LIKE anla-inken,          " Inventory
    END OF tbl_asset.
    DATA : w_filename TYPE IBIPPARMS-path,
           w_file     TYPE string.
    start-of-selection.
    *popup for file path from user
    CALL FUNCTION 'F4_FILENAME'
    EXPORTING
       PROGRAM_NAME        = SYST-CPROG
       DYNPRO_NUMBER       = SYST-DYNNR
    IMPORTING
       FILE_NAME           = w_filename          .
    MOVE w_filename TO w_file .
    * upload data
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        FILENAME                      =  w_file
        FILETYPE                      = 'ASC'
        HAS_FIELD_SEPARATOR           = 'X'
      TABLES
        DATA_TAB                      = tbl_asset
      EXCEPTIONS
       FILE_OPEN_ERROR               = 1
       FILE_READ_ERROR               = 2
       NO_BATCH                      = 3
       GUI_REFUSE_FILETRANSFER       = 4
       INVALID_TYPE                  = 5
       NO_AUTHORITY                  = 6
       UNKNOWN_ERROR                 = 7
       BAD_DATA_FORMAT               = 8
       HEADER_NOT_ALLOWED            = 9
       SEPARATOR_NOT_ALLOWED         = 10
       HEADER_TOO_LONG               = 11
       UNKNOWN_DP_ERROR              = 12
       ACCESS_DENIED                 = 13
       DP_OUT_OF_MEMORY              = 14
       DISK_FULL                     = 15
       DP_TIMEOUT                    = 16
       OTHERS                        = 17
    IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    for HAS_FIELD_SEPARATOR Use
    'X': Fields are separated by tabs.
    SPACE: Fields are not separated by tabs. In this case, the table must contain only one column or all columns must be contained in the file in their entire length.
    Hope it helps...
    Lokesh
    Pls. reward appropriate points

  • Exporting data third party system into SAP

    Hi folks,
    I am working on a task of hiring a applicant from a third party recruitment system into SAP. I have written an interface, to extract the data from the recruitment system and using the FM 'HR_PREPARE_NEW_EE' I store them in the interface table(T752F)
    Then I use PA48 to conduct the process of hiring action for the applicants.
    Question:
    Using the FM i can import various data elements from the import parameters available,  however when I use the transaction code PA48 I do not see all the additional parameters like address, city that I have imported for the candidate record.
    Do I need to configure the transaction code into include all the additional columns that I am importing ?
    How can I do it?
    Any thoughts or leads would be really helpful. I am kind of stuck here.
    I appreciate it,
    Thanks,
    VG

    hi folks,
    Have any one worked integration of third party recruitment service with SAP? I have successfully uploaded the data related to various data elements of infotypes 0,1, 2,6 etc..  into the temporary storage table (T752F)  However when I use the transaction code PA42 some of the data elements are not hsowing up on the infotype screens like address data (available in the temporary storage for the candidate).
    Do anyone have the experience of working using PA42 transaction to hire a candidate from the data in the temporary storage table ?
    I need some help. Your help is appreciated.
    Thanks,
    VG

  • Code for UpLoad program to load Custom PA infotype

    I need to develope UpLoad program to load Custom PA infotype which I created with 9001.
    Can you please give the complete code to Write upload program using standard available FM .
    Points will be awarded........
    Thanks
    Raj

    As this is a custom Infotype and no code is readily available, I would suugest that you try transction SHDB and record loading data into this Infotype.  This interm can be converted to a program which you can then tweek.  If I get stuck writting a BDC upload program then this is where I start.
    Regards
    J

  • Whats the difference between data in customer data management dashbord and customers under sales?

    Hi,
       In the navigator>sales i have a menu customers, there i can see accounts (customers) and contacts, however in the navigator>Customer data management under menu Customer data management dashboard i have organizations and persons. Whats the difference between the information shown in one place and in the other? Why is the information shown with different names in different menus?
    thanks

    Hi, The present project has the requirement to Delete the data from Sales Force objects.Have following set up: 1. Parent Objects2. Child Objects3. Cloud Data Synchronization tasks to delete these objects Parent and Child have LOOKUP relationships between them.Deleing data from Child objects did not give any error. Tried 2 scenarios to delete data from Parent object: Scenario 1: Tried to delete to data from PARENT first before deleting CHILD.                  Result: Failed Scenario 2: Tried to delete to data from PARENT after deleting CHILD.                  Result: Failed Error mesge received in both cases: "Error loading into target [SF_Object] : Error received from salesforce.com. Fields []. Status code [DUPLICATE_COMM_NICKNAME]. Message [Too many records to cascade delete or set null]." Kindly help to resolve this error and suggest a method to delete data from PARENT salesforce objects. Please feel free to ask for more inputs, if required.

  • Mass Master data Upload from MS Excel and JDE into SAP ( ECC 6.0)

    Hi
    We are deciding the best method of uploading 2 million fixed assets Master data from Excel and JDE
    We are following Batch Input (RAALTD001) and Direct Input methods (RAALTD11)
    I am looking for some other efficient alternative for this upload
    Look forward ot hear form you experts !!
    Thanks
    Milind

    hi
    good
    both works not possible simultaneously.
    If you want to do it in two separate task than you can use the GUI_UPLOAD function module to fulfill your requirement.
    thanks
    mrutyun^

Maybe you are looking for