BDC recording in transaction BP

Hi,
    I am creating a program which needs to update vendors using transaction BP. I am using BDC for this. However, I noticed that the screen of this transaction is dependent on the previous mode done (display or change). To give an example, in transaction BP, we need to click change/display. In the BDC, the ok_code for change/display is always passed. So, when vendor1 is processed with change, the next vendor will switch to display since the ok_code is called. Is there a way to be independent of the previous mode?
Thanks!

Hello,
You shouldnt use BDC for this bu use BAPI - BAPI_BUPA_CENTRAL_CHANGE.
You can look into the Business object BUS1006 and get the list of BAPIs available for business partner. Most of the BAPI have name BAPIBUPA.
Rgds,
Prasanna

Similar Messages

  • BDC recording for transaction 'Me01'

    Hi,
    Can u help me in BDC recording for transaction 'ME01' .
    I have no idea for transaction 'ME01' .
    give sample code if possible.
    Thanks

    For creating source list you will check that purchasing view has been maintained for this material
    Source list for resticting, purcasing a material from a specific vendor only for the period specified in source list
    Regards,
    Amit R.

  • Problem in BDC recording for transaction /J4I/015W3A

    hello all,
    i am recording for transaction /J4I/015W3A it has 4 select options if we enter all select options and press enter it will guide to another screen which has table control . i need the fill the entries there also and save the recording.
    i have completed recording with all the steps.
    if i try to run the report with this recording the problem is that  the first screen  the entries which i have entered in  select options are not defaulted and instead first enter okcode is getting triggered as there are no values on select options and enter is triggered an error message is displayed saying enter all the values .
    how can i over come this problem...........?

    hi,
      while recording, ok code will come first, for each screen you have to kept ok code at last .
      This will work.
    regards,
    pavan

  • Bdc recording of transaction ckecp- not capturing fields of items

    Hi all
    I recorded transaction CKECP using shdb.
    In that if we click 'Show/hide item view' the item wise details to be entered appears.
    items were entered. Transaction recorded.
    But the item fields are not appearing in the recording.
    Can somebody explain to me ?
    Vijaya Chamundi

    Try this way.
    <li>Go to that particular screen->System menu->Status->Double click on screen number ->it takes you to the screen painter->Click on layout->Now on the screen find the checkbox screen field name
    Thanks
    Venkat.O

  • Bdc recording for trancastion ME01

    Hi,
    Can u help me in BDC recording for transaction 'ME01' .
    I have no idea for transaction 'ME01'  & here i like to know how to handle table ctr during bdc recording?
    give sample code if possible.
    Thanks

    See the sample attached code for ME51 using table control.
    similarly record the same for ME01 and copy the TC logic from this.
    REPORT zmm_pr_upload_mat
    NO STANDARD PAGE HEADING
    LINE-SIZE 255.
    Standard Include for Selection Screen
    INCLUDE bdcrecx1.
    Internal Table for Upload Data
    DATA: BEGIN OF i_pr OCCURS 0,
    Header Screen
    sno(3), " SNo
    bsart(004), " PR Type
    epstp(001), " Item Category
    knttp(001), " Account Assignment
    eeind(010), " Delivery Date
    lpein(001), " Category of Del Date
    werks(004), " Plant
    lgort(004), " Storage Location
    ekgrp(003), " Purchasing Group
    matkl(009), " Material Group
    bednr(010), " Tracking No
    afnam(012), " Requisitioner
    Item Details
    matnr(018), " Material No
    menge(017), " Quantity
    badat(010),
    frgdt(010),
    preis(014), " Valuation Price
    waers(005), " Currency
    peinh(005),
    wepos(001),
    repos(001),
    sakto(010), " GL Account
    kostl(010), " Cost Center
    bnfpo(005),
    END OF i_pr.
    Internal Table for header Data
    DATA: BEGIN OF it_header OCCURS 0,
    sno(3), " SNo
    bsart(004), " PR Type
    epstp(001), " Item Category
    knttp(001), " Account Assignment
    eeind(010), " Delivery Date
    werks(004), " Plant
    lgort(004), " Storage Location
    ekgrp(003), " Purchasing Group
    matkl(009), " Material Group
    bednr(010), " Tracking No
    afnam(012), " Requisitioner
    END OF it_header.
    Internal Table for Item Data
    DATA: BEGIN OF it_item OCCURS 0,
    sno(3), " SNo
    matnr(018), " Material No
    menge(017), " Quantity
    preis(014), " Valuation Price
    sakto(010), " GL Account
    kostl(010), " Cost Center
    END OF it_item.
    Data Variables & Constants
    CONSTANTS : c_x VALUE 'X'. " Flag
    DATA : v_l(2), " Counter
    v_rowno(5), " Row No
    v_2(2), " Counter
    v_rows LIKE sy-srows, " Rows in TC
    v_field(45). " String
    Parameters
    PARAMETERS: p_file LIKE ibipparms-path. " 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.
    Open the BDC Session
    PERFORM open_group.
    Upload the File into internal Table
    CALL FUNCTION 'UPLOAD'
    EXPORTING
    filename = p_file
    filetype = 'DAT'
    TABLES
    data_tab = i_pr
    EXCEPTIONS
    conversion_error = 1
    invalid_table_width = 2
    invalid_type = 3
    no_batch = 4
    unknown_error = 5
    gui_refuse_filetransfer = 6
    OTHERS = 7.
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    SORT i_pr BY sno.
    LOOP AT i_pr.
    MOVE-CORRESPONDING i_pr TO it_item.
    APPEND it_item.
    CLEAR it_item.
    AT END OF sno.
    READ TABLE i_pr INDEX sy-tabix.
    MOVE-CORRESPONDING i_pr TO it_header.
    APPEND it_header.
    CLEAR it_header.
    ENDAT.
    ENDLOOP.
    SORT it_header BY sno.
    SORT it_item BY sno.
    v_rows = sy-srows - 6.
    Upload the Data from Internal Table
    LOOP AT it_header.
    Header Data
    PERFORM bdc_dynpro USING 'SAPMM06B' '0100'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'EBAN-BEDNR'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '/00'.
    PERFORM bdc_field USING 'EBAN-BSART'
    it_header-bsart.
    PERFORM bdc_field USING 'RM06B-EPSTP'
    it_header-epstp.
    PERFORM bdc_field USING 'EBAN-KNTTP'
    it_header-knttp.
    PERFORM bdc_field USING 'RM06B-EEIND'
    it_header-eeind.
    PERFORM bdc_field USING 'RM06B-LPEIN'
    it_header-lpein.
    PERFORM bdc_field USING 'EBAN-WERKS'
    it_header-werks.
    PERFORM bdc_field USING 'EBAN-LGORT'
    it_header-lgort.
    PERFORM bdc_field USING 'EBAN-EKGRP'
    it_header-ekgrp.
    PERFORM bdc_field USING 'EBAN-MATKL'
    it_header-matkl.
    PERFORM bdc_field USING 'EBAN-BEDNR'
    it_header-bednr.
    PERFORM bdc_field USING 'EBAN-AFNAM'
    it_header-afnam.
    Item Details
    v_l = 0.
    To add no. of rows
    v_2 = 0 .
    As the screen is showing 13 rows defaulted to 130
    v_rowno = 130 .
    LOOP AT it_item WHERE sno = it_header-sno.
    v_l = v_l + 1.
    IF v_l = 14 .
    IF v_2 = 12 .
    v_2 = 12 .
    v_l = 2 .
    From second time onwards it is displaying 12 rows only
    v_rowno = v_rowno + 120 .
    PERFORM bdc_dynpro USING 'SAPMM06B' '0106'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'RM06B-BNFPO'.
    PERFORM bdc_field USING 'RM06B-BNFPO'
    v_rowno.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '/00'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '/00'.
    ELSE.
    V_2 initialized to 12 for second screen purpose
    v_2 = 12 .
    v_l = 2 .
    PERFORM bdc_dynpro USING 'SAPMM06B' '0106'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'RM06B-BNFPO'.
    PERFORM bdc_field USING 'RM06B-BNFPO'
    v_rowno .
    PERFORM bdc_field USING 'BDC_OKCODE'
    '/00'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '/00'.
    ENDIF.
    ENDIF.
    PERFORM bdc_dynpro USING 'SAPMM06B' '0106'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '/00'.
    CLEAR v_field.
    CONCATENATE 'EBAN-MATNR(' v_l ')' INTO v_field.
    PERFORM bdc_field USING v_field it_item-matnr.
    CLEAR v_field.
    CONCATENATE 'EBAN-MENGE(' v_l ')' INTO v_field.
    PERFORM bdc_field USING v_field it_item-menge.
    PERFORM bdc_dynpro USING 'SAPMM06B' '0102'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'EBAN-PREIS'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '/00'.
    PERFORM bdc_field USING 'EBAN-PREIS'
    it_item-preis.
    PERFORM bdc_dynpro USING 'SAPMM06B' '0505'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'EBKN-SAKTO'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '=ENTE'.
    PERFORM bdc_field USING 'EBKN-SAKTO'
    it_item-sakto.
    Cost Center
    PERFORM bdc_dynpro USING 'SAPLKACB' '0002'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'COBL-KOSTL'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '=ENTE'.
    PERFORM bdc_field USING 'COBL-KOSTL'
    it_item-kostl.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '=ENTE'.
    ENDLOOP.
    PERFORM bdc_dynpro USING 'SAPMM06B' '0106'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'RM06B-BNFPO'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '=BU'.
    Call The Transaction
    PERFORM bdc_transaction USING 'ME51'.
    ENDLOOP.
    Close the BDC Session
    PERFORM close_group.
    reward if useful
    Regards
    Vasu

  • Error in bdc recording

    Hi guys,
    I am doing a bdc recording for transaction co02. when i got to CO02 transaction and give the order no and press enter.Then in the next screen if u go to menu Function-->Read pp master data, then a small pop-up screen will come.In that screen for the field prod version i m giving the data programtically(what ever i gave programtically it is displaying in that field).For example i gave the production version 2 for the production order z1.If the order Z1 doesn't have a production version 2 it is throwing a popup error message and it is not continuing any further.The next order is not exectued.It is stopping at the order Z1.If the order z1 has prod version 2 then it will accept and will continue to the next production order.
    I hope u understand my requirement.Everywhere i m passing the correct data to the required fields.I want to handle the popup error message programatically.
    Thanks
    dp.

    Hi,
    Here you have to know the message type, class, and number,  for the wrong production version.
    With the help of these values write and if condition to skip the pop up screen.
    Or do that production version checking manually for the given input before populating the values into the transaction.
    Try this and reply me if there is any queries

  • Want to output Error message in BDC recording(PA30)

    Hi all,
    Currently iam working on upload program,whic is done by BDC recording with transaction PA30.while loading the data to different infotypes,iam checking one condition
    in particular infotype,after that i need to give the error message(Type E) and i data should not get uploaded for that infotype,and it has to go to next infotype.i want to log this error also,how can i do this?

    The ERROR message will stop the processing of the program,  the message will need to be either an I(information) or a W(warning) message into for the program to continue processing.
    Log the message by writing it to an internal table.
    IF SOME_CONDITION = 'X'.
    MESSAGE W001(00) with 'Hey, here is a message'.
    itab-pernr = p_pernr.
    itab-msgid = '00'.
    itab-msgno = '001'.
    append itab.
    ENDIF.
    CALL TRANSACTION 'PA30'........
    Regards,
    Rich HEilman

  • BDC Recording for cm07 Transaction

    Hi Everyone,
    I'm doing BDC recording for CM07 transaction. In Recording, i need to give a print command  by specifying the spool title.
    For this, after opening the print window, i need to click the 'properties' button, and then select the spool title and input the value.
    But I'm unable to do the recording of this print dialog box. The recording ends as soon as I give the print command.
    Can anyone please tell me the solution to it.
    Thanks and Regards
    Rishika bawa

    Hi,
    See via transaction SHDB:
    SAPLCORU_S     0100     X
    BDC_OKCODE     BU
                                                           AFRUD-RUECK     0000000000
                                                           AFRUD-AUFNR     100051152
                                                           AFRUD-VORNR     0010
                                                           AFRUD-LMNGA     100,000
                                                           AFRUD-MEINH     PC
                                                           AFRUD-XMNGA     2,000
                                                           AFRUD-ISM01     200
                                                           AFRUD-ILE01     PC
    The table for confirmations is AFRU.
    Best regards,
    Leandro Mengue

  • Can we record two transactions and use for  a Call-transaction BDC?

    can we record two transactions and upload data using Call-transaction method in BDC ?IF not why?

    Hi Prakash,
    Here i used two transactions.
    REPORT zra_gl_cr NO STANDARD PAGE HEADING LINE-SIZE 255.
    TYPE-POOLS: truxs.
    DATA: it_raw TYPE truxs_t_text_data.
    DATA:messtab1 LIKE bdcmsgcoll OCCURS 0 WITH HEADER LINE.
    DATA:messtab LIKE bdcmsgcoll OCCURS 0 WITH HEADER LINE.
    DATA: bdcdata LIKE bdcdata OCCURS 0 WITH HEADER LINE.
    DATA: BEGIN OF i_mess OCCURS 0,
      l_mstring(480),
      msgnr(5),
      msgv1(15),
      END OF i_mess.
    DATA:i_mess1 LIKE i_mess OCCURS 0 WITH HEADER LINE.
    DATA: l_mstring(480),l_mstring1(480).
    DATA: BEGIN OF it_itab OCCURS 0,
          saknr(10),    "G/L a/c number.
          bukrs(4),     "Company Code.
          ktoks(4),     "G/L a/c group.
          xplacct(1),   "P&L statement account.
          xbilk(1),     "Balance sheet account.
          txt20_ml(20), "G/L a/c short text.
          txt50_ml(50), "G/L a/c long text.
          waers(5),     "Account currency.
          MWSKZ(2),
          mitkz(1),     "Reconciliation a/c for a/c type.
          xopvw(1),     "Open item management
          xkres(1),     "Line item display.
          zuawa(3),     "Sort Key.
          fstag(4),     "Field status group.
          xintb(1),     "Post automatically only.
          hbkid(5),     "House bank.
          hktid(5),     "Account id.
          vzskz(2),     "Interest indicator
          END OF it_itab.
    DATA: hdate LIKE sy-datum.
                          Selection Screen                       *****
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 5(15) text-103. " FOR FIELD P_FILE1.
    SELECTION-SCREEN POSITION 25.
    PARAMETERS : p_file1 LIKE rlgrap-filename.
    SELECTION-SCREEN END OF LINE.
                          Initialization                         *****
    INITIALIZATION.
                       At Selection Screen                       *****
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file1.
    Perform file_selection will help to select the location of the file
      PERFORM file_selection.
                       Start-Of-Selection                        *****
    START-OF-SELECTION.
    Perform data_upload will help to upload the data from the flat file
    to the internal table.
      PERFORM data_upload.
    PERFORM open_group.
       Peform bdc_upload will help to upload the data from the internal
       table into its respective fields.
    PERFORM bdc_fspo.
      PERFORM bdc_upload.
      PERFORM exp_log.
    PERFORM close_group.
       Perform display_log will prepare a log for the data that has been
       uploaded
       PERFORM display_log.
                        End-Of-Selection                           ****
    END-OF-SELECTION.
    *&      Form  file_selection
          To select the location of the file
    FORM file_selection .
      CALL FUNCTION 'WS_FILENAME_GET'
        EXPORTING
          def_filename     = ' '
          def_path         = 'C:\'
          mask             = ',.txt,.xls.'
          mode             = 'O'
          title            = 'Open a excel file'
        IMPORTING
          filename         = p_file1
        EXCEPTIONS
          inv_winsys       = 1
          no_batch         = 2
          selection_cancel = 3
          selection_error  = 4
          OTHERS           = 5.
    ENDFORM.                    " file_selection
    *&      Form  data_upload
         To upload the data from the file location to the internal table.
    FORM data_upload .
      CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
        EXPORTING
        I_FIELD_SEPERATOR        =
          i_line_header            =  'X'
          i_tab_raw_data           =  it_raw
          i_filename               =  p_file1
        TABLES
          i_tab_converted_data     = it_itab
       EXCEPTIONS
          conversion_failed        = 1
          OTHERS                   = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.                    " data_upload
    *&      Form  bdc_upload
    To upload the data from the internal table into its respective fields.
    FORM bdc_upload .
      LOOP AT it_itab.
    perform bdc_dynpro      using 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ACC_CRE'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'GLACCOUNT_SCREEN_KEY-SAKNR'.
    perform bdc_field       using 'GLACCOUNT_SCREEN_KEY-SAKNR'
                                  it_itab-SAKNR.
    perform bdc_field       using 'GLACCOUNT_SCREEN_KEY-BUKRS'
                                  it_itab-BUKRS.
    perform bdc_dynpro      using 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=2102_GROUP'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'GLACCOUNT_SCREEN_COA-KTOKS'.
    perform bdc_field       using 'GLACCOUNT_SCREEN_COA-KTOKS'
                                  it_itab-KTOKS.
    perform bdc_field       using 'GLACCOUNT_SCREEN_COA-XPLACCT'
                                  it_itab-XPLACCT.
    perform bdc_dynpro      using 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=2102_BS_PL'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'GLACCOUNT_SCREEN_COA-XBILK'.
    perform bdc_field       using 'GLACCOUNT_SCREEN_COA-KTOKS'
                                  it_itab-KTOKS.
    perform bdc_field       using 'GLACCOUNT_SCREEN_COA-XPLACCT'
                                 it_itab-XPLACCT.
    perform bdc_field       using 'GLACCOUNT_SCREEN_COA-XBILK'
                                  it_itab-XBILK.
    perform bdc_dynpro      using 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTER'.
    perform bdc_field       using 'GLACCOUNT_SCREEN_COA-KTOKS'
                                  it_itab-KTOKS.
    perform bdc_field       using 'GLACCOUNT_SCREEN_COA-XBILK'
                                  it_itab-XBILK.
    perform bdc_field       using 'GLACCOUNT_SCREEN_COA-TXT20_ML'
                                  it_itab-TXT20_ML.
    perform bdc_field       using 'GLACCOUNT_SCREEN_COA-TXT50_ML'
                                 it_itab-TXT50_ML.
    perform bdc_field       using 'BDC_CURSOR'
                                  'GLACCOUNT_SCREEN_COA-BILKT'.
    perform bdc_field       using 'GLACCOUNT_SCREEN_COA-BILKT'
                                  it_itab-saknr.
        PERFORM bdc_dynpro      USING 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=TAB02'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'GLACCOUNT_SCREEN_COA-KTOKS'.
        PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_COA-KTOKS'
                                       it_itab-ktoks.
        PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_COA-TXT20_ML'
                                       it_itab-txt20_ml.
        PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_COA-TXT50_ML'
                                       it_itab-txt50_ml.
        perform bdc_field       using 'BDC_CURSOR'
                                  'GLACCOUNT_SCREEN_COA-BILKT'.
    perform bdc_field       using 'GLACCOUNT_SCREEN_COA-BILKT'
                                  it_itab-saknr.
    perform bdc_dynpro      using 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=TAB02'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'GLACCOUNT_SCREEN_COA-KTOKS'.
    perform bdc_field       using 'GLACCOUNT_SCREEN_COA-KTOKS'
                                     it_itab-KTOKS.
    perform bdc_field       using 'BDC_CURSOR'
                                  'GLACCOUNT_SCREEN_COA-KTOKS'.
    perform bdc_field       using 'GLACCOUNT_SCREEN_COA-KTOKS'
                                  it_itab-KTOKS.
    perform bdc_field       using 'GLACCOUNT_SCREEN_COA-XBILK'
                                 it_itab-XBILK.
    perform bdc_field       using 'GLACCOUNT_SCREEN_COA-TXT20_ML'
                                  it_itab-TXT20_ML.
    perform bdc_field       using 'GLACCOUNT_SCREEN_COA-TXT50_ML'
                                  it_itab-TXT50_ML.
    perform bdc_field       using 'GLACCOUNT_SCREEN_COA-BILKT'
                                 it_itab-saknr.
    perform bdc_dynpro      using 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTER'.
    perform bdc_field       using 'GLACCOUNT_SCREEN_CCODE-WAERS'
                                  it_itab-waers.
    perform bdc_field       using 'GLACCOUNT_SCREEN_CCODE-MWSKZ'
                                  it_itab-MWSKZ.
    perform bdc_field       using 'GLACCOUNT_SCREEN_CCODE-MITKZ'
                                  it_itab-mitkz.
    perform bdc_field       using 'BDC_CURSOR'
                                  'GLACCOUNT_SCREEN_CCODE-XOPVW'.
    perform bdc_field       using 'GLACCOUNT_SCREEN_CCODE-XOPVW'
                                  it_itab-XOPVW.
    perform bdc_field       using 'GLACCOUNT_SCREEN_CCODE-XKRES'
                                  it_itab-XKRES.
    perform bdc_field       using 'GLACCOUNT_SCREEN_CCODE-ZUAWA'
                                 it_itab-ZUAWA.
        PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_COA-XPLACCT'
                                       it_itab-xplacct.
        PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_COA-XBILK'
                                       it_itab-xbilk.
           IF it_itab-xbilk = 'X'.
       PERFORM bdc_dynpro USING 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
       PERFORM bdc_field       USING 'BDC_OKCODE'
                                     '=TAB03'.
       PERFORM bdc_field       USING 'BDC_CURSOR'
                                     'GLACCOUNT_SCREEN_CCODE-WAERS'.
       PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_CCODE-WAERS'
                                      it_itab-waers.
         PERFORM bdc_field USING 'GLACCOUNT_SCREEN_CCODE-XOPVW'
                                  it_itab-xopvw.
         PERFORM bdc_field USING 'GLACCOUNT_SCREEN_CCODE-MITKZ'
                                  it_itab-mitkz.
       ENDIF.
       PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_CCODE-XKRES'
                                      it_itab-xkres.
       PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_CCODE-ZUAWA'
                                      it_itab-zuawa.
       PERFORM bdc_dynpro      USING 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
       PERFORM bdc_field       USING 'BDC_OKCODE'
                                     '=SAVE'.
       PERFORM bdc_field       USING 'BDC_CURSOR'
                                     'GLACCOUNT_SCREEN_CCODE-FSTAG'.
       PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_CCODE-FSTAG'
                                      it_itab-fstag.
       PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_CCODE-XINTB'
                                      it_itab-xintb.
       PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_CCODE-HBKID'
                                      it_itab-hbkid.
       PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_CCODE-HKTID'
                                      it_itab-hktid.
       PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_CCODE-VZSKZ'
                                      it_itab-vzskz.
    perform bdc_dynpro      using 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=TAB03'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'GLACCOUNT_SCREEN_CCODE-WAERS'.
    perform bdc_field       using 'GLACCOUNT_SCREEN_CCODE-WAERS'
                                  it_itab-WAERS.
    perform bdc_field       using 'GLACCOUNT_SCREEN_CCODE-MWSKZ'
                                  it_itab-MWSKZ.
    perform bdc_field       using 'GLACCOUNT_SCREEN_CCODE-MITKZ'
                                  it_itab-MITKZ.
    perform bdc_field       using 'GLACCOUNT_SCREEN_CCODE-ZUAWA'
                                 it_itab-ZUAWA.
    perform bdc_dynpro      using 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTER'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'GLACCOUNT_SCREEN_CCODE-FSTAG'.
    perform bdc_field       using 'GLACCOUNT_SCREEN_CCODE-FSTAG'
                                 it_itab-FSTAG.
    perform bdc_dynpro      using 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=SAVE'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'GLACCOUNT_SCREEN_CCODE-FSTAG'.
    perform bdc_field       using 'GLACCOUNT_SCREEN_CCODE-FSTAG'
                                  it_itab-FSTAG.
       PERFORM bdc_transaction USING 'FS00'.
        CALL TRANSACTION 'FS00' USING bdcdata MODE 'A'
                                              UPDATE 'S'
                                             MESSAGES  INTO messtab1.
        PERFORM mess1.
        REFRESH bdcdata[].
      ENDLOOP.
    ENDFORM.                    " bdc_upload
    *&      Form  bdc_fspo
          text
    FORM bdc_fspo .
      LOOP AT it_itab.
        PERFORM bdc_dynpro      USING 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=ACC_CRE'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'GLACCOUNT_SCREEN_KEY-SAKNR'.
        PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_KEY-SAKNR'
                                      it_itab-saknr.
        PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_KEY-KTOPL'
                                      '1000'.
        PERFORM bdc_dynpro      USING 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=2102_GROUP'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'GLACCOUNT_SCREEN_COA-KTOKS'.
        PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_COA-KTOKS'
                                      it_itab-ktoks.
        PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_COA-XPLACCT'
                                       it_itab-xplacct.
        PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_COA-XBILK'
                                      it_itab-xbilk.
        PERFORM bdc_dynpro      USING 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=SAVE'.
        PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_COA-KTOKS'
                                       it_itab-ktoks.
        PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_COA-XPLACCT'
                                       it_itab-xplacct.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'GLACCOUNT_SCREEN_COA-TXT50_ML'.
        PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_COA-TXT20_ML'
                                       it_itab-txt20_ml.
        PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_COA-TXT50_ML'
                                       it_itab-txt50_ml.
    *perform bdc_transaction using 'FSP0'.
        CALL TRANSACTION 'FSP0' USING bdcdata MODE 'A'
                                              UPDATE 'S'
                                             MESSAGES  INTO messtab.
        PERFORM mess.
        REFRESH bdcdata[].
      ENDLOOP.
    ENDFORM.                    " bdc_fspo
    *&      Form  mess
          text
    -->  p1        text
    <--  p2        text
    FORM mess .                                                 "fsp0
      LOOP AT messtab.
        CALL FUNCTION 'FORMAT_MESSAGE'
          EXPORTING
            id        = messtab-msgid
            lang      = messtab-msgspra
            no        = messtab-msgnr
            v1        = messtab-msgv1
            v2        = messtab-msgv2
            v3        = messtab-msgv3
            v4        = messtab-msgv4
          IMPORTING
            msg       = l_mstring
          EXCEPTIONS
            not_found = 1
            OTHERS    = 2.
        CONDENSE l_mstring.
        i_mess1-l_mstring = l_mstring(250).
        i_mess1-msgnr = messtab1-msgnr.
        i_mess1-msgv1 = messtab1-msgv1.
        APPEND i_mess1.
      ENDLOOP.
    ENDFORM.                    " mess
    *&      Form  mess1
          text
    -->  p1        text
    <--  p2        text
    FORM mess1 .                                                "fs00
      LOOP AT messtab1.
        CALL FUNCTION 'FORMAT_MESSAGE'
          EXPORTING
            id        = messtab1-msgid
            lang      = messtab1-msgspra
            no        = messtab1-msgnr
            v1        = messtab1-msgv1
            v2        = messtab1-msgv2
            v3        = messtab1-msgv3
            v4        = messtab1-msgv4
          IMPORTING
            msg       = l_mstring1
          EXCEPTIONS
            not_found = 1
            OTHERS    = 2.
        CONDENSE l_mstring1.
        i_mess-l_mstring = l_mstring1(250).
        i_mess-msgnr = messtab1-msgnr.
        i_mess-msgv1 = messtab1-msgv1.
        APPEND i_mess.
      ENDLOOP.
    ENDFORM.                                                    " mess1
    *&      Form  exp_log
          text
    -->  p1        text
    <--  p2        text
    FORM exp_log .
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename = 'c:\temp\error_fsp0.txt'
          filetype = 'DAT'
        TABLES
          data_tab = i_mess1.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename = 'c:\temp\error_fs00.txt'
          filetype = 'DAT'
        TABLES
          data_tab = i_mess.
    ENDFORM.                    " exp_log
    *&      Form  bdc_dynpro
          text
         -->PROGRAM    text
         -->DYNPRO     text
    FORM bdc_dynpro USING program dynpro.
      CLEAR bdcdata.
      bdcdata-program  = program.
      bdcdata-dynpro   = dynpro.
      bdcdata-dynbegin = 'X'.
      APPEND bdcdata.
    ENDFORM.                    "BDC_DYNPRO
           Insert field                                                  *
    FORM bdc_field USING fnam fval.
      CLEAR bdcdata.
      bdcdata-fnam = fnam.
      bdcdata-fval = fval.
      APPEND bdcdata.
    ENDFORM.                    "BDC_Field
    ********Rewards some points.

  • Can BDC recording work for transactions enhanced by GUIXT ?

    Hi,
    We have some transactions enhanced by GUIXT in 4.7 release.
    We want to do BDC on these transactions. The BDC is to run in background.
    Does anyone know if SHBD recordings of these transactions (with GUIXT enabled )
    can be used in the code? Are there any special issues due to these GUIXT modified
    transactions?
    Thanks

    Hi,
    Key point to take care:
    1) When recording run the recording in default screen mode.
    2) If Call transaction Method:
       Use options additio with the Call transaction.
    Ex:
    data: t_opt type CTU_PARAMS.
    Recording..
    t_opt-DEFSIZE = 'X'.
    Call transaction 'XXX' options t_opt.
    3) Session:
    Check the Dynpro standard size checkbox.
    This are the improtant this to take care of.
    thanks.

  • Error while running a BDC for the Transaction F-02

    Hi,
           I'm getting an error <b><i>"Parking not possible during Batch Input"</i></b> while running a BDC for the transaction F-02.
           When i click on the error message it displays the message [b<i>]"In Customizing, you can control whether an error message is issued."</b></i>
            How to solve this issue?.
            Waiting for ur replies.........
    Regards
    N.Senthil

    Hi,
    When you are doing the recording in SHDB, and in the same screen where the TCODE to be recorded is given, there are options that you can choose called "Recording Parameters"...Select the checkbox which says "Not a Batch Input Session", this will set the sy-binpt variable to " "(in a recording by default it is "X")...and you will not get this error...
    Also make sure while writing the BDC program to make use of the "bdc options" parameter which has this property to switch of sy-binpt...
        Refer below theard for sample bdc code for f-02.
    https://forums.sdn.sap.com/click.jspa?searchID=5126766&messageID=1538409
    Regards

  • Problem in creating a BDC program for transaction cj20n(project sytem)

    Hi all,
    I am trying to create project,WBS element ,network and activity using a BDC program,
      I am able to create to a recording for the transaction cj20n using tcode shdb but when i run the recording it doesnt run properly i am not able to create any thing.
    I get error saying that a particular field doesnt exist on the screen.
    Is possible to create a BDC program for transaction CJ20N ?
    Also is there any other alternative  apart from using a BAPI or a function module.
    Thanks,
    Nishant

    Hi,
        Check below link for BAPIs of transaction cj20n.
    [BAPI for cj20n|BAPI for CJ20N transaction]
    Thanks,
    Asit Purbey.

  • Problem in BDC Recording

    Hi I am having a problem in BDC Recording. My requirement is that when I input data in transaction fb02 to block the invoices, It shows a list of invoices. Now i need to double click that item(line) in which PK = 06 at runtime during bdc recording. During BDC recording it takes the line number on which we have clicked which is constant but i want it dynamic that if item 1 is having PK=6, that line should be double clicked and if item 3 is having PK=6, the third item should be double clicked to open another screen. Kindly help me... Thanks in advance.

    Hi Ravi,
    While writing your code that is in your code you know which line number is having the PK = 06, then you can use the same line number and add the code for double click after that.
    Regards,
    Atish

  • What is the tcode for bdc recording and how to do in hr-abap for pa and om

    hi,
         I need to do the bdc recording for pa and om. So, can any of you tell me how to do and what are the tcodes we have to use.
    thanks & regards,
        Sekhar.

    Hi ,
    Here is the link from you will get all the transaction code
    http://www.sap-basis-abap.com/saphr004.htm
    As far PA specfic some tcodes are given below
    PA20  Display HR Master Data
    PA30  Maintain HR Master Data
    PA40  Personnel Actions
    PA41  Correct Actions
    PA42  Fast Entry for Actions
    PA46  Import from Resumix
    PA47  Export to Resumix
    PA48  Hiring from non-SAP system
    PA51  Display Time Data
    PA53  Display Time Data
    PA61  Maintain Time Data
    PA62  List Entry of Additional Data
    PA63  Maintain Time Data
    PA64  Calendar Entry
    PA70  Fast Entry
    PA71  Fast Entry of Time Data
    PA88  Benefits
    For OM specific
    PP01  Maintain Plan Data (menu-guided)

  • How to use BDC recording in Workflow.

    Hi experts,
    Anyone kindly help me for the following case...
    If sales order gets created, mail has to be sent to every user. Also for that sales order, delivery should be created in background and again mail has to be sent to all users...
    I m clear with sending mail. but i m struggled while creating delivery in background. i dont know how to do this. I hav an idea that it can be created using BDC recording and this recording program can be called in our method which is created in our business object.
    How to create a single BDC recording to create sales order as well as creating delivery in background... Is it possible to do like this. Or is there any function module to create delivery in background with respect to sales order number?
    kindly give some suggestion and step by step procedure to do this...
    Thanks in advance...
    Regards
    Raaams...

    Hi Ram
    Check this BAPI once BAPI_OUTB_DELIVERY_CREATE_SLS.
    If this doesnt help do BDC recording and create a FM with the help of BDC recording. Please note that Call Transaction should happen in background otherwise your BDC wont work.
    Please revert back if you have any queries.
    Regards,
    Gautham Paspala

Maybe you are looking for