BDC call

Hi Guys;
I have recorded a bdc for tansaction VA01 to create sales order. When I run the bdc my item, material, quantity and so on are not comming through but the rest is working can anyone help

Hi,
    check this .
    LOOP AT it_sales_item INTO wa_sales_item WHERE bstkd = wa_sales_header-bstkd.
      if count eq 5.
       count = 1.
       PERFORM bdc_field       USING 'BDC_OKCODE'
                                     '/00'.
       PERFORM bdc_dynpro      USING 'SAPMV45A' '4001'.
     endif.
      count = count + 1.
      MOVE count TO count_char.
      CONCATENATE 'RV45A-MABNR('  count_char ')' INTO l_matnr.
      CONCATENATE 'VBAP-POSNR('   count_char ')' INTO l_posnr.
      CONCATENATE 'RV45A-KWMENG(' count_char ')' INTO l_kwmeng.
      CONCATENATE 'VBAP-WERKS('   count_char ')' INTO l_werks.
      CONCATENATE 'VBAP-LGORT('   count_char ')' INTO l_sloc.
      PERFORM bdc_field       USING 'VBKD-BSTKD'
                                     wa_sales_header-bstkd.
      PERFORM bdc_field       USING 'KUAGV-KUNNR'
                                     wa_sales_header-kunnr.
      PERFORM bdc_field       USING 'KUWEV-KUNNR'
                                     wa_sales_header-kunnr.
      PERFORM bdc_field       USING l_matnr
                                    wa_sales_item-matnr.
      PERFORM bdc_field       USING l_posnr
                                    wa_sales_item-posnr.
      PERFORM bdc_field       USING l_kwmeng
                                    wa_sales_item-kwmeng.
      PERFORM bdc_field       USING l_werks
                                    wa_sales_item-werks.
      PERFORM bdc_field       USING l_sloc
                                    wa_sales_item-lgort.
    ENDLOOP.

Similar Messages

  • BDC Call Transaction - Doc.No not getting generated in Message Internal tab

    Dear All,
    I am using BDC Call Transaction method for uploading data for transaction, Iam able to successfully capture the Error messages, sucess messages and the transaction number is also displayed for the bdc run in Mode A, but in case of scheduling the job in background, the Error messages are displayed but the transaction number is not captured in the message Internal table( BDCMSGCOLL).
    Kindly look into the matter and revert back for any further info.
    Regards
    Naresh

    Hi,
    Please try using the following kind of code in 'CALL TRANSACTION'
        opt-dismode = 'E'.     " Exclusive mode
        opt-defsize = 'X'.
        opt-updmode = 'S'.
        opt-nobinpt = ' '.
        CALL TRANSACTION transaction_code USING ft OPTIONS FROM opt
                                                                             MESSAGES INTO t_bdcmsgcoll .
    Hope this will work.
    Thanks,
    Leo

  • Improve performance of bdc call transaction

    Hi all,
    I am performing a batch update of tax codes in a BDC call transaction program. This particular code takes about 3 minutes to process 2,600 entries. I have tried almost everything but is there a way to improve / make it run faster?
    I have a feeling it has something to do with the form "do_transaction", but I really don't know anymore.
    Thank you in advance.
    Attached is the code:
    *& Report  ZFI_CHANGEWTAX
    *&  Description: Change Doctors Withholding Tax Code (EI)
    *&  Using BDC Call Transaction Method
    *&  Created by : mpena
    *&  Created on : 07/15/2009
    *&  Modification History
    *&  Seq  Changed on
    *&       Changed by
    *&  001   07/15/2009
    *&        mpena         Initial Development
    *&  002   07/20/2009
    *&        mpena         Logic modification
    *&                      Testing
    *&  003   07/20/2009
    *&        mpena         Call function parameter modification
    *&  004   07/22/2009
    *&        mpena         Report generation
    *&                      Performance improvements
    REPORT zfi_changewtax
           NO STANDARD PAGE HEADING
           MESSAGE-ID zfk02msg.
    TYPES: BEGIN OF t_tax,
           lifnr LIKE lfa1-lifnr,                "account number
           wt_withcd LIKE lfbw-wt_withcd,        "current tax code
           wt_withcd_new LIKE lfbw-wt_withcd,    "new tax code (left blank at default)
           END OF t_tax.
    DATA:  wa_tax TYPE t_tax,
           i_tax TYPE STANDARD TABLE OF t_tax,
           it_bdcdata TYPE bdcdata OCCURS 0 WITH HEADER LINE,
           lin TYPE i.
    -------Selection Screen Design -
    SELECTION-SCREEN:
    SKIP 1,
    BEGIN OF BLOCK blk1 WITH FRAME TITLE aaa.
    PARAMETERS: p_ktokk LIKE lfa1-ktokk DEFAULT 'DOCT' OBLIGATORY,
                p_bukrs LIKE lfbw-bukrs DEFAULT 'SL' OBLIGATORY,
                p_wtax LIKE lfbw-wt_withcd OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK blk1.
    INITIALIZATION.
      aaa = 'Change Tax Code to specified value'.
    TOP-OF-PAGE.
      WRITE:
      / 'Update of taxes successful on:', sy-datum, sy-uzeit,
      / 'Generated by:', sy-uname,
      / 'Company Code:', p_bukrs, 'Vendor Group:', p_ktokk.
      SKIP 1.
      ULINE.
      WRITE:
      / 'Account Number', 20 'Old Withholding Tax Code', 50 'New Withholding Tax Code'.
      ULINE.
    START-OF-SELECTION.
      SELECT lfa1~lifnr
             lfbw~wt_withcd
      INTO TABLE i_tax
      FROM lfa1 INNER JOIN lfbw
        ON lfa1lifnr = lfbwlifnr
        WHERE lfbw~bukrs EQ p_bukrs
        AND lfbw~witht EQ 'EI'.
      IF sy-subrc EQ 0.
        DESCRIBE TABLE i_tax LINES lin.
      ENDIF.
    Update i_tax with new value of wt_witchd, then display for comparison.
    After write: if old and new tax are the same, tax update was not successful for that specific account
    or inputted tax type is the same as the old one.
      LOOP AT i_tax INTO wa_tax.
        wa_tax-wt_withcd_new = p_wtax.
        MODIFY i_tax FROM wa_tax.
        WRITE:
        / wa_tax-lifnr,
        20 wa_tax-wt_withcd,
        50 wa_tax-wt_withcd_new.
        CLEAR wa_tax.
      ENDLOOP.
      PERFORM do_transaction USING p_bukrs p_wtax.
    *&      Form  do_transaction
         Extracted from ZFKO2 recording accessible in shdb.
    FORM do_transaction USING v_bukrs v_wtax.
      MESSAGE i000 WITH lin.
      LOOP AT i_tax INTO wa_tax.
        REFRESH it_bdcdata.
        PERFORM bdc_dynpro      USING 'SAPMF02K' '0106'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RF02K-D0610'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_field       USING 'RF02K-LIFNR'
                                      wa_tax-lifnr.
        PERFORM bdc_field       USING 'RF02K-BUKRS'
                                      v_bukrs.
        PERFORM bdc_field       USING 'RF02K-D0610'
                                      'X'.
        PERFORM bdc_dynpro      USING 'SAPMF02K' '0610'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'LFBW-WT_WITHCD(01)'.
        PERFORM bdc_field       USING 'LFB1-QLAND'
                                      'PH'.
        PERFORM bdc_field       USING 'LFBW-WT_WITHCD(01)'
                                      v_wtax.
        PERFORM bdc_dynpro      USING 'SAPMF02K' '0610'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=UPDA'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'LFB1-QLAND'.
        PERFORM bdc_field       USING 'LFB1-QLAND'
                                      'PH'.
        CALL TRANSACTION 'FK02' USING it_bdcdata
                                MODE   'N'
                                UPDATE 'A'.
      ENDLOOP.
      MESSAGE i001.
    ENDFORM.                    "do_transaction
           form for bdc dynpro
    FORM bdc_dynpro USING program
                          dynpro.
      it_bdcdata-program = program.
      it_bdcdata-dynpro = dynpro.
      it_bdcdata-dynbegin = 'X'.
      APPEND it_bdcdata.
      CLEAR it_bdcdata.
    ENDFORM.                    "bdc_dynpro
           form for bdc field
    FORM bdc_field  USING fnam
                          fval.
      it_bdcdata-fnam = fnam.
      it_bdcdata-fval = fval.
      APPEND it_bdcdata.
      CLEAR it_bdcdata.
    ENDFORM.                    "bdc_field

    You might want to try using a BAPI instead of a call transaction.   I believe "BAPI_VENDOR_SAVECHARVALREPLICA" will work for you.  Calling a BAPI is just like calling a function module.   After you call the bapi remember to commit it with the function module "BAPI_TRANSACTION_COMMIT".

  • Error While Uploading Material Master Through Bdc Call Transaction

    Hi Sap Gurus,
    I am doing Bdc call Transaction for Material Master Uploading.
    But After Entering data for 4-5 screen i got a error_
    Field Mara-iprkz doesn,t exit in the screen saplmgmm 4000
    Field Mara-prctr doesn,t exit in the screen saplmgmm 4000
    Field Mbew-stprs doesn,t exit in the screen saplmgmm 4000
    Field Marc-mtvfe doesn,t exit in the screen saplmgmm 4000
    Enter Valuation class.
    This is my Programme....................................
    <removed by moderator>
    Thanks in advance.
    Arindam
    Moderator message: please post only relevant code parts, your post must be less than 5000 characters to preserve formatting.
    Edited by: Thomas Zloch on Apr 16, 2011 9:29 PM

    Sorry for my obvious answer, but you should ask a more precise question.
    Your errors are that you try to enter fields but they don't exist, so it sounds logic.
    And the error "Enter Valuation class." means that the field is mandatory. So you must enter it.
    Re-record the transaction using SHDB (eventually play with the http://wiki.sdn.sap.com/wiki/display/ABAP/Recordduringplay), run it in A display mode, and correct your program.
    Sandra
    perform bdc_dynpro      using 'SAPLMGMM' '4000'.
    perform bdc_field       using 'MVKE-SKTOF'
                                  'X'.
    perform bdc_dynpro      using 'SAPLMGMM' '4000'.
    perform bdc_field       using 'MARC-PRCTR'
                                  wa_mara-prctr."'MUMBAI'.
    perform bdc_dynpro      using 'SAPLMGMM' '4000'.
    perform bdc_field       using 'MARA-IPRKZ'
                                  'D'.

  • BDC call transaction

    Hi All,
      Help needed. Im facing a problem in BDC call transaction. Im calling a z screen ie i have developed a modulepool prog. In this I have given a zscreen.
    Now by using a call transasction method im calling this screen ie the zscreen and i  want to update a z table through a flat file.
    the system is able to read the flat file and then im able to read it in my internal table. after this im transfering this internal table content in the BDCtable it is even taking it up but then when im calling the command:
    CALL TRANSACTION 'YVTRANS' USING jtab MODE 'A' UPDATE 'S' MESSAGES INTO ktab.
    It takes me to the screen connected by the ztcode yvtrans. but no data is coming in the screen . and then vn im inserting the content but nothing happens wat could be the probable error.
    This is my code:
    *& Report  ZBDCCALLTXN1
    REPORT  zbdccalltxn1.
    *& Report  ZBDCCALLTXN
    *REPORT  zbdccalltxn.
    PREDEFINED TABLES ***
    TABLES:zemp.
    INTERNAL TABLE TO UPLOAD FLAT FILE ***
    DATA:BEGIN OF itab OCCURS 0,
         empno LIKE zemp-empno,
         name LIKE zemp-empname,
         deptno LIKE zemp-deptid,
         deptname LIKE zemp-deptname,
         END OF itab.
    INTERNAL TABLE FOR MAPPING USING BDCDATA ***
    DATA:BEGIN OF jtab OCCURS 0.
            INCLUDE STRUCTURE bdcdata.
    DATA:END OF jtab.
    INTERNAL TABLE FOR ERROR CAPTURING USING BDCMSGCOLL ***
    DATA:BEGIN OF ktab OCCURS 0.
            INCLUDE STRUCTURE bdcmsgcoll.
    DATA:END OF ktab.
    FUNCTION MODULE TO UPLAOD FLAT FILE ***
    CALL FUNCTION 'UPLOAD'
      EXPORTING
        filename                      = 'C:\Documents and Settings\mad13363\Desktop\file.txt'
       filetype                      = 'ASC'
                       HAS_FIELD_SEPARATOR           = ' '
                       HEADER_LENGTH                 = 0
                       READ_BY_LINE                  = 'X'
                       DAT_MODE                      = ' '
                       CODEPAGE                      = ' '
                       IGNORE_CERR                   = ABAP_TRUE
                       REPLACEMENT                   = '#'
                       CHECK_BOM                     = ' '
                       VIRUS_SCAN_PROFILE            =
                     IMPORTING
                       FILELENGTH                    =
                       HEADER                        =
      TABLES
        data_tab                      = itab
    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.
    READ DATA FROM ITAB ***
    LOOP AT itab.
      REFRESH jtab.
      PERFORM sub USING 'YVTRANS' '0100'.
    TRANSFER THE DATA FROM INTERNAL TABLE TO APLLICATION ***
      PERFORM sub1.
    TO SAVE THE RECORDS IN DB SERVER ***
    PERFORM sub1 USING 'BDC_OKCODE' 'INSERT'.
    LOGIC TO PROVIDE VALIDATIONS USING BDCDATA, DISPLAY MODE, BDCMSGCOLL ***
      CALL TRANSACTION 'YVTRANS' USING jtab MODE 'A' UPDATE 'S' MESSAGES INTO ktab.
    LOGIC REQUIRED FOR LOG FILE ***
      LOOP AT ktab.
        IF ktab-msgtyp = 'I' OR
            ktab-msgnr = 000.
          WRITE:/1 'VENDOR', 15 itab-empno, 30 'INSERTED'.
        ELSEIF ktab-msgtyp = 'E' OR
                  ktab-msgnr = '001'.
          WRITE:/1 'VENDOR', 15 itab-empno, 30 'NOT INSERTED'.
        ENDIF.
      ENDLOOP.
      REFRESH ktab.
    ENDLOOP.
    FROM TO PASS  PRG NAME, SCREEN NUMBER AND FIRST SCREEN ***
    FORM sub USING a b.
      CLEAR jtab.          " CLEAR REFRESHES WORK AREA
      jtab-program = a.
      jtab-dynpro = b.
      jtab-dynbegin = 'X'.
      APPEND jtab.
    ENDFORM.                    "SUB
    FROM TO PASS FEILD NAME AND FIELD VALUE ***
    FORM sub1.
      CLEAR jtab.
      jtab-fnam = 'zemp-EMPNO'.
      jtab-fval = itab-empno.
      jtab-program = 'YVTRANS'.
      jtab-dynpro = '0100'.
      APPEND jtab.CLEAR jtab.
    *Passing screen information to BDCDATA
      jtab-fnam = 'ZEMP-EMPNAME'.
      jtab-fval = itab-name.
      jtab-program = 'YVTRANS'.
      jtab-dynpro = '0100'.
      APPEND jtab.CLEAR jtab.
      jtab-fnam = 'ZEMP-DEPTID'.
      jtab-fval = itab-deptno.
      jtab-program = 'YVTRANS'.
      jtab-dynpro = '0100'.
      APPEND jtab.CLEAR jtab.
      jtab-fnam = 'ZEMP-DEPTNAME'.
      jtab-fval = itab-deptname.
      jtab-program = 'YVTRANS'.
      jtab-dynpro = '0100'.
      APPEND jtab.CLEAR jtab.
    *Passing BDC_OKCODE to BDCDATA
      jtab-fnam = 'BDC_OKCODE'.
      jtab-fval = 'INSERT'.
      APPEND jtab.CLEAR jtab.
    ENDFORM.                                                    "sub1
    reward for all useful ans

    Hi madhvi,
                       You are using jtab within the form.. i dont think you can use it directly inside ur FORM sub1 without declaring it or without passing it. and it will give you the syntax error.
    and please send me the step by step code you have written in editor so that i can check it and can reply you with proper solution'
    Thanks ,
    Prasanna

  • Error in BDC CALL TRANSACTION METHOD..

    hai i got an error in  doing BDC  CALL TRANSACTION METHOD
    Error:diffrent number of parameters in  FORM  and PERFORM(routine :FILL_SCREEN_DETAILS:,number of formal parameters :3,number of actual parameters:1)
    PROGRAM
    REPORT  ZDEMO_UPLOAD_COST_CENTER_DATA.
    DATA:BEGIN OF WA_DATA,
    KOKRS TYPE KOKRS,"CONTROLLING AREA
    KOSTL TYPE KOSTL,"COST CENTER
    DATAB TYPE DATAB,"START DATE
    DATBI TYPE DATBI,"END DATE
    KTEXT TYPE KTEXT,"NAME
    LTEXT TYPE LTEXT,"DESCRIPTION
    VERAK TYPE VERAK,"PERSON RESPONSIBLE
    KOSAR TYPE KOSAR, "COST CENTER CATEGORY
    KHINR TYPE KHINR,"HIERARCHY AREA
    BUKRS TYPE BUKRS,"COMPANY CODE
    GSBER TYPE GSBER,"BUISINESS AREA
    END OF WA_DATA.
    *TYPES:IT_DATA TYPE STANDARD TABLE OF TY_DATA.
    DATA:IT_DATA LIKE TABLE OF WA_DATA,
          IT_BDCDATA LIKE TABLE OF BDCDATA,
          WA_BDCDATA LIKE LINE OF IT_BDCDATA,
          IT_BDCMSGCOLL LIKE TABLE OF BDCMSGCOLL,
          WA_BDCMSGCOLL LIKE LINE OF IT_BDCMSGCOLL.
    DATA :V_FILE TYPE STRING.
    CONSTANTS :C_KS01(4) TYPE C  VALUE 'KS01',
                C_X(1) TYPE C VALUE 'X',
                C_A(1) TYPE C VALUE 'A'.
    SELECTION-SCREEN:BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-000.
    PARAMETER :PA_FILE LIKE FC03TAB-PL00_FILE OBLIGATORY.
    SELECTION-SCREEN:END OF BLOCK B1.
    *AT SELECTION SCREEN ON VALUE REQUEST
    * EVENT TO BE TRIGGERED WHEN WE PRESS F4.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR PA_FILE.
    PERFORM GET_F4_FOR_FILE USING PA_FILE.
    *         START-OF-SELECTION
    START-OF-SELECTION.
    *WE NEED TO MOVE THE PA_FILE INTO ANOTHER VARIABLE OF TYPE STRING
    *AS WE ARE GOING TO USE THE SAME IN THE FM:GUI_UPLOAD THERE THE FILE TYPE IS STRING
    V_FILE = PA_FILE.
    PERFORM UPLOAD_FILE_T0_ITAB USING V_FILE CHANGING IT_DATA.
    *FILL THE SCREEN AND FIELD DETAILS
    LOOP AT IT_DATA INTO WA_DATA.
    REFRESH IT_BDCDATA.
    *FIRST SCREEN DETAILS
    PERFORM FILL_SCREEN_DETAILS USING 'SAPLKMA1''0200''X'.
    *CURSOR DETAILS
    PERFORM FILL_FIELD_DETAILS USING 'BDC_CURSOR''CSKSZ-KOKRS'.
    *OK CODE DETAILS
    PERFORM FILL_FIELD_DETAILS USING 'BDC_OKCODE''/00'.
    *CONTROLLING AREA
    PERFORM FILL_FIELD_DETAILS USING 'CSKSZ-KOKRS' WA_DATA-KOKRS.
    *COST CENTER DETAILS
    PERFORM FILL_FIELD_DETAILS USING 'CSKSZ-KOSTL' WA_DATA-KOSTL.
    * START DATE
    PERFORM FILL_FIELD_DETAILS USING 'CSKSZ-DATAB_ANFO' WA_DATA-DATAB.
    *END DATE
    PERFORM FILL_FIELD_DETAILS USING 'CSKSZ-DATBI_ANFO' WA_DATA-DATBI.
    *NEXT SCREEN DETAILS
    PERFORM FILL_SCREEN_DETAILS USING 'SAPLKMA1''0299''X'.
    *OKCODE DETAILS
    PERFORM FILL_FIELD_DETAILS USING 'BDC_OKCODE''=BU'.
    *SUBSCRN FIELD DETAILS
    PERFORM FILL_FIELD_DETAILS USING 'BDC_SUBSCR''BDC-SUBSCR'.
    *CURSOR DETAILS
    PERFORM FILL_FIELD_DETAILS USING 'BDC_CURSOR''CSKSZ-WAERS'.
    *NAME
    PERFORM FILL_FIELD_DETAILS USING 'CSKSZ-KTEXT' WA_DATA-KTEXT.
    *DESCRIPTION
    PERFORM FILL_FIELD_DETAILS USING 'CSKSZ-LTEXT' WA_DATA-LTEXT.
    *PERSON RESPONSIBLE
    PERFORM FILL_FIELD_DETAILS USING 'CSKSZ-VERAK' WA_DATA-VERAK.
    *COST CENTER CATEGORY
    PERFORM FILL_FIELD_DETAILS USING'CSKSZ-KOSAR' WA_DATA-KOSAR.
    *HIERARCHY AREA
    PERFORM FILL_FIELD_DETAILS USING 'CSKSZ-KHINR' WA_DATA-KHINR.
    *COMPANY CODE
    PERFORM FILL_FIELD_DETAILS USING 'CSKSZ-BUKRS' WA_DATA-BUKRS.
    *BUISINESS AREA
    PERFORM FILL_FIELD_DETAILS USING 'CSKSZ-GSBER' WA_DATA-GSBER.
    *CALL THE TRANSACTION
    CALL TRANSACTION C_KS01 USING IT_BDCDATA
                              MODE C_A "ALL SCREENS
                                       "N-NO SCREENS
                                       "E-ERROR SCREENS ONLY
                              UPDATE 'A' "ASYNCHRONOUS
                                          "SYNCHRONOUS
                              MESSAGES INTO IT_BDCMSGCOLL.
    ENDLOOP.
    * FORM FILL SCREEN_DETAILS
    FORM FILL_SCREEN_DETAILS  USING PROGRAM LIKE BDCDATA-PROGRAM
                           DYNPRO LIKE BDCDATA-DYNPRO
                           DYNBEGIN LIKE BDCDATA-DYNBEGIN.
    CLEAR WA_BDCDATA.
    WA_BDCDATA-PROGRAM = PROGRAM.
    WA_BDCDATA-DYNPRO = DYNPRO.
    WA_BDCDATA-DYNBEGIN = DYNBEGIN.
    APPEND WA_BDCDATA TO IT_BDCDATA.
    ENDOFRM.
    * FORM FILL_FIELD_DETAILS
    FORM FILL_FIELD_DETAILS USING FNAM FVAL.
    CLEAR WA_BDCDATA.
    WA_BDCDATA-FNAM = FNAM.
    WA_BDCDATA-FVAL = FVAL.
    APPEND WA_BDCDATA TO IT_BDCDATA.
    ENDFORM.
    * FORM GETE_F4_FOR_FILE
    *DISPLAY ALL THE  FILES IN THE SYSTEM FOR SELECTION
    *P_PA_FILE NAME OF THE FILE
    FORM GET_F4_FOR_FILE USING P_PA_FILE.
    CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
    *  EXPORTING
    *    PROGRAM_NAME        = SYST-REPID
    *    DYNPRO_NUMBER       = SYST-DYNNR
        FIELD_NAME          = 'PA_FILE'
    *    STATIC              = ' '
    *    MASK                = ' '
       CHANGING
         FILE_NAME           = PA_FILE.
    *  EXCEPTIONS
    *    MASK_TOO_LONG       = 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.
    * FORM UPLOAD_FILE_TO_ITAB
    * FP_V_FILE = FILE NAME
    *FP_IT_DATA =  INTERNAL TABLE TO STORE THE DATA
    FORM UPLOAD_FILE_TO_ITAB USING FP_V_FILE CHANGING FP_IT_DATA LIKE IT_DATA.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        FILENAME                      = FP_V_FILE
      HAS_FIELD_SEPARATOR           = ' X'
      TABLES
        DATA_TAB                      =FP_IT_DATA.
    ENDFORM.
    Edited by: saifudheenc on Aug 7, 2010 5:09 PM

    hi
    try to add spaces between parameters :
    example:
    PERFORM FILL_SCREEN_DETAILS USING 'SAPLKMA1' '0200' 'X'.
    regards,darek

  • BDC Call to IW22

    am using the user exit EXIT_SAPMIWO0_020 quiet sucessfully to reverse a material document using MBST and writing the details of the notification to a custom table when a user has cancelled a PM notification (Definition of a cancelled notification is when the TPLNR, EQUNR and BAUTL field are all = to SPACE) and saved it.
    I have then written a BDC program to call IW22 and de-allocate any associated orders and set the status NOCO and DLFL to prepare them for archive based on a search of a custom table. This program will be set up to run overnight to capture any notifications cancelled that day and process them accordingly.
    The difficulty I am having is with the BDC calling Fcode WOAB, if I run through the BDC in Mode A and debug it, it works fine. The program displays each screen in turn as expected and completes without any errors.
    If I run through it in mode E and debug, the program stops at the point where WOAB is called and I get the error message 00 344 "No batch input data for screen & & "
    If I run the program with Mode N and outside debug the BDC the program does not carry out the de-allocation of the order.
    I checked my MESSTAB in my program in Mode E and got message 00 344 "No batch input data for screen & & ", but I cannot see where or what the screen needs to process it.
    I have also searched OSS with the FCode WOAB and came across 1 likely note but it applies to version 4.xx we are only on 3.1i, the function module referenced in the note does not exist in our system.
    I have also searched OSS with the program name SAPMIWO0 and screen 2100.
    The program to call IW22 and looks at a custom table for entries for a specific date that the user enters or from a variant, the default is sy-datum.
    Thanks,
    Dave

    Hi David,
    Not really sure of the specifics of the transaction but this is almost certainly not an SAP bug.
    One of the risks when stepping through a BDC session and showing all the screens is that by hitting the 'ENTER' key to step through each screen, you actually hit 'ENTER' on a screen for which you have no BDC data coded and it continues processing.  Thus you can miss an error in your BDC logic which is only manifested when you run the BDC without showing the screens.
    I think the best way to address this problem is to look for the program and screen number in the parameters of the message 00 344 "No batch input data for screen & & " [should be parameters MSGV1 and MSGV2 of the MESSTAB] and to display this screen in the screen painter.  By displaying it, you should be able to determine which screen it is and what actually is happening.  It may simply be a matter of including another 'DYNBEGIN' line in your BDC internal table.
    Hope that helps.  But I will reiterate that this is very unlikely to be an SAP bug.
    Cheers,
    Brad

  • Authorization check in BDC call transaction

    Hello gurus,
    My requirement is MB1B t-code is not authorized for basis users but only for end user, but when I create a Z-program with a BDC call transaction MB1B it is allowing access.
    How is this possible? My boss will ask me this question and I don't know the answer.
    Regards,
    Krishna
    Edited by: Julius Bussche on Dec 2, 2008 10:54 AM
    Several errors corrected...
    Edited by: Julius Bussche on Dec 2, 2008 2:44 PM

    Hi Krishna Moorthy
    To the best of my knowledge you need check the authorization in your program
    use AUTHORITY CHECK
    for further info take the help of KEY word documentaion
    Regards
    Ramchander Rao.K
    Edited by: ramchander krishnamraju on Dec 2, 2008 10:20 AM

  • How to handle lock object in BDC  call transcation method?

    Hi,
    how to handle lock object in BDC  call transcation method?
    Thanks In advances.

    If you are updating Z-fields then you need to create a lock entry, before you use call transaction.
    After creating lock object, please use FM Enqueue_<lockname> before CALL transaction and FM Dequeue_<lockname> after you have commited your data.
    Thanks,
    Kartavya

  • How to set the BDC Call transaction Program in Background

    Hi All,
            I have a requirement. If i execute a BDC Call Transaction Program in Background it is showing 0 seconds means it is not executing. Normally it is working properly. If execute in background it is not executing. But my client wnats to execute in background. How can i overcome this could you please suggest me?
    Thanks in Advance

    hi
    To schedule the processing of session in backgroud you can use report RSBDCSUB.
    You can do in two ways -
    Ist Method
    Define a batch job in SM36 with two steps -
    First Step - Your Custom Program ( with a variant )
    Second Step - RSBDCSUB ( With a variant having
    the session name ).
    2nd Method
    In your program after BDC_CLOSE_GROUP add a line.
    SUBMIT RSBDCSUB WITH MAPPE EQ <SESSION_NAME>.
    Scedule you program as a batch job in SM36 ( Single Step ). ( You can also test the program by running in online mode . After your programs executes , go and see in SM35. You will see that your session created in being processed or has been processed in background).
    In Both ways the session created by BDC_OPEN_GROUP will be processed in background
    You would have to create a job on the fly to do this. This example shows how to kick off a background job via an ABAP program.
    report zrich_0004 .
    data:   sdate type sy-datum,
            stime type sy-uzeit,
            l_valid,
            ls_params like pri_params,
            l_jobcount like tbtcjob-jobcount,
            l_jobname  like tbtcjob-jobname.
    start-of-selection.
    Get Print Parameters
      call function 'GET_PRINT_PARAMETERS'
           exporting
                no_dialog      = 'X'
           importing
                valid          = l_valid
                out_parameters = ls_params.
    Open Job
      l_jobname = 'ZRICH_0005'.
      call function 'JOB_OPEN'
           exporting
                jobname  = l_jobname
           importing
                jobcount = l_jobcount.
    Submit report to job
      submit zrich_0005   
           via job     l_jobname
               number  l_jobcount
           to sap-spool without spool dynpro
               spool parameters ls_params
                  and return.
    Schedule and close job.
      call function 'JOB_CLOSE'
           exporting
                jobcount  = l_jobcount
                jobname   = l_jobname
                strtimmed = 'X.
    regards
    Satish

  • How to do the job scheduling in BDC Call transaction

    Hi Experts,
    I've a Query like how to do the job scheduling in BDC Call transaction
      If anybody knows the answer please send me the reply.
      Thanks.
       Regards,
        Rekha

    Hi ,
    any progarm can be scheduled, wether it may be BDC or report thru SM36 Tcode.
    But do rememeber that if ur BDC is using GUI_UPLOAD function module, then it wont work , coz the function Gui_upload or GUI_DOWNLOAd wont work in back ground.
    If u r going to use OPEN_DATASET , READ dataset ....then it can be scheduled. i.e BDC can work if ur program retrievesz the data from Application server.
    Rvert back if any issues,
    Reward with poinst if helpful.
    Regards,
    Naveen

  • Error in BDC Call transaction

    Hi,
    I am uplaoding CoA profile data using BDC call transaction method, but records could not be uplaoded because of the error " Screen  0000 is too large for internal batch input Area". I didnt understand what is the reason for  this error.
    Could you plesae help in this?

    Hi,
    Keep the REFRESH KTAB after first Endloop.
    Like
    LOOP AT ITAB.
         LOOP AT KTAB.
        ENDLOOP.
        REFRESH KTAB.
    ENDLOOP.
    Edited by: subas  Bose on Mar 26, 2010 7:17 PM

  • Error in bdc call xsaction

    actually i wnt 2 rectify dat error which i got in format_message thru error msg....in bdc call transaction so do i hv 2 write some extra code like gui_download something.....or change flat file......plz tell me the code if u know or tell me solution in wt way to correct it

    Hi
    Use BDC MEssage structure in Call transaction syntax and capture the message...
    U r not define BDC message in ur call transaction Statement.
    Regards:
    Prabu

  • Error Capturing in BDC Call Transaction Method

    How does the Errors in BDC Call Transactin is captured ....can you please give same examples of using BDCMSGCOLL and FORMAT_MESSAGES..
    Please explain clearly when to used these in real time..
    Thankyou

    hi,
    Here is hte sample code
            call transaction  'ME22' using  it_bdc
                    options from x_ctu_params
                    messages into lt_message.
           clear w_success.
           if sy-subrc <> 0.
           w_success = 'N'.
           endif.
            loop at lt_message where msgtyp = 'E' or
                                     msgtyp = 'A'.
            endloop.
            if sy-subrc = 0.
              perform format_messages tables lt_message
                                      using lv_msg lv_lines.
    *         To append error messages
              perform append_message tables lt_message
                                            return
                                     using  lv_msg.
            else.
              if w_success = 'N'.
              perform format_messages tables lt_message
                                      using lv_msg lv_lines.
              perform append_message_err tables lt_message
                                            return
                                     using  lv_msg.
              else.
              perform format_messages tables lt_message
                                      using lv_msg lv_lines.
    *         To append success messages
              perform append_message tables lt_message
                                            return
                                     using  lv_msg.
              endif.
            endif.
            refresh: it_bdc,
                     lt_message.
          endat.
        endloop.
      endif.
    form format_messages tables  pt_messages structure bdcmsgcoll
                         using   pv_msg pv_lines.
      clear : pv_lines,pt_messages,pv_msg.
      describe table pt_messages lines pv_lines.
      read table pt_messages index pv_lines.
      check not pt_messages-msgid is initial.
    *-- Function module to format the message given
      call function 'FORMAT_MESSAGE'
           exporting
                id        = pt_messages-msgid
                lang      = sy-langu
                no        = pt_messages-msgnr
                v1        = pt_messages-msgv1
                v2        = pt_messages-msgv2
                v3        = pt_messages-msgv3
                v4        = pt_messages-msgv4
           importing
                msg       = pv_msg
           exceptions
                not_found = 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  into pv_msg.
      endif.
    endform.                    " format_messages
    Regards,
    Richa

  • Error Records in BDC Call transaction

    Hi.....
         I am new to BDC concept... Can any of u tell me how to collect error records in BDC  Call transaction... I already collected error messages through BDCMSGCOL... but  i dont know how to collect those error records... here i am using two different flat files for header and line item...  and kindly tell me if there is an error in line item how to get it so with relevent header details...
    thanks,

    Hi,
          LOOP AT t_bdcmsgcoll INTO w_bdcmsgcoll.
            PERFORM f_format_msg USING w_bdcmsgcoll CHANGING w_return.
         ENDLOOP.
    Form format_msg 
      DATA : l_mstring(480).
      CALL FUNCTION 'FORMAT_MESSAGE'                          
        EXPORTING
          id        = w_bdcmsgcoll-msgid
          lang      = w_bdcmsgcoll-msgspra
          no        = w_bdcmsgcoll-msgnr
          v1        = w_bdcmsgcoll-msgv1
          v2        = w_bdcmsgcoll-msgv2
          v3        = w_bdcmsgcoll-msgv3
          v4        = w_bdcmsgcoll-msgv4
        IMPORTING
          msg       = l_mstring
        EXCEPTIONS
          not_found = 1
          OTHERS    = 2.
    End format_msg 
    you can use the l_mstring to process further and pass to the bapiret2 table
    Regards,
    Vijaya

  • Local mode update in bdc -Call transaction method

    what is LOCAL MODE UPDATE in BDC- Call transaction methods ?

    Hi,
    Try to understand from the below CODE
    CALL TRANSACTION 'ZBDCSINGLE' USING IT_BDCDATA MODE 'A' UPDATE 'S' MESSAGES INTO IT_BDCMSGCOLL.
    REFRESH IT_BDCDATA.
    Cheers!!

Maybe you are looking for

  • How to query package info from the server repo instead of local DB?

    Greetings! Is there an option in pacman to query the package info ( like -Si ) from the server repo instead of the local package database? Or maybe some additional program is needed for this? Update: Maybe this can be done by downloading a fresh copy

  • My ipod nano 7th gen. won't save the changes I make to a song's start and stop time. How do I fix this?

    So I have a few songs that I don't like the intro to or the end of it that I had cut to where I wanted on my previous ipod. When I try to do the ame thing with this one with the start and stop time, it will work for awhile and then randomly start and

  • W540 sleep mode buttons are not working

    Hello, My question concerns the non-functioning  sleep mode buttons on my Lenovo W540 20BG. In my current power management settings, the W540 is suppose to enter sleep mode by pressing Fn4 or by pressing the round power button shortly. However, eithe

  • Unable to update Photoshop - Error code U44M1P7

    I have Photoshop CS6 installed through Creative Cloud on Mac OSX 10.8.3. Photoshop says it is running 13.0.4 x64. The Creative Cloud updater indicates that there is an update available to 13.1.2, however whenever I try to update, the update fails wit

  • Simple glossary

    I am in need of a simple glossary .fla or component that I can insert into a demo I am creating - I just don't have the time to build one. Is there one out there that will load content from a .txt file ? Thanks. Rob Childress