Doubt in uploading purchase order data using BDC

Hi friends,
how to upload purchase order data.
1) In both BDC and BAPI which one is preferable?
2) for suppose if it is through BDC,  how to use? what are the transactions that we can use(SHDB, ME21N,ME21)?
3) To execute the job in background, is it possible for both call transaction and session method.
Thanks in advance
Sreenivas k

It really depends on the number of records you have. Still for a set of 5,000 records my answer to your questions will be:
1) In both BDC and BAPI which one is preferable?  - <b>Go with BDC</b>
2) for suppose if it is through BDC, how to use? what are the transactions that we can use(SHDB, ME21N,ME21)? - <b>Yes, its SHDB for recording, SE38 for abap program and ME21 for PO. Avoid SAP Enjoy transactions for recording as you may end up having problems wiht it.</b>
3) To execute the job in background, is it possible for both call transaction and session method. - <b>If you use call transaction method then you have to schedule the job to run in background or simply run it through F9 instead of F8. In case of session method you can chose to process the session in background. However  I would suggest you go with BDC Session method for this.</b>
- Guru
Reward points for helpful answers

Similar Messages

  • Upload Purchase order text  using BDC  while updating Material Master MM02

    Hi All,
    Please help me out with sample code upload PO Txt ( long text...which is more than 72 chars)using MM02. Its very urgent
    I am not able to pass data into following fields seen in recording,
    RSTXT-TXLINE(02),
    RSTXT-TXLINE(03),
    RSTXT-TXLINE(04),
    RSTXT-TXLINE(05),  as we can see only RSTXT-TXLINE field in the RSTXT structure......
    how to split  the long text into 72 chrs each and pass into data into the RSTXT-TXLINE(02), RSTXT-TXLINE(03), RSTXT-TXLINE(04)....correspondingly........
    Thanks in advance.....
    Reagards,
    Prasad KR.

    Hi
    see the sample program
    REPORT zmm_longtext
           NO STANDARD PAGE HEADING
           LINE-SIZE 255.
    Internal Table for Upload of Long Texts Data
    DATA: BEGIN OF itab1 OCCURS 0,
            matnr    LIKE mara-matnr,    " Material
            text1    LIKE tline-tdline,  " Long Text
            text2    LIKE tline-tdline,  " Long Text
            text3    LIKE tline-tdline,  " Long Text
            text4    LIKE tline-tdline,  " Long Text
            text5    LIKE tline-tdline,  " Long Text
            text6    LIKE tline-tdline,  " Long Text
            text7    LIKE tline-tdline,  " Long Text
            text8    LIKE tline-tdline,  " Long Text
            text9    LIKE tline-tdline,  " Long Text
            text10   LIKE tline-tdline,  " Long Text
            text11   LIKE tline-tdline,  " Long Text
            text12   LIKE tline-tdline,  " Long Text
            text13   LIKE tline-tdline,  " Long Text
            text14   LIKE tline-tdline,  " Long Text
            text15   LIKE tline-tdline,  " Long Text
            text16   LIKE tline-tdline,  " Long Text
            text17   LIKE tline-tdline,  " Long Text
            text18   LIKE tline-tdline,  " Long Text
            text19   LIKE tline-tdline,  " Long Text
            text20   LIKE tline-tdline,  " Long Text
            text21   LIKE tline-tdline,  " Long Text
            text22   LIKE tline-tdline,  " Long Text
            text23   LIKE tline-tdline,  " Long Text
            text24   LIKE tline-tdline,  " Long Text
            text25   LIKE tline-tdline,  " Long Text
          END OF itab1.
    Internal Table for Upload of Long Texts Data
    DATA: BEGIN OF itab OCCURS 0,
            matnr LIKE mara-matnr,    " Material
            text  LIKE tline-tdline,  " Long Text
          END OF itab.
    To create Long Text lines for CREATE_TEXT function module
    DATA:BEGIN OF dt_lines OCCURS 0.
            INCLUDE STRUCTURE tline.   " Long Text
    DATA:END OF dt_lines.
    Variable declarations for CREATE_TEXT function module
    DATA : dl_name TYPE thead-tdname,   " Object Name
           dl_lan TYPE thead-tdspras,   " Language
           gv_matnr TYPE matnr.
    Constants
    CONSTANTS:
    Object ID for Long Text of Material Basic Data 1
      c_best     TYPE thead-tdid VALUE 'GRUN',
      c_material TYPE thead-tdobject VALUE 'MATERIAL'. " Object
    Parameters
    PARAMETERS p_file LIKE rlgrap-filename.
    At selection-screen on Value Request for file Name
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
    Get the F4 Values for the File
      CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          program_name  = syst-cprog
          dynpro_number = syst-dynnr
        IMPORTING
          file_name     = p_file.
    Start Of Selection
    START-OF-SELECTION.
    *To Upload Flat file
      CALL FUNCTION 'UPLOAD'
        EXPORTING
          filename                = p_file
          filetype                = 'DAT'
        TABLES
          data_tab                = itab1
        EXCEPTIONS
          conversion_error        = 1
          invalid_table_width     = 2
          invalid_type            = 3
          no_batch                = 4
          unknown_error           = 5
          gui_refuse_filetransfer = 6
          OTHERS                  = 7.
      SORT itab1 BY matnr.
      LOOP AT itab1.
        CLEAR gv_matnr.
        SELECT SINGLE matnr INTO gv_matnr
           FROM mara WHERE bismt = itab1-matnr.
        IF itab1-text25 NE ' '.
          itab-matnr = gv_matnr.
          itab-text  = itab1-text25.
          APPEND itab.
        ENDIF.
        IF itab1-text24 NE ' '.
          itab-matnr = gv_matnr.
          itab-text  = itab1-text24.
          APPEND itab.
        ENDIF.
        IF itab1-text23 NE ' '.
          itab-matnr = gv_matnr.
          itab-text  = itab1-text23.
          APPEND itab.
        ENDIF.
        IF itab1-text22 NE ' '.
          itab-matnr = gv_matnr.
          itab-text  = itab1-text22.
          APPEND itab.
        ENDIF.
        IF itab1-text21 NE ' '.
          itab-matnr = gv_matnr.
          itab-text  = itab1-text21.
          APPEND itab.
        ENDIF.
        IF itab1-text20 NE ' '.
          itab-matnr = gv_matnr.
          itab-text  = itab1-text20.
          APPEND itab.
        ENDIF.
        IF itab1-text19 NE ' '.
          itab-matnr = gv_matnr.
          itab-text  = itab1-text19.
          APPEND itab.
        ENDIF.
        IF itab1-text18 NE ' '.
          itab-matnr = gv_matnr.
          itab-text  = itab1-text18.
          APPEND itab.
        ENDIF.
        IF itab1-text17 NE ' '.
          itab-matnr = gv_matnr.
          itab-text  = itab1-text17.
          APPEND itab.
        ENDIF.
        IF itab1-text16 NE ' '.
          itab-matnr = gv_matnr.
          itab-text  = itab1-text16.
          APPEND itab.
        ENDIF.
        IF itab1-text15 NE ' '.
          itab-matnr = gv_matnr.
          itab-text  = itab1-text15.
          APPEND itab.
        ENDIF.
        IF itab1-text14 NE ' '.
          itab-matnr = gv_matnr.
          itab-text  = itab1-text14.
          APPEND itab.
        ENDIF.
        IF itab1-text13 NE ' '.
          itab-matnr = gv_matnr.
          itab-text  = itab1-text13.
          APPEND itab.
        ENDIF.
        IF itab1-text12 NE ' '.
          itab-matnr = gv_matnr.
          itab-text  = itab1-text12.
          APPEND itab.
        ENDIF.
        IF itab1-text11 NE ' '.
          itab-matnr = gv_matnr.
          itab-text  = itab1-text11.
          APPEND itab.
        ENDIF.
        IF itab1-text10 NE ' '.
          itab-matnr = gv_matnr.
          itab-text  = itab1-text10.
          APPEND itab.
        ENDIF.
        IF itab1-text9 NE ' '.
          itab-matnr = gv_matnr.
          itab-text  = itab1-text9.
          APPEND itab.
        ENDIF.
        IF itab1-text8 NE ' '.
          itab-matnr = gv_matnr.
          itab-text  = itab1-text8.
          APPEND itab.
        ENDIF.
        IF itab1-text7 NE ' '.
          itab-matnr = gv_matnr.
          itab-text  = itab1-text7.
          APPEND itab.
        ENDIF.
        IF itab1-text6 NE ' '.
          itab-matnr = gv_matnr.
          itab-text  = itab1-text6.
          APPEND itab.
        ENDIF.
        IF itab1-text5 NE ' '.
          itab-matnr = gv_matnr.
          itab-text  = itab1-text5.
          APPEND itab.
        ENDIF.
        IF itab1-text4 NE ' '.
          itab-matnr = gv_matnr.
          itab-text  = itab1-text4.
          APPEND itab.
        ENDIF.
        IF itab1-text3 NE ' '.
          itab-matnr = gv_matnr.
          itab-text  = itab1-text3.
          APPEND itab.
        ENDIF.
           IF itab1-text2 NE ' '.
        itab-matnr = gv_matnr.
        itab-text  = itab1-text2.
        APPEND itab.
           ENDIF.
        IF itab1-text1 NE ' '.
          itab-matnr = gv_matnr.
          itab-text  = itab1-text1.
          APPEND itab.
        ENDIF.
        CLEAR itab.
      ENDLOOP.
      DELETE itab WHERE matnr EQ ' '.
    Upload the Texts
      SORT itab BY matnr.
      LOOP AT itab.
        dt_lines-tdformat = 'ST'.
        dt_lines-tdline = itab-text.
        APPEND dt_lines.
        dl_lan = sy-langu.
        dl_name = itab-matnr.
    Call the Function Module to Create Text
        CALL FUNCTION 'CREATE_TEXT'
          EXPORTING
            fid         = c_best
            flanguage   = dl_lan
            fname       = dl_name
            fobject     = c_material
            save_direct = 'X'
            fformat     = '*'
          TABLES
            flines      = dt_lines
          EXCEPTIONS
            no_init     = 1
            no_save     = 2
            OTHERS      = 3.
        IF sy-subrc <> 0.
          WRITE:/ 'Long Text Creation failed for Material'(001),
                 itab-matnr.
        ELSE.
          WRITE:/ 'Long Text Created Successfully for Material'(002),
                 itab-matnr.
        ENDIF.
        AT END OF matnr.
          REFRESH dt_lines.
        ENDAT.
      ENDLOOP.
    Reward points for useful Answers
    Regards
    Anji

  • How to upload Purchase Order Data thru LSMW

    Hi All,
    I need to upload Purchase order data thru LSMW. LSMW Provides standard object method which does not suit for split valuation. But in the client place split valuation is maintained. Is there any other of option of uploading the data.
    Regards,
    Srivatsan

    Dear Srivatsan
    For Upload Purchase order Data through LSMW
    Business object BUS2012 - Purchase Order
    Basic type PORDCR04
    Message type PORDCR
    Method CREATEFROMDATA
    With regards
    B.Ravindranath

  • Problem in uploading material master data using BDC?

    Hi all,
    I am using  BDC call transaction method to upload material data. Here i am facing a problem that a value in the flat file is going to the wrong screen field . But my recording done properly.
    In recording, after entering the data in the view BASIC DATA1 and trying to enter the text . For this i need to scroll down the scroll bar and after that i am clicking on basic data text and entering the text. Here i am not touching the languge field.
    But the problem is the text to be entered into the basic data text is storing in language and giving error.
    Please help me by specifying the reason and solution for this problem? Whether i did any mistake in recording in scrolling?
    Thanks,
    Vamshi.

    Hi
    Go with BAPI for such huge transactions and screens. Use BAPI: BAPI_MATERIAL_SAVEDATA.
    Regards,
    Vishwa.

  • Upload of purchase order details using LSMW

    Hi friends,
    I encountered a problem while uploading purchase order details using LSMW . in the field mapping I could not able to fine the field TCODE. as a result I could not assign the transaction code ME21. could you please suggest me a solution.
      thanks

    Hai
    Check with the following
    Select fifth Radio button then follow the bellow step
    <b>5) select radio-Button 5 and execute
       Maintain Field Mapping and Conversion Rules
       Select the Tcode and click on Rule button there you   will select constant
       and press continue button
       give Transaction Code : ME21 and press Enter</b>
    Thanks & regards
    Sreenivasulu P

  • Upload Of Transaction Data Using E-CATT

    Dear All,
          I am trying to upload purchase order Data for transaction ME21 through E-catt. But I am not able to upload multiple line item data as the Test Script allows only one item data to be uploaded because I have uploaded only one item data in my recording. So I am not able to upload multiple line item data. Can anybody help me with the steps to upload multiple line item data for ME21 transaction through E-CATT.

    Hi,
    Did you solve this problem of uploading more than 1 line item? If you have solved, please share me your solution as Im also encountering the same problem. Thanks in advance for your help!

  • Upload Purchase order text tab using BDC

    Is it possible to upload Purchase order text tab in material master (tcode mm01) using a BDC.
    If so pls tell me how to upload the same, what is the field name of the box.
    Regards,
    Senthil

    u need to use READ_TEXT or SAVE_TEXT or WRITE_TEXT or COMMIT_TEXT to upload text into SAP.

  • Difference between uploading data using BDC,CATT

    Dear experts,
    what is the difference between uploading the data using BDC and CATT tool?
    is it only the coding or something else.
    and can you explain the situations where we prefer to upload the data using CATT tool.
    thanks in advance.

    Check this thread -
    Differences between  BDC , LSMW, BAPI,CATT
    Regards,
    Amit

  • Flat  file to upload data using BDC for transaction MM01

    Hi
    I am trying to update data using bdc code has been attached below using a txt file.
    It is updating the first set of data into the table mara ,but  for the rest it is not
    All the data from txt file has being loaded to internal table , but the problem is it does not gets updated from internal table to the database .
    Only the first set of data has been loaded ,<u><b> rest of the data is not loaded</b></u>
    <u><b>content of txt file</b></u>
    zsc     zsc     kg     
    zsv     zsv     kg     
    zsb     zsb     kg
    <u><b>Actual code</b></u>
    report ZMAT_UPLOAD
           no standard page heading line-size 255.
    types declaration..........................................................................
    types : begin of t_mat,
       matnr(20),
       desc(50),
       uom(5),
    end of t_mat.
    internal table and workarea declaration.......................................
    data : i_mat type table of t_mat.
    data : wa_mat type t_mat.
    include bdcrecx1.
    start-of-selection.
    moving the flat file content to internal table................................
    CALL FUNCTION 'UPLOAD'
         EXPORTING
             FILETYPE   = 'DAT'
         TABLES
             data_tab   = i_mat.
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    perform open_group.
    loop at i_mat into wa_mat.
    perform bdc_dynpro      using 'SAPLMGMM' '0060'.
    perform bdc_field       using 'BDC_CURSOR'
                                       'RMMG1-MATNR'.
    perform bdc_field       using 'BDC_OKCODE'
                                        '=AUSW'.
    perform bdc_field       using 'RMMG1-MATNR'
                                        wa_mat-matnr.
    perform bdc_field       using 'RMMG1-MBRSH'
                                        'P'.
    perform bdc_field       using 'RMMG1-MTART'
                                        'ZOH'.
    perform bdc_dynpro   using 'SAPLMGMM' '0070'.
    perform bdc_field       using 'BDC_CURSOR'
                                        'MSICHTAUSW-DYTXT(01)'.
    perform bdc_field       using 'BDC_OKCODE'
                                        '=ENTR'.
    perform bdc_field       using 'MSICHTAUSW-KZSEL(01)'
                                        'X'.
    perform bdc_dynpro   using 'SAPLMGMM' '4004'.
    perform bdc_field       using 'BDC_OKCODE'
                                        '=BU'.
    perform bdc_field       using 'MAKT-MAKTX'
                                        wa_mat-desc.
    perform bdc_field       using 'BDC_CURSOR'
                                        'MARA-MEINS'.
    perform bdc_field       using 'MARA-MEINS'
                                        wa_mat-uom.
    perform bdc_field       using 'MARA-MTPOS_MARA'
                                        'NORM'.
    perform bdc_transaction using 'MM01'.
    endloop.
    Perform close_group.

    Hi Sumant,
    just concentrate on bold one
    report ZMAT_UPLOAD
    no standard page heading line-size 255.
    types declaration..........................................................................
    <b>
    data : begin of t_mat occurs 0,
    matnr(20),
    desc(50),
    uom(5),
    end of t_mat.</b>
    internal table and workarea declaration.......................................
    <b>*data : i_mat type table of t_mat.
    *data : wa_mat type t_mat.</b>
    include bdcrecx1.
    start-of-selection.
    moving the flat file content to internal table................................
    CALL FUNCTION 'UPLOAD'
    EXPORTING
    FILETYPE = 'DAT'
    TABLES
    <b>data_tab = i_mat.---> t_mat.</b>
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    perform open_group.
    <b>loop at i_mat into wa_mat.------>loop at t_mat.</b>
    perform bdc_dynpro using 'SAPLMGMM' '0060'.
    perform bdc_field using 'BDC_CURSOR'
    'RMMG1-MATNR'.
    perform bdc_field using 'BDC_OKCODE'
    '=AUSW'.
    perform bdc_field using 'RMMG1-MATNR'
    <b>wa_mat-matnr.---->t_mat-matnr(change in this for ur wa to t_mat.</b>
    perform bdc_field using 'RMMG1-MBRSH'
    'P'.
    perform bdc_field using 'RMMG1-MTART'
    'ZOH'.
    perform bdc_dynpro using 'SAPLMGMM' '0070'.
    perform bdc_field using 'BDC_CURSOR'
    'MSICHTAUSW-DYTXT(01)'.
    perform bdc_field using 'BDC_OKCODE'
    '=ENTR'.
    perform bdc_field using 'MSICHTAUSW-KZSEL(01)'
    'X'.
    perform bdc_dynpro using 'SAPLMGMM' '4004'.
    perform bdc_field using 'BDC_OKCODE'
    '=BU'.
    perform bdc_field using 'MAKT-MAKTX'
    wa_mat-desc.
    perform bdc_field using 'BDC_CURSOR'
    'MARA-MEINS'.
    perform bdc_field using 'MARA-MEINS'
    wa_mat-uom.
    perform bdc_field using 'MARA-MTPOS_MARA'
    'NORM'.
    perform bdc_transaction using 'MM01'.
    endloop.
    Perform close_group.
    Reward points for helpful answers.
    Thanks
    Naveen khan
    Message was edited by:
            Pattan Naveen
    Message was edited by:
            Pattan Naveen

  • Can anyone list problems/errors when uploading data using BDC's and BAPI's?

    Can anyone list the problems/errors when uploading data using BDC's and BAPI's?

    Hi,
    If you are actually creating a BDC to load data pls be more specific.
    Data format incorrect. Tab delimited/ etc
    Dates in wrong formats
    Currency incorrect formats
    Missing screens
    Wrong transaction code
    File not found,
    Missing Mandatory fields,
    Screen resoultion.
    You should always use refresh for your Bdcdata table.
    Loop at internal table.
    refresh Bdcdata.
    regards,
    sowjanya.

  • UPload data useing BDC for cost element allocation

    Hi ALL,
      i have to upload data useing BDC , have to upload data for cost centre accloction table ,What is the T.code and how to do it, i have knows LSMW,
    very useful for me
    Advance  Thanks
    Narra

    Using BDC means...use theTCODE: SHDB   + ABAPer help, it requires program need to create for this....you can have options in BDC is...u can test the data validity before you upload the data
    VVR

  • Upload data using BDC

    Hi Expert,
    How to upload data using BDC. I have uploaded using LSMW....now want to know how to upload data using BDC

    HI
    Ask your Abapper.
    First you have to record in SHDB. then you have to generate the program and write the code in SE38
    For more details please make a search
    regards
    Prashanth

  • Hi experts, Upload purchase order using BAPI

    hi
    Could you please help me how to do PURCHASE ORDER CREATION using BAPI.
                         Thank you.

    Satyendra,
    The forum that you have posted your question in is for questions related to the SAP Business One Integration for SAP NetWeaver.  Your question is or seems to be related to R/3 and should be posted in that forum.
    Eddy

  • Uploading Purchase order

    When we create Purchase order manually, then a record is inserted in the table S012.
    But when we upload purchase order using LSMW, the record is not inserted in the table  S012 .
    It purchase order value in S012 table is zero.  Need clarification.

    Dear Gow,
    Ask your ABAPer to debug the table data, or to search some BDC will be there.
    Kaustubh

  • Migration of Purchase Order History using RM06EEI1

    Hi
    I have migrated Open Purchase Orders from one SAP system to another SAP system.
    I have loaded the Purchase Order details using business object BUS2012  and the PO History using program RM06EEI1.
    Only open quantities were loaded to facilitate subsequent Goods Receipts and Invoice Receipts.
    The records were loaded without errors.
    The Material Ledger was inactive during the migration and activated after the migration.
    Everything looks ok from a migration perspective.  The correct quantities are created on the PO, the GR shows on the History tab, and the correct GL Accounts were posted to i.e the GRIR Clearing Account and the IR Account.
    However, I am unable to perform Invoice Verification (MIRO) and Reversal of Goods Receipts (MIGO) on these records.
    The error message is "No (suitable) item found for purchase order".
    Has anyone encountered this scenario and can shed some light on this issue?
    Regards
    Magan

    Hi,
    I think the best solution would be,
    Identify the open POs in legacy system
    Migrate the data for these POs for table EKKO, EKPO, EKET and long texts.
    Once migrated run tcode OMQ5. this will generate the correct file so that you can upload correct PO history.
    Susequently, upload this file through the tcode OMQ2.
    Check that you provide correct conversion accounts..
    you will get correct Open POs and PO history of open POs from legacy to new system.

Maybe you are looking for