Bdc problem ca02

Hi all,
My first problem here is about bdc, ca02...
could you offer me any bapi or function instead of bdc for ca02?
my problem is when updating routes with ca02 with bdc method, i meet an error that activity type is not appeared on screen
and got the error PLPOD-LAR06 is not available on screen etc but i pasted it from the recording and also program name, numbers etc all from recording, and controlled many many times.
help:)
thanks

Try '/SAPMP/BAPI_ROUTING_PROCESS'
Regards,
Aswin

Similar Messages

  • BDC problem with F-30

    Hi All,
    I want to record a BDC for F-30 to clear the deduction line items for a Document. These deduction line items have a "Reason code" with it... When I select a Document Number in F-30, it displays all the line items in a table control.. I need to select and clear only those items with "Reason code" in that...
    How can I select a line item from the table control and clear it based on the reason code in a BDC?
    I have looked at the previous posts... I have seen a solution provided by filling the structure BSELP. How this can be included in the program and how to fill the values... Is there any limit for the values to get it filled?.. Because I could see
    FELDN_1 to FELDN_18 in BSELP structure.....
    BDC problem in F-30
    BSELP-FELDN_1 = "BELNR"
    BSELP-SLVON_1 = "00002222221997003"
    How the rfbibl00 program works?
    Thanks for the help,
    Asha

    Hi,
        Use BAPI_PAYIT_POST_CLEARING
    or  FM POSTING_INTERFACE_CLEARING
    or
    try this code for transaction fb05:
    DATA: BEGIN OF bkey OCCURS   0,
            belnr LIKE bseg-belnr,
            gjahr LIKE bseg-gjahr,
            buzei LIKE bseg-buzei,
          END OF bkey.
    *Dynpro 122 - Header
        PERFORM bdc_dynpro USING 'SAPMF05A' '0122'.
        PERFORM bdc_field USING 'BKPF-BLDAT' agz-datum.
        PERFORM bdc_field USING 'BKPF-BLART' augblart.
        PERFORM bdc_field USING 'BKPF-BUKRS' htab-bukrs.
        PERFORM bdc_field USING 'BKPF-BUDAT' agz-datum.
        PERFORM bdc_field USING 'BKPF-WAERS' t001-waers.
        IF t003-xmref = 'X'.
          IF htab-xblnr <> space.
            PERFORM bdc_field USING 'BKPF-XBLNR' htab-xblnr.
          ELSE.
            PERFORM bdc_field USING 'BKPF-XBLNR' text-aag.
          ENDIF.
        ENDIF.
        UNPACK vorgang TO zeile.
        PERFORM bdc_field_loop USING zeile 'RF05A-XPOS1' 'X'.
        PERFORM bdc_field USING 'BDC_OKCODE'     'SL'.
        LOOP AT itab WHERE marked = 'X'.
    *Dynpro 0710 -
          PERFORM bdc_dynpro USING 'SAPMF05A' '0710'.
          PERFORM bdc_field USING 'RF05A-AGKON' agku-kunnr.
          PERFORM bdc_field USING 'RF05A-AGBUK' agku-bukrs.
          PERFORM bdc_field USING 'BDC_OKCODE'     'SLB'.         "ins
    *Dynpro 0733 - insert fi-document-nr.
          PERFORM bdc_dynpro USING 'SAPMF05A' '0733'.
          CLEAR:   zeile, cnt.
          LOOP AT htab WHERE agzif = agc-nr AND xfeld = 'X'
                        AND bukrs = agku-bukrs AND kunnr = agku-kunnr.
            CLEAR bkey.
            cnt = cnt + 1.
            UNPACK cnt TO zeile.
            PERFORM bdc_field_loop USING zeile 'RF05A-FELDN' 'BELNR'.
            MOVE-CORRESPONDING tab TO bkey.
            PERFORM bdc_field_loop USING zeile 'RF05A-SEL01'  bkey.
          ENDLOOP.
    <b>Reward points</b>
    Regards

  • BDC Problem : Tcode : F-30

    Hi All,
    BDC Problem :
    Iam working with Tcode : F-30.
    Iam able to post the the document in  All (A) screen mode
    But Iam unable to post the  document in  No (N) screen mode
    Please let me know how to solve this issue
    Thanks
    Sunil

    HI,
    R u getting any errors while creating using 'A'.
    If not then use commit work after BDC.
    Thanks

  • Problem in BDC for CA02

    hello all,
             i am doing BDC for change routing (ca02) transaction.
    in that my need is to assign PRT allocation for operations.
    i have written a program for it but if suppose for a particlular operation i want to assign PRT and if there are no PRT assigned for that particular operation before that recording fails.and if already there is atleast one PRT assigned to that operation it runs fine. so i want to remove this error.for that may be i shd first record tha no of PRTS on screen and save that in particular counter and if suppose its greater than 0 then it will run the code and if not it will escape.
                    I know some of u will not understand the problem..in that case i have all screen shots and program ready for it ....plz send u r mail address to me and i will send u my problem with  all details on u r mail id.waiting for quick reply.
    Edited by: abhijeet shastri on Feb 5, 2008 9:01 AM

    hi,
    Here you have to take 2 perform statements, one is for PRT and another one is for without PRT
    After populating the input internal table, need check whether the particuler operation is having PRT values or not.
    if PRT values are available then go for PRT screen (Perform statement for PRT values).
    if not PRT values are available then go for not PRT screen.
    If the PRT screen is depedable on process operation values.
    then you have to make prevalidation . in prevalidation the appropriate operation containing any values for the same then call perform statement for the same. else skip that session through coding.
    Ask to your functional consultant regarding tables (In which table you will PRT screen values based on process operation fields) for PRT pre validation.
    I hope this message will clear your doubt
    Regards,
    Sreenivasa Babu

  • Change transaction using BDC-problem for large number of lines on screen

    Hi All,
    I am developing BAPI (using BDC) which creates quality notification in SAP which is entered via front end web application. Structure p_qmsm contain 3 lines of task in notification. The code is as given below. To avoid problem of large no of lines on screen,code lines starting with * is used. This actually for pagedown after entering every 2 lines and creates new line. so that 2 lines always push up on screen and there will not be problem for creating large no of lines on screen
    perform bdc_dynpro using 'SAPLIQS0' '7200'.
    perform bdc_field using 'BDC_OKCODE' '=10\TAB11'.
    LOOP AT p_qmsm INTO wa_qmsm.
    *IF wa_qmsm_cntr > 2.
           wa_qmsm_cntr = 2.
           perform bdc_dynpro  using 'SAPLIQS0'                   '7204'.
           perform bdc_field   using 'BDC_OKCODE'                 '=PEND'.
    ENDIF.
    perform bdc_dynpro using 'SAPLIQS0' '7204'.
    perform bdc_field using 'BDC_OKCODE' '/00'.
    CONCATENATE 'VIQMSM-QSMNUM(' wa_qmsm_cntr ')' INTO wm_qmsm_qsmnum.
    CONCATENATE 'VIQMSM-MNGRP(' wa_qmsm_cntr ')' INTO wm_qmsm_mngrp.
    CONCATENATE 'VIQMSM-MNCOD(' wa_qmsm_cntr ')' INTO wm_qmsm_mncod.
    CONCATENATE 'VIQMSM-MATXT(' wa_qmsm_cntr ')' INTO wm_qmsm_matxt.
    perform bdc_field using wm_qmsm_qsmnum wa_qmsm-qsmnum.
    perform bdc_field using wm_qmsm_mngrp wa_qmsm-mngrp.
    perform bdc_field using wm_qmsm_mncod wa_qmsm-mncod.
    perform bdc_field using wm_qmsm_matxt wa_qmsm-matxt.
    wa_qmsm_cntr = wa_qmsm_cntr + 01.
    ENDLOOP.
    CALL TRANSACTION 'IQS2' USING wt_bdc
    MODE 'N' UPDATE 'A'  MESSAGES INTO P_MESSTAB.
    The same code is used in modify mode also. web application is sending all 3 lines in modify mode even if single line is modified. It is already decided to send all rows back from web application to SAP in same sequence. It is working fine if i comment 5 lines which is starting with *. But in modify mode, how can i ensure that correct row is modified? and how can i achieve problem of large no of lines on screen?Please suggest?

    Hi yogesh,
    how can i ensure that correct row is modified?
    1. For this we need to know two things ;
       a) the database table in which the entries are already stored
       b) the sequence in which they are displayed in the transaction.
    2. So before changing any line, we need to compare (the primary key values / important values)
       a) as per the database table and as per the incoming data from web application (using bapi)
      b) if the match is ok, it means that particular row was not modified, else modified.
    how can i achieve problem of large no of lines on screen?
    1. For this I am  not sure about the transaction and its screen. Manytimes for appending row on the screen,
      there is a PLUS + button on the grid toolbar. So for every entry, (inspite of some empty/filled rows already visible on the screen), we should use the + button, and this new row always appears on the top i.e. row number 1.
    hope this helps.
    regards,
    amit m.

  • BDC -Problem with mode 'N'

    Hi
    BDC with mode 'A'  is working correctly  but when I make the mode 'N' it gives a dump.
    With mode 'A' the record is updated , what may be the cause?
    Thanks

    I am using the tcode 7kE1 for bdc , it works perfectly with mode 'A' , but not with mode 'N', It give error  'Message_Type_Unknown' .
    there is no problem with the file as values are going correctly in tcode
    Edited by: Puneeta Parnami on Jun 12, 2009 12:57 PM

  • F-32 Transaction BDC Problem

    Hi All,
           I am following the below procedure to populate the transaction F-32 using BDC but I have a small doubt:
    1) I go to F-32 Transaction code populate the required fields on that and press F5
    2) It takes to second screen which has three fields as Field in which I am populating BELNR, second field is Lower Limit field which has a value combination of year document type document number, third field is left blank.
           Now I need to Clear Only part of the second field say for example year part.
          How can I do that? Has anyone faced this kind of problem if so Please reply back.
    Thanks & Regards,
    Joseph Reddy.
    Message was edited by: Joseph Reddy Yeruva

    Hi Rob,
           This is how the code is written
          PERFORM bdc_dynpro      USING 'SAPMF05A' '0131'.
          PERFORM bdc_field       USING:
                               'BDC_CURSOR'  'BKPF-WAERS',
                               'BDC_OKCODE'  '=SLB',
                               'RF05A-AGKON' p_kunnr,
                               'BKPF-BUDAT'  lv_date,
                               'BKPF-MONAT'  '11',
                               'BKPF-BUKRS'  p_bukrs,
                               'BKPF-WAERS'  gv_waers.
                               'RF05A-XNOPS' c_x.
          perform bdc_dynpro      using 'SAPMF05A' '0733'.
          perform bdc_field       using 'BDC_CURSOR' 'RF05A-                                     SEL01(01)'.
          perform bdc_field       using 'BDC_OKCODE'
                                        '=PA'.
          perform bdc_field       using 'RF05A-FELDN(01)'
                                          'BELNR'.
          perform bdc_field       using 'RF05A-FELDN(02)'
                                        record-FELDN_02_008.
          perform bdc_field       using 'RF05A-FELDN(03)'
                                        record-FELDN_03_009.
          perform bdc_field       using 'RF05A-FELDN(04)'
                                        record-FELDN_04_010.
          perform bdc_field       using 'RF05A-SEL01(01)'
                                         lv_belnr.
          perform bdc_field       using 'RF05A-SEL01(02)'
                                        record-SEL01_02_012.
          perform bdc_field       using 'RF05A-SEL01(03)'
                                        record-SEL01_03_013.
          perform bdc_field       using 'RF05A-SEL01(04)'
                                        record-SEL01_04_014.
          perform bdc_dynpro      using 'SAPDF05X' '3100'.
          perform bdc_field       using 'BDC_OKCODE'
                                        '=OMX'.
          perform bdc_field       using 'BDC_CURSOR'
                                        'DF05B-PSSKT(01)'.
          perform bdc_field       using 'RF05A-ABPOS'
                                          '001'.
          perform bdc_dynpro      using 'SAPDF05X' '3100'.
          perform bdc_field       using 'BDC_OKCODE'
                                        '=Z+'.
          perform bdc_field       using 'BDC_CURSOR'
                                        'DF05B-PSSKT(01)'.
          perform bdc_field       using 'RF05A-ABPOS'
                                         '001'.
          perform bdc_dynpro      using 'SAPDF05X' '3100'.
          perform bdc_field       using 'BDC_OKCODE'
                                        '=BU'.
          perform bdc_field       using 'BDC_CURSOR'
                                        'DF05B-PSSKT(01)'.
          perform bdc_field       using 'RF05A-ABPOS'
                                         '001'.
         CALL TRANSACTION 'F-32' USING gt_BDCDATA
                                 MODE   'A' "gv_mode
                                 UPDATE gv_updat.
    Rgds,
    Joseph

  • F-04 bdc problem

    HI
    FRIENDS  STUCK IN A SMALL PROBLEM IAM DOING A BDC FOR F-04
    IN WHICH I HAD FLAT FILE IN THE FOLLOWING FORMAT ,
    27.10.2004     sa     npil     31.07.2006 3689525.64     1000     2000     2810200     7400007174
                                                      7400007175
                                                      7400007176
    27.10.2004     sa     npil     31.07.2006 3689525.64     1001     2000     2810200     7400007177
                                                      7400007178
                                                      7400007179
    THE DATA IS SPLIT DEPENDING UPON BUSINESS AREA 1000 AND 1001 , BUT IAM NOT ABLE TO GET ALL THE
    ACCOUNT NOS STARTING FROM 7400 .. TO NEXT BUSINESS AREA I AM GETTING ONLY THE FIRST ACCT NO.
    HERE I THINK AT NEW IS NOT WORKING .
    SO PLS CAN ANYBODY TELL ME HOW TO DO THIS .

    This is the code ,
    LOOP AT i_final .
        CLEAR i_gsber.
        MOVE-CORRESPONDING i_final TO i_gsber.
        APPEND i_gsber.
      ENDLOOP.
      LOOP AT i_gsber.
        CLEAR item.
       MOVE-CORRESPONDING i_gsber TO item.
        IF i_gsber-gsber <> space .
          w_gsber = i_gsber-gsber.
        ENDIF.
        item-gsber = w_gsber.
        item-sel01 = i_gsber-sel01.
        APPEND item.
      ENDLOOP.
    *********************the include part
    PERFORM bdc_dynpro      USING 'SAPMF05A' '0731'.
    PERFORM bdc_field       USING 'BDC_OKCODE'
                                           '/00'.
        LOOP AT item WHERE gsber = wa_itab-gsber.
          MOVE-CORRESPONDING item TO wa_item.
       ENDAT.
       LOOP AT item WHERE gsber = i_gsber-gsber.
          w_count = w_count + 1.
          CONCATENATE 'RF05A-SEL01(' w_count ')' INTO w_bdc.
          PERFORM bdc_field       USING   w_bdc
                                          wa_item-sel01.
          IF w_count >= 16.
            w_count = 0.
            PERFORM bdc_dynpro      USING 'SAPMF05A' '0731'.
            PERFORM bdc_field       USING 'BDC_OKCODE'
                                             '/00'.
          ENDIF.
        ENDLOOP.
       AT END OF gsber.
        PERFORM bdc_dynpro      USING 'SAPMF05A' '0731'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                         '=PA'.
        PERFORM bdc_dynpro      USING 'SAPDF05X' '3100'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                         '=AB'.
        PERFORM bdc_dynpro      USING 'SAPMF05A' '0700'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=BU'.
    regards

  • URGENT: BDC problem small one

    hi everybody
    I am new to BDC and I have created a BDC for MM01. It is working well. I am using it by call transaction method. But my problem is this when the last material is created it is good but it does not stop and starts the next material creation and every time when i run the bdc it will waste a material number.
    and please tell me the code to stop the bdc in each method and to move to next method
    follwoing is the bdc code.
    report ZDEMO_ZCON
           no standard page heading line-size 255.
    data: begin of record OCCURS 0,
           MATNR(018),
           MBRSH_001(001),
           MTART_002(004),
           WERKS_015(004),
            MAKTX(040),
            MEINS(003),
            MATKL(009),
           BISMT(18),
           EXTWG(18),
            EKGRP(003),
           XCHPF_025(001),
            WEBAZ(003),
            DISGR(004),
           DISMM_030(002),
           MINBE(18),
            DISPO(003),
           DISLS(002),
           MABST(18),
           SOBSL(2),
           PLIFZ_034(003),
           FHORI_036(003),
           MTVFP_039(002),
            BKLAS(004),
    END OF RECORD.
    include bdcrecx1.
    start-of-selection.
    CALL FUNCTION 'UPLOAD'
    EXPORTING
    CODEPAGE = ' '
    FILENAME = 'C:\BOOKS3'           " Name of the tab delimited flat file on desktop
    FILETYPE = 'DAT'
    ITEM = ' '
    FILEMASK_MASK = ' '
    FILEMASK_TEXT = ' '
    FILETYPE_NO_CHANGE = ' '
    FILEMASK_ALL = ' '
    FILETYPE_NO_SHOW = ' '
    LINE_EXIT = ' '
    USER_FORM = ' '
    USER_PROG = ' '
    SILENT = 'S'
    IMPORTING
    FILESIZE =
    CANCEL =
    ACT_FILENAME =
    ACT_FILETYPE =
    TABLES
    data_tab = record                   " Name of internal table with data.
    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.
    perform open_group.
    LOOP AT RECORD.
    perform bdc_dynpro      using 'SAPLMGMM' '0060'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RMMG1-MATNR'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'RMMG1-MBRSH'
                                  'M'.
    perform bdc_field       using 'RMMG1-MTART'
                                  'ZCON'.
    perform bdc_dynpro      using 'SAPLMGMM' '0070'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MSICHTAUSW-DYTXT(13)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=P+'.
    perform bdc_field       using 'MSICHTAUSW-KZSEL(01)'
                                  'X'.
    perform bdc_field       using 'MSICHTAUSW-KZSEL(09)'
                                  'X'.
    perform bdc_field       using 'MSICHTAUSW-KZSEL(12)'
                                  'X'.
    perform bdc_field       using 'MSICHTAUSW-KZSEL(13)'
                                  'X'.
    perform bdc_dynpro      using 'SAPLMGMM' '0070'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MSICHTAUSW-DYTXT(08)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTR'.
    perform bdc_field       using 'MSICHTAUSW-KZSEL(04)'
                                  'X'.
    perform bdc_field       using 'MSICHTAUSW-KZSEL(05)'
                                  'X'.
    perform bdc_field       using 'MSICHTAUSW-KZSEL(06)'
                                  'X'.
    perform bdc_field       using 'MSICHTAUSW-KZSEL(07)'
                                  'X'.
    perform bdc_field       using 'MSICHTAUSW-KZSEL(08)'
                                  'X'.
    perform bdc_dynpro      using 'SAPLMGMM' '0080'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RMMG1-LGORT'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTR'.
    perform bdc_field       using 'RMMG1-WERKS'
                                  'MFPL'.
    perform bdc_field       using 'RMMG1-LGORT'
                                  'ccon'.
    perform bdc_dynpro      using 'SAPLMGMM' '4004'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'MAKT-MAKTX'
                                  record-maktx.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MARA-MATKL'.
    perform bdc_field       using 'MARA-MEINS'
                                  record-meins.
    perform bdc_field       using 'MARA-MATKL'
                                  record-matKl.
    perform bdc_dynpro      using 'SAPLMGMM' '4000'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'MAKT-MAKTX'
                                  record-maktx.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MARC-EKGRP'.
    perform bdc_field       using 'MARA-MEINS'
                                  record-meins.
    perform bdc_field       using 'MARC-EKGRP'
                                  record-ekgrp.
    perform bdc_field       using 'MARA-MATKL'
                                  record-matkl.
    perform bdc_dynpro      using 'SAPLMGMM' '4000'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'MAKT-MAKTX'
                                  record-maktx.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MARC-DISGR'.
    perform bdc_field       using 'MARA-MEINS'
                                  record-meins.
    perform bdc_field       using 'MARC-DISGR'
                                  record-disgr.
    perform bdc_field       using 'MARC-EKGRP'
                                  record-ekgrp.
    perform bdc_field       using 'MARC-DISMM'
                                  'ND'.
    perform bdc_field       using 'MARC-DISPO'
                                  record-dispo.
    perform bdc_dynpro      using 'SAPLMGMM' '4000'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'MAKT-MAKTX'
                                  record-maktx.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MARC-WEBAZ'.
    perform bdc_field       using 'MARC-WEBAZ'
                                  record-webaz.
    perform bdc_dynpro      using 'SAPLMGMM' '4000'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=PB01'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MAKT-MAKTX'.
    perform bdc_field       using 'MAKT-MAKTX'
                                  record-maktx.
    perform bdc_field       using 'MARA-MEINS'
                                  record-meins.
    perform bdc_field       using 'MARC-WEBAZ'
                                  record-webaz.
    perform bdc_dynpro      using 'SAPLQPLS' '0100'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RMQAM-ARGUMENT'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=NEU'.
    perform bdc_dynpro      using 'SAPLQPLS' '0100'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RMQAM-AKTIV(01)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=WEIT'.
    perform bdc_field       using 'RMQAM-ART(01)'
                                  'ZCON'.
    perform bdc_field       using 'RMQAM-APA(01)'
                                  'X'.
    perform bdc_field       using 'RMQAM-AKTIV(01)'
                                  'X'.
    perform bdc_dynpro      using 'SAPLMGMM' '4000'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MAKT-MAKTX'.
    perform bdc_field       using 'MAKT-MAKTX'
                                  record-maktx.
    perform bdc_field       using 'MARA-MEINS'
                                  record-meins.
    perform bdc_field       using 'MARC-WEBAZ'
                                  record-webaz.
    perform bdc_dynpro      using 'SAPLMGMM' '4000'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MAKT-MAKTX'.
    perform bdc_field       using 'MAKT-MAKTX'
                                  record-maktx.
    perform bdc_field       using 'MARA-MEINS'
                                  record-meins.
    perform bdc_field       using 'MBEW-BKLAS'
                                  record-bklas.
    perform bdc_field       using 'MBEW-VPRSV'
                                  'V'.
    perform bdc_field       using 'MBEW-PEINH'
                                  '1'.
    perform bdc_dynpro      using 'SAPLMGMM' '4000'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MAKT-MAKTX'.
    perform bdc_field       using 'MAKT-MAKTX'
                                  record-maktx.
    perform bdc_dynpro      using 'SAPLMGMM' '4000'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MAKT-MAKTX'.
    perform bdc_field       using 'MAKT-MAKTX'
                                  record-maktx.
    perform bdc_field       using 'MARA-MEINS'
                                  record-meins.
    perform bdc_field       using 'MARC-LOSGR'
                                  '1'.
    perform bdc_dynpro      using 'SAPLMGMM' '4000'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MAKT-MAKTX'.
    perform bdc_field       using 'MAKT-MAKTX'
                                  record-maktx.
    perform bdc_field       using 'MBEW-BKLAS'
                                  record-bklas.
    perform bdc_field       using 'MBEW-VPRSV'
                                  'V'.
    perform bdc_field       using 'MBEW-PEINH'
                                  '1'.
    perform bdc_dynpro      using 'SAPLSPO1' '0300'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=YES'.
    perform bdc_dynpro      using 'SAPLMGMM' '4000'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'MAKT-MAKTX'
                                  record-maktx.
    perform bdc_field       using 'MARC-PERKZ'
                                  'M'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MARC-MTVFP'.
    perform bdc_field       using 'MARC-MTVFP'
                                  '02'.
    perform bdc_dynpro      using 'SAPLMGMM' '4000'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MAKT-MAKTX'.
    perform bdc_field       using 'MAKT-MAKTX'
                                  record-maktx.
    perform bdc_field       using 'MARA-MEINS'
                                  record-meins.
    perform bdc_field       using 'MARC-WEBAZ'
                                  record-webaz.
    perform bdc_dynpro      using 'SAPLMGMM' '4000'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MAKT-MAKTX'.
    perform bdc_field       using 'MAKT-MAKTX'
                                  record-maktx.
    perform bdc_field       using 'MARA-MEINS'
                                  record-meins.
    perform bdc_field       using 'MBEW-BKLAS'
                                  record-bklas.
    perform bdc_field       using 'MBEW-VPRSV'
                                  'V'.
    perform bdc_field       using 'MBEW-PEINH'
                                  '1'.
    perform bdc_dynpro      using 'SAPLMGMM' '4000'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MAKT-MAKTX'.
    perform bdc_field       using 'MAKT-MAKTX'
                                  record-maktx.
    perform bdc_dynpro      using 'SAPLMGMM' '4000'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MAKT-MAKTX'.
    perform bdc_field       using 'MAKT-MAKTX'
                                  record-maktx.
    perform bdc_field       using 'MARA-MEINS'
                                  record-meins.
    perform bdc_field       using 'MARC-LOSGR'
                                  '1'.
    perform bdc_dynpro      using 'SAPLMGMM' '4000'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MAKT-MAKTX'.
    perform bdc_field       using 'MAKT-MAKTX'
                                  record-maktx.
    perform bdc_field       using 'MBEW-BKLAS'
                                  record-bklas.
    perform bdc_field       using 'MBEW-VPRSV'
                                  'V'.
    perform bdc_field       using 'MBEW-PEINH'
                                  '1'.
    perform bdc_dynpro      using 'SAPLSPO1' '0300'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=YES'.
    perform bdc_transaction using 'MM01'.
    ENDLOOP.
    perform close_group.
    plz provide the solution
    points wil b awarded
    thanx and regards

    **&#12288;Program ID &#65306; ZMAT_CREATE
    **&#12288;Program Desc &#65306; Material Master Creation
    **&#12288;Process Overview &#65306;
    **&#12288;Created By &#65306; R. NAGARAJAN
    **&#12288;Created Date &#65306; 22/08/2006
    **&#12288;Company Name &#65306; Infoview Technologies Limited
    REPORT ZMAT_CREATE
    NO STANDARD PAGE HEADING LINE-SIZE 132 MESSAGE-ID ZBDCMSG.
    Internal table definition *
    DATA: BEGIN OF ITAB OCCURS 0,
    MATNR LIKE RMMG1-MATNR, " Material Number
    MBRSH LIKE RMMG1-MBRSH, " Industry Sector
    MTART LIKE RMMG1-MTART, " Material Type
    WERKS LIKE RMMG1-WERKS, " Plant
    LGORT LIKE RMMG1-LGORT, " Storage Location
    VKORG LIKE RMMG1-VKORG, " Sales Organization
    VTWEG LIKE RMMG1-VTWEG, " Distribution Channel
    LGNUM LIKE RMMG1-LGNUM, " Warehouse Number
    LGTYP LIKE RMMG1-LGTYP, " Storage Type
    MAKTX LIKE MAKT-MAKTX, " Material Description
    MEINS LIKE MARA-MEINS, " Base Unit of Measure
    MATKL LIKE MARA-MATKL, " Material Group
    SPART LIKE MARA-SPART, " Division
    MTPOS_MARA LIKE MARA-MTPOS_MARA, "General item category group
    GEWEI LIKE MARA-GEWEI, " Weight Unit
    TAXKM1 LIKE MG03STEUER-TAXKM, " Tax classification material
    TAXKM2 LIKE MG03STEUER-TAXKM, " Tax classification material
    KONDM LIKE MVKE-KONDM, " Material Pricing Group
    MTPOS LIKE MVKE-MTPOS , "ItemCategoryGroupFromMaterialMaster
    MTVFP LIKE MARC-MTVFP, " Checking Group for AvailabilityCheck
    TRAGR LIKE MARA-TRAGR, " Transportation group
    LADGR LIKE MARC-LADGR, " Loading group
    TDLINE LIKE RSTXT-TXLINE, " Text editor text line
    EKGRP LIKE MARC-EKGRP, " Purchasing Group
    DISMM LIKE MARC-DISMM, " MRP Type
    BESKZ LIKE MARC-BESKZ, " Procurement Type
    SOBSL LIKE MARC-SOBSL, " Special procurement type
    PERKZ LIKE MARC-PERKZ, " Period indicator
    PRMOD LIKE MPOP-PRMOD, " Forecast model
    KZINI LIKE MPOP-KZINI, " Initialization indicator
    AUTRU LIKE MARC-AUTRU, " Reset Forecast Model Automatically
    MODAV LIKE MPOP-MODAV, " Model selection procedure
    IPRKZ LIKE MARA-IPRKZ, " Period indicator for shelf life expiration date
    BWTTY LIKE MBEW-BWTTY, " Valuation Category
    BKLAS LIKE MBEW-BKLAS, " Valuation Class
    EKLAS LIKE MBEW-EKLAS, " Valuation Class for Sales OrderStock
    VPRSV LIKE MBEW-VPRSV, " Price Control Indicator
    EKALR LIKE MBEW-EKALR, "MaterialIsCostedWithQuantityStructure
    END OF ITAB,
    *// TEXT HEADER
    GT_HEAD LIKE THEAD,
    *// Text lines
    GT_TEXT LIKE STANDARD TABLE OF TLINE,
    GW_TEXT LIKE TLINE,
    Data definition *
    WS_REP_CNT(6) TYPE C,
    SESSION(12) TYPE C.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-000.
    PARAMETERS:
    PA_GROUP LIKE APQI-GROUPID OBLIGATORY DEFAULT 'MMupload',
    PA_FNAME LIKE IBIPPARMS-PATH OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK B1.
    Include statements *
    INCLUDE ZBDCREX.
    At Selection Screen definition *
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR PA_FNAME.
    *//GETTING FLAT FILE PATH
    PERFORM FILE_PATH USING PA_FNAME.
    Start of Selection definition *
    START-OF-SELECTION.
    *//UPLOADING THE FLAT FILE
    PERFORM DATA_UPLOAD TABLES ITAB USING PA_FNAME.
    *// BDC OPEN GROUP
    PERFORM OPEN_GROUP USING PA_GROUP.
    SKIP 3.
    FORMAT COLOR COL_HEADING INVERSE ON.
    WRITE 40 TEXT-001.
    FORMAT COLOR COL_HEADING INVERSE OFF.
    SKIP 1.
    FORMAT COLOR COL_NEGATIVE INVERSE ON.
    WRITE :/3 TEXT-002, 13 SY-MANDT, 104 TEXT-003, 113 SY-UNAME,
    /3 TEXT-004, 13 SY-DATUM, 104 TEXT-005, 113 SY-UZEIT.
    FORMAT COLOR COL_NEGATIVE INVERSE OFF.
    LOOP AT ITAB.
    WS_REP_CNT = WS_REP_CNT + 1. "To Count no. of Records Processed
    PERFORM MM_UPLOAD.
    ENDLOOP.
    *//STATUS INDICATION
    IF SY-SUBRC = 0.
    SESSION = PA_GROUP.
    SKIP 1.
    FORMAT COLOR COL_TOTAL INVERSE ON.
    WRITE: /38 TEXT-006 , WS_REP_CNT.
    FORMAT COLOR COL_TOTAL INVERSE OFF.
    MESSAGE S000 WITH SESSION.
    ENDIF.
    *// BDC CLOSE GROUP
    PERFORM CLOSE_GROUP.
    SET PF-STATUS 'ZMM01PF'.
    AT USER-COMMAND.
    CASE SY-UCOMM.
    WHEN 'SESSION'.
    CALL TRANSACTION 'SM35'.
    WHEN 'EXIT'.
    LEAVE PROGRAM.
    WHEN 'CANCEL'.
    LEAVE SCREEN.
    ENDCASE .
    FORM MM_UPLOAD *
    FORM MM_UPLOAD.
    REFRESH BDCDATA.
    *// Create Material: Initial Screen
    perform bdc_dynpro using 'SAPLMGMM' '0060'.
    perform bdc_field using 'BDC_CURSOR'
    'RMMG1-MATNR'.
    perform bdc_field using 'BDC_OKCODE'
    '=ENTR'.
    perform bdc_field using 'RMMG1-MATNR'
    ITAB-MATNR.
    perform bdc_field using 'RMMG1-MBRSH'
    ITAB-MBRSH.
    perform bdc_field using 'RMMG1-MTART'
    ITAB-MTART.
    *// Selection Views
    perform bdc_dynpro using 'SAPLMGMM' '0070'.
    perform bdc_field using 'BDC_CURSOR'
    'MSICHTAUSW-DYTXT(01)'.
    perform bdc_field using 'BDC_OKCODE'
    'SELA'.
    perform bdc_dynpro using 'SAPLMGMM' '0070'.
    perform bdc_field using 'BDC_CURSOR'
    'MSICHTAUSW-DYTXT(01)'.
    perform bdc_field using 'BDC_OKCODE'
    '=ENTR'.
    *// Organization Levels
    perform bdc_dynpro using 'SAPLMGMM' '0080'.
    perform bdc_field using 'BDC_OKCODE'
    '=ENTR'.
    perform bdc_field using 'RMMG1-WERKS'
    ITAB-WERKS.
    perform bdc_field using 'RMMG1-LGORT'
    ITAB-LGORT.
    perform bdc_field using 'RMMG1-VKORG'
    ITAB-VKORG.
    perform bdc_field using 'RMMG1-VTWEG'
    ITAB-VTWEG.
    perform bdc_field using 'RMMG1-LGNUM'
    ITAB-LGNUM.
    perform bdc_field using 'RMMG1-LGTYP'
    ITAB-LGTYP.
    *// Basic Data 1: Screen
    perform bdc_dynpro using 'SAPLMGMM' '4004'.
    perform bdc_field using 'BDC_OKCODE'
    '=SP04'.
    perform bdc_field using 'MAKT-MAKTX'
    ITAB-MAKTX.
    perform bdc_field using 'MARA-MEINS'
    ITAB-MEINS.
    perform bdc_field using 'MARA-SPART'
    ITAB-SPART.
    perform bdc_field using 'MARA-MTPOS_MARA'
    ITAB-MTPOS_MARA.
    perform bdc_field using 'BDC_CURSOR'
    'MARA-GEWEI'.
    perform bdc_field using 'MARA-BRGEW'
    '9000'.
    perform bdc_field using 'MARA-GEWEI'
    ITAB-GEWEI.
    perform bdc_field using 'MARA-NTGEW'
    '8000'.
    *// Sales: Sales Organization 1: Screen
    perform bdc_dynpro using 'SAPLMGMM' '4000'.
    perform bdc_field using 'BDC_OKCODE'
    '=SP05'.
    perform bdc_field using 'MG03STEUER-TAXKM(01)'
    ITAB-TAXKM1.
    perform bdc_field using 'MG03STEUER-TAXKM(02)'
    ITAB-TAXKM2.
    perform bdc_dynpro using 'SAPLMGMM' '4200'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    perform bdc_field using 'BDC_OKCODE'
    '=SP05'.
    *// Sales: Sales Organization 2: Screen
    perform bdc_dynpro using 'SAPLMGMM' '4000'.
    perform bdc_field using 'BDC_OKCODE'
    '=SP06'.
    perform bdc_field using 'BDC_CURSOR'
    'MVKE-KONDM'.
    perform bdc_field using 'MVKE-KONDM'
    ITAB-KONDM.
    perform bdc_field using 'MARA-MTPOS_MARA'
    ITAB-MTPOS_MARA.
    perform bdc_field using 'MVKE-MTPOS'
    ITAB-MTPOS.
    *// Sales: General / Plant Screen
    perform bdc_dynpro using 'SAPLMGMM' '4000'.
    perform bdc_field using 'BDC_OKCODE'
    '=SP12'.
    perform bdc_field using 'MARA-MEINS'
    ITAB-MEINS.
    perform bdc_field using 'MARA-BRGEW'
    '9000'.
    perform bdc_field using 'MARA-GEWEI'
    ITAB-GEWEI.
    perform bdc_field using 'MARA-XCHPF'
    perform bdc_field using 'MARA-NTGEW'
    '8000'.
    perform bdc_field using 'MARC-MTVFP'
    ITAB-MTVFP.
    perform bdc_field using 'BDC_CURSOR'
    'MARC-LADGR'.
    perform bdc_field using 'MARA-TRAGR'
    ITAB-TRAGR.
    perform bdc_field using 'MARC-LADGR'
    ITAB-LADGR.
    *// MRP 1: Screen
    perform bdc_dynpro using 'SAPLMGMM' '4000'.
    perform bdc_field using 'BDC_OKCODE'
    '=SP13'.
    perform bdc_field using 'MARA-MEINS'
    ITAB-MEINS.
    perform bdc_field using 'MARC-EKGRP'
    ITAB-EKGRP.
    perform bdc_field using 'BDC_CURSOR'
    'MARC-DISMM'.
    perform bdc_field using 'MARC-DISMM'
    ITAB-DISMM.
    *// MRP 2: Screen
    perform bdc_dynpro using 'SAPLMGMM' '4000'.
    perform bdc_field using 'BDC_OKCODE'
    '=SP14'.
    perform bdc_field using 'BDC_CURSOR'
    'RMMG1_BEZ-WERKS_BEZ'.
    perform bdc_field using 'MARC-BESKZ'
    ITAB-BESKZ.
    perform bdc_field using 'MARC-SOBSL'
    ITAB-SOBSL .
    *// MRP 3: Screen
    perform bdc_dynpro using 'SAPLMGMM' '4000'.
    perform bdc_field using 'BDC_OKCODE'
    '=SP16'.
    perform bdc_field using 'BDC_CURSOR'
    'MARC-PERKZ'.
    perform bdc_field using 'MARC-PERKZ'
    ITAB-PERKZ.
    perform bdc_field using 'MARC-MTVFP'
    ITAB-MTVFP.
    *// Forecasting Screen
    perform bdc_dynpro using 'SAPLMGMM' '4000'.
    perform bdc_field using 'BDC_OKCODE'
    '=SP17'.
    perform bdc_field using 'BDC_CURSOR'
    'MPOP-PRMOD'.
    perform bdc_field using 'MARA-MEINS'
    ITAB-MEINS.
    perform bdc_field using 'MPOP-PRMOD'
    ITAB-PRMOD.
    perform bdc_field using 'MARC-PERKZ'
    ITAB-PERKZ.
    perform bdc_field using 'MPOP-PERAN'
    '60'.
    perform bdc_field using 'MPOP-ANZPR'
    '12'.
    perform bdc_field using 'MPOP-KZINI'
    ITAB-KZINI.
    perform bdc_field using 'MPOP-SIGGR'
    '4.000'.
    perform bdc_field using 'MARC-AUTRU'
    ITAB-AUTRU.
    perform bdc_field using 'MPOP-MODAV'
    ITAB-MODAV.
    *// Work Scheduling Screen
    perform bdc_dynpro using 'SAPLMGMM' '4000'.
    perform bdc_field using 'BDC_OKCODE'
    '=SP19'.
    perform bdc_field using 'BDC_CURSOR'
    'MARC-FRTME'.
    perform bdc_field using 'MARA-MEINS'
    ITAB-MEINS.
    *// Plant data / Stor. 1: Screen
    perform bdc_dynpro using 'SAPLMGMM' '4000'.
    perform bdc_field using 'BDC_OKCODE'
    '=SP20'.
    perform bdc_field using 'BDC_CURSOR'
    'MAKT-MAKTX'.
    perform bdc_field using 'MARA-MEINS'
    ITAB-MEINS.
    perform bdc_field using 'MARA-IPRKZ'
    ITAB-IPRKZ.
    *// Plant data / Stor. 2: Screen
    perform bdc_dynpro using 'SAPLMGMM' '4000'.
    perform bdc_field using 'BDC_OKCODE'
    '=SP21'.
    perform bdc_field using 'BDC_CURSOR'
    'MAKT-MAKTX'.
    perform bdc_field using 'MARA-BRGEW'
    '9000'.
    perform bdc_field using 'MARA-GEWEI'
    ITAB-GEWEI.
    perform bdc_field using 'MARA-NTGEW'
    '8000'.
    *// Warehouse Management 1: Screen
    perform bdc_dynpro using 'SAPLMGMM' '4000'.
    perform bdc_field using 'BDC_OKCODE'
    '=SP23'.
    perform bdc_field using 'BDC_CURSOR'
    'MAKT-MAKTX'.
    perform bdc_field using 'MARA-MEINS'
    ITAB-MEINS.
    perform bdc_field using 'MARA-BRGEW'
    '9000'.
    perform bdc_field using 'MARA-GEWEI'
    ITAB-GEWEI.
    *// Quality Management Screen
    perform bdc_dynpro using 'SAPLMGMM' '4000'.
    perform bdc_field using 'BDC_OKCODE'
    '=SP24'.
    perform bdc_field using 'BDC_CURSOR'
    'MAKT-MAKTX'.
    perform bdc_field using 'MARA-MEINS'
    ITAB-MEINS.
    *// Accounting 1: Screen
    perform bdc_dynpro using 'SAPLMGMM' '4000'.
    perform bdc_field using 'BDC_OKCODE'
    '=SP26'.
    perform bdc_field using 'MARA-MEINS'
    ITAB-MEINS.
    perform bdc_field using 'MBEW-BWTTY'
    ITAB-BWTTY.
    perform bdc_field using 'MARA-SPART'
    ITAB-SPART.
    perform bdc_field using 'BDC_CURSOR'
    'MBEW-STPRS'.
    perform bdc_field using 'MBEW-BKLAS'
    ITAB-BKLAS.
    perform bdc_field using 'MBEW-EKLAS'
    ITAB-EKLAS.
    perform bdc_field using 'MBEW-VPRSV'
    ITAB-VPRSV.
    perform bdc_field using 'MBEW-PEINH'
    '1'.
    perform bdc_field using 'MBEW-VERPR'
    '800'.
    perform bdc_field using 'MBEW-STPRS'
    '800'.
    *// Costing 1: Screen
    perform bdc_dynpro using 'SAPLMGMM' '4000'.
    perform bdc_field using 'BDC_OKCODE'
    '=SP27'.
    perform bdc_field using 'BDC_CURSOR'
    'MAKT-MAKTX'.
    perform bdc_field using 'MARA-MEINS'
    ITAB-MEINS.
    perform bdc_field using 'MBEW-EKALR'
    ITAB-EKALR.
    perform bdc_field using 'MARC-LOSGR'
    '1'.
    *// Costing 2: Screen
    perform bdc_dynpro using 'SAPLMGMM' '4000'.
    perform bdc_field using 'BDC_OKCODE'
    '=BABA'.
    perform bdc_field using 'BDC_CURSOR'
    'MAKT-MAKTX'.
    perform bdc_field using 'MBEW-BKLAS'
    ITAB-BKLAS.
    perform bdc_field using 'MBEW-BWTTY'
    ITAB-BWTTY.
    perform bdc_field using 'MBEW-EKLAS'
    ITAB-EKLAS.
    perform bdc_field using 'MBEW-VPRSV'
    ITAB-VPRSV.
    perform bdc_field using 'MBEW-PEINH'
    '1'.
    perform bdc_field using 'MBEW-VERPR'
    '800.00'.
    perform bdc_field using 'MBEW-STPRS'
    '800.00'.
    perform bdc_dynpro using 'SAPLSPO1' '0300'.
    perform bdc_field using 'BDC_OKCODE'
    '=YES'.
    *//BDC INSERT
    PERFORM BDC_TRANSACTION TABLES BDCDATA
    USING 'MM01'. " MESSAGES INTO GT_MSG.
    *// Text Header Data
    CONCATENATE ITAB-MATNR ' 000101'
    INTO GT_HEAD-TDNAME .
    GT_HEAD-TDOBJECT = 'MVKE' .
    GT_HEAD-TDID = '0001' .
    GT_HEAD-TDSPRAS = SY-LANGU.
    *// Sales Text
    GW_TEXT-TDFORMAT = '00'.
    GW_TEXT-TDLINE = ITAB-TDLINE .
    APPEND GW_TEXT TO GT_TEXT.
    CALL FUNCTION 'SAVE_TEXT'
    EXPORTING
    CLIENT = SY-MANDT
    HEADER = GT_HEAD
    INSERT = 'X'
    SAVEMODE_DIRECT = 'X'
    OWNER_SPECIFIED = ' '
    TABLES
    LINES = GT_TEXT
    EXCEPTIONS
    ID = 1
    LANGUAGE = 2
    NAME = 3
    OBJECT = 4
    OTHERS = 5.
    IF SY-SUBRC 0.
    SKIP 2.
    FORMAT COLOR COL_NEGATIVE INVERSE ON.
    WRITE: / 'Unable to Insert Salestext for Material : ', ITAB-MATNR .
    FORMAT COLOR COL_NEGATIVE INVERSE OFF.
    ENDIF.
    CLEAR: GT_HEAD, GT_TEXT, GW_TEXT.
    ENDFORM. "MM_UPLOAD

  • F-28 BDC problem when not debugging

    Hello friends,
    I have developed a BDC for the TCODE F-28 and everything works fine when i do in debug mode. NO problem at all. However when I do a no screen and if I am not debugging, it posts the invoice for one record and from second record on it fails.
    ANy suggestions as what could be the reason for this.
    Shreekant

    Try to give WAIT after the first record call. May this will help you out.

  • BDC PROBLEM for MIGO

    Dear all,
    there is problem in BDC MIGO report.  when i uploaded the p_file the bdc run but on some fields it gives the error message
    S Field GOITEM-ERFME . is not an input field
    S Field GOITEM-ERFMG . is not an input field
    S Field GOITEM-LSMNG . is not an input field
    S Field GOITEM-LSMEH . is not an input field
    S Field GOITEM-BWART . is not an input field
    S Field GOITEM-LGOBE . is not an input field
    S Field GOITEM-WEMPF . is not an input field
    S Field GOITEM-ABLAD . is not an input field
    S Field GOITEM-SGTXT . is not an input field
    these are all input fields and i defiend as
    perform bdc_field       using 'BDC_CURSOR'
                                  'GOITEM-ERFME'.
    perform bdc_field       using 'GOITEM-ERFME'
                                  IT_DATA-ERFME.
    perform bdc_field       using 'GOITEM-ERFMG'
                                  IT_DATA-ERFMG.
    perform bdc_field       using 'GOITEM-LSMNG'
                                  IT_DATA-LSMNG.
    perform bdc_field       using 'GOITEM-LSMEH'
                                  IT_DATA-LSMEH.
    *perform bdc_field       using 'GOITEM-MIGO_ELIKZ'
                                 '1'.
    perform bdc_field       using 'GOITEM-BWART'
                                  '101'.
    perform bdc_field       using 'GOITEM-LGOBE'
                                  IT_DATA-LGOBE.
    perform bdc_field       using 'GOITEM-WEMPF'
                                  IT_DATA-WEMPF.
    perform bdc_field       using 'GOITEM-ABLAD'
                                  IT_DATA-ABLAD.
    perform bdc_field       using 'GOITEM-SGTXT'              "
                                  IT_DATA-SGTXT.
    please solve my problem.
    Regards,
    Pankaj

    HI,
    May this will throw some light for u
    Geting problem in BDC prog of MIGO transaction
    Regards,
    Aditya

  • BDC Problem , Pls help

    Hi ,
    I am trying to create a BDC for routing opertaions update . During recording for a Screen ( that has subscreens )i get this :
    BDC_SUBSCR SAPLCPDO       1210GENERAL.
    I wanted to know Is there a special way to populate the subscreen fields ? I just copied the bdcdata-fnam = 'bdc_subscr' and fval = SAPLCPDO       1210GENERAL , but it looks like this is not the correct way as i get an error saying No transaction data for screen SAPLCPDO.
    I would appreciate if anyone can let me know how to code for this.
    Thank you very much

    Tamanna,
    If your requirement is how to code BDC program for a transaction which has subscreens in it...then refer to the example program I had created at one of my client places. But this is not for tcode CA02. Sorry I couldn't be of more help.
    * Table declaration
    TABLES:
      wyt3,
      /bay2/u7sxcrecce.
    *& Internal Table Declaration for Bushy Park Legacy data
    DATA : BEGIN OF i_leg OCCURS 0,
      po_nm(15),     " PO No - EBELN
      byrc(2),       " Purchasing group - buyer code - EKGRP
      vendor(10),    " LIFNR
      po_date(6),    " BEDAT
      cur(3),        " currency - WAERS
      zterm(2),      " terms code - ZTERM
      fob(2),        " FOB code - IINCO1
      mat(7),        " material - EMATN
      mat_pck(15),   " material PCK - ematn
      quant(15),     " quantity due - MENGE
      u_meas(2),     " Unit of measure - MEINS
      del_date(6),   " Item delivery date - EINDT
      ven_mat(30),   " Material # used by vendor
      net_pr(17),    " Net price - NETPR
      ship_via(3),   " Ship via
      del_loc(5),    " Delivery location -  ABLAD
      dist_acc(21),  " Distribution account
      txz01(55),     " Purchase Document Text
      recip(5),      " Recipient - WEMPF
      line_cd(3),    " Line code
      comp(2),       " Company
      line_num(4),   " PO line number
      indicator(1),  " Indictor as to what kind of PO's is being converted
      projnbr(30),   " filler
      works(2),      " Legacy works - WERKS
      work_ord(7),   " Work Order Number - AUFNR
      wbs(8),        " Project number - use for WBS x-ref
      cost_elem(7),  " G/L account for Project PO's w/o mat. master - SAKTO
      xref_wbs(23),  " WBS for manual load - SAKTO
      percent(12),   " Mara
    * Filler for NET PRICE
      filler(17),    " Mara - net price
      gl_act(7),     " GL acct for Work Order
      label(3),      " Label
      iwg_warehouse(9),
      cost_cen(5),   " Cost center
      expence_cl(4), " Expence class
      tax_code(2),   " Tax Code
      quan_gr(16),   " Quantity of goods received
      amt_gr(17),    " Amount of goods received
      quan_fi(16),   " Quantity invoiced
      amt_fi(17),    " Amount invoiced
      site(15),      " Site name - Added by Naren Somen
    *  flag(1),       " Indicator for valuted material - N/A
    *  commit_amt(14)," Commitment value
    END OF i_leg.
    *& Internal Table Declaration for SAP data
    DATA : BEGIN OF i_sap OCCURS 0,
              po_nm(15),            " PO No - EBELN
              ekgrp(3),             " Purchasing Group
              lifnr(10),            " Vendor Number
              zterm(4),             " Payment Terms
              werks(4),             " Plant
              txz01(40),            " Text
              netprice(14),         " Price
              commit_amt(14),       " Commitment values
           END OF i_sap.
    DATA: bdcdata LIKE bdcdata          OCCURS 0 WITH HEADER LINE.
    DATA: i_xleg LIKE i_leg OCCURS 0 WITH HEADER LINE.
    DATA: i_wyt3 LIKE wyt3 OCCURS 0 WITH HEADER LINE.
    DATA: p_itab LIKE i_leg OCCURS 0 WITH HEADER LINE.
    * Internal table to store the messages
    DATA: BEGIN OF i_mesage_tab OCCURS 0.
            INCLUDE STRUCTURE bdcmsgcoll .
    DATA END OF i_mesage_tab.
    *Begin of change by Naren Somen
    *Buffer to the hold the records from tab delimited text file
    DATA:  BEGIN OF i_record_buffer,
             record_buffer(4000)   TYPE c.
    DATA:  END OF i_record_buffer.
    *End of change by Naren Somen
    DATA: w_input_rec_count(6) TYPE n," Input File Record Counter
          w_address TYPE p,           " Count of vendor addresses found
          w_flg  TYPE c VALUE 'X',    " BDC Rec Indicator
          w_insert_line(1) TYPE c,    " Insert New Line Item in PO
          w_del_date(10),             " Delivery Date Format Changes
          w_year(4),                  " Year
          w_mon(2),                   " Month
          w_date(2),                  " Date
          w_purgrp(3),                " SAP Purchasing group
          w_vendor(10),               " SAP vendor
          w_payterm(4),               " SAP payment terms
          w_plant(4),                 " SAP plant
          w_acct(10),                 " SAP G/L acct - temp
          w_order(12),                " SAP Work Order Number
          w_aufnr LIKE ekkn-aufnr.    " Work Order
    DATA:  w_input LIKE swaexpdef-expr,
           w1_dec LIKE dfies-decimals,
           w_mul TYPE i,
           w_val TYPE i,
           w_val01 LIKE ekpo-netpr,
           w_netprice(11),                   " Net Price
           w_netprice_hold(11),              " hold variable for net price
           w_netprice1(14),                  " Net Price before dec. point
           w_netprice2(9),                   " Net Price after dec. point
           w_quant TYPE c VALUE '1',         " Quantity
           w_count LIKE sy-tabix,            " Loop Counter
           w_costcenter TYPE kostl,          " Costcenter
           w_glaccount TYPE kstar,           " G/L account
           w_item TYPE bstpo VALUE '0010',   " Line item number
           w_quote(1) TYPE x VALUE '27'.
    DATA: BEGIN OF i_epstp,
             field1(11) TYPE c VALUE 'RM06E-EPSTP',
             field2(1) TYPE c VALUE '(',
             field3(3) TYPE n VALUE 000,
             field4(1) TYPE c VALUE ')',
         END OF i_epstp.
    DATA: BEGIN OF i_knttp,
             field1(10) TYPE c VALUE 'EKPO-KNTTP',
             field2(1) TYPE c VALUE '(',
             field3(3) TYPE n VALUE 000,
             field4(1) TYPE c VALUE ')',
         END OF i_knttp.
    DATA: BEGIN OF i_txz01,
             field1(10) TYPE c VALUE 'EKPO-TXZ01',
             field2(1) TYPE c VALUE '(',
             field3(3) TYPE n VALUE 000,
             field4(1) TYPE c VALUE ')',
         END OF i_txz01.
    DATA: BEGIN OF i_eeind,
             field1(11) TYPE c VALUE 'RM06E-EEIND',
             field2(1) TYPE c VALUE '(',
             field3(3) TYPE n VALUE 000,
             field4(1) TYPE c VALUE ')',
         END OF i_eeind.
    DATA: BEGIN OF i_netpr,
             field1(10) TYPE c VALUE 'EKPO-NETPR',
             field2(1) TYPE c VALUE '(',
             field3(3) TYPE n VALUE 000,
             field4(1) TYPE c VALUE ')',
         END OF i_netpr.
    DATA: BEGIN OF i_matkl,
             field1(10) TYPE c VALUE 'EKPO-MATKL',
             field2(1) TYPE c VALUE '(',
             field3(3) TYPE n VALUE 000,
             field4(1) TYPE c VALUE ')',
         END OF i_matkl.
    DATA: BEGIN OF i_werks,
             field1(10) TYPE c VALUE 'EKPO-WERKS',
             field2(1) TYPE c VALUE '(',
             field3(3) TYPE n VALUE 000,
             field4(1) TYPE c VALUE ')',
         END OF i_werks.
    DATA: BEGIN OF i_ktext1,
             field1(11) TYPE c VALUE 'ESLL-KTEXT1',
             field2(1) TYPE c VALUE '(',
             field3(3) TYPE n VALUE 000,
             field4(1) TYPE c VALUE ')',
         END OF i_ktext1.
    DATA: BEGIN OF i_meins,
             field1(10) TYPE c VALUE 'ESLL-MEINS',
             field2(1) TYPE c VALUE '(',
             field3(3) TYPE n VALUE 000,
             field4(1) TYPE c VALUE ')',
          END OF i_meins.
    DATA: BEGIN OF i_ekpo_meins,
             field1(10) TYPE c VALUE 'EKPO-MEINS',
             field2(1) TYPE c VALUE '(',
             field3(3) TYPE n VALUE 000,
             field4(1) TYPE c VALUE ')',
         END OF i_ekpo_meins.
    DATA: BEGIN OF i_menge,
             field1(10) TYPE c VALUE 'ESLL-MENGE',
             field2(1) TYPE c VALUE '(',
             field3(3) TYPE n VALUE 000,
             field4(1) TYPE c VALUE ')',
         END OF i_menge.
    DATA: BEGIN OF i_ekpo_menge,
             field1(10) TYPE c VALUE 'EKPO-MENGE',
             field2(1) TYPE c VALUE '(',
             field3(3) TYPE n VALUE 000,
             field4(1) TYPE c VALUE ')',
         END OF i_ekpo_menge.
    DATA: BEGIN OF i_tbtwr,
             field1(10) TYPE c VALUE 'ESLL-TBTWR',
             field2(1) TYPE c VALUE '(',
             field3(3) TYPE n VALUE 000,
             field4(1) TYPE c VALUE ')',
         END OF i_tbtwr.
    DATA: BEGIN OF i_mkntm,
             field1(11) TYPE c VALUE 'RM11K-MKNTM',
             field2(1) TYPE c VALUE '(',
             field3(3) TYPE n VALUE 000,
             field4(1) TYPE c VALUE ')',
         END OF i_mkntm.
    DATA: BEGIN OF i_kostl,
             field1(10) TYPE c VALUE 'ESKN-KOSTL',
             field2(1) TYPE c VALUE '(',
             field3(3) TYPE n VALUE 000,
             field4(1) TYPE c VALUE ')',
         END OF i_kostl.
    DATA: BEGIN OF i_sakto,
             field1(10) TYPE c VALUE 'ESKN-SAKTO',
             field2(1) TYPE c VALUE '(',
             field3(3) TYPE n VALUE 000,
             field4(1) TYPE c VALUE ')',
         END OF i_sakto.
    DATA: BEGIN OF i_bstpo,
             field1(11) TYPE c VALUE 'RM06E-BSTPO',
             field2(1) TYPE c VALUE '(',
             field3(3) TYPE n VALUE 000,
             field4(1) TYPE c VALUE ')',
         END OF i_bstpo.
    DATA: BEGIN OF i_kstar,
             kstar TYPE kstar,
          END OF i_kstar.
    DATA: c_yb(2) VALUE 'YB'.
    DATA: c_partner_counter(3) TYPE c VALUE '002'. "Partner Counter -
    "Naren Somen
    CONSTANTS: c_185(4) TYPE c VALUE '0185',     " System ID - Walker
               c_202(4) TYPE c VALUE '0202',     " System ID - Bushy Park
               c_delimiter(1) TYPE x  VALUE '09'," tab character-Naren Somen
               c_unit(2) TYPE c VALUE 'PU',      " Unit of measure
               c_sq(2) TYPE c VALUE 'SQ',
               c_zero(1) TYPE c VALUE '0',
               c_loop(2) TYPE c VALUE '14',
               c_00(2) TYPE c VALUE '00'.
    *& Input Parameters / Selection Options
    SELECTION-SCREEN BEGIN OF BLOCK bl1 WITH FRAME TITLE text-tx1.
    PARAMETERS : p_input  LIKE filename-fileextern OBLIGATORY,  " Input File
                 p_error  LIKE filename-fileextern OBLIGATORY. " Output File
    SELECTION-SCREEN END OF BLOCK bl1.
    SELECTION-SCREEN BEGIN OF BLOCK bl3 WITH FRAME TITLE text-tx3.
    PARAMETERS : p_ekorg LIKE ekko-ekorg OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK bl3.
    SELECTION-SCREEN BEGIN OF BLOCK bl4 WITH FRAME TITLE text-tx4.
    PARAMETERS : p_uname LIKE apqi-userid OBLIGATORY,
                 p_sess LIKE bgr00-group OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK bl4.
    *& Main Program Logic
    START-OF-SELECTION.
      PERFORM open_input_output_files.
      PERFORM create_bdc_session.
      PERFORM write_results.
    END-OF-SELECTION.
    *&      Form  OPEN_INPUT_OUTPUT_FILES
    FORM open_input_output_files.
      PERFORM open_input_file.
      PERFORM open_output_error_file.
    ENDFORM.                    " OPEN_INPUT_OUTPUT_FILES
    *&      Form  CREATE_BDC_SESSION
    FORM create_bdc_session.
      PERFORM open_group.
      i_xleg[] = i_leg[].
      LOOP AT i_leg.
        IF i_leg-po_nm = i_xleg-po_nm.
          SKIP.
        ELSE.
          PERFORM read_xref_tables.
    *-- First screen
          CLEAR w_insert_line.
          PERFORM bdc_dynpro      USING 'SAPMM06E'    '0100'.
          PERFORM bdc_field       USING 'BDC_CURSOR'  'RM06E-BSART'.
          PERFORM bdc_field       USING 'BDC_OKCODE'  '/00'.
          PERFORM bdc_field       USING 'EKKO-LIFNR'  i_sap-lifnr.
          PERFORM bdc_field       USING 'RM06E-BSART' c_yb.
          PERFORM bdc_field       USING 'EKKO-EKORG'  p_ekorg.
          PERFORM bdc_field       USING 'EKKO-EKGRP'  i_sap-ekgrp.
          PERFORM vendor_address.
          IF w_address EQ '3'.
            PERFORM bdc_dynpro      USING 'SAPMSSY0'    '0120'.
            PERFORM bdc_field       USING 'BDC_CURSOR'  '04/02'.
            PERFORM bdc_field       USING 'BDC_OKCODE'  '=SELV'.
            PERFORM bdc_dynpro      USING 'SAPMSSY0'    '0120'.
            PERFORM bdc_field       USING 'BDC_CURSOR'  '04/02'.
            PERFORM bdc_field       USING 'BDC_OKCODE'  '=SELV'.
            PERFORM bdc_dynpro      USING 'SAPMSSY0'    '0120'.
            PERFORM bdc_field       USING 'BDC_CURSOR'  '04/02'.
            PERFORM bdc_field       USING 'BDC_OKCODE'  '=SELV'.
          ENDIF.
          IF w_address EQ '2'.
            PERFORM bdc_dynpro      USING 'SAPMSSY0'    '0120'.
            PERFORM bdc_field       USING 'BDC_CURSOR'  '04/02'.
            PERFORM bdc_field       USING 'BDC_OKCODE'  '=SELV'.
            PERFORM bdc_dynpro      USING 'SAPMSSY0'    '0120'.
            PERFORM bdc_field       USING 'BDC_CURSOR'  '04/02'.
            PERFORM bdc_field       USING 'BDC_OKCODE'  '=SELV'.
          ENDIF.
          IF w_address EQ '1'.
            PERFORM bdc_dynpro      USING 'SAPMSSY0'    '0120'.
            PERFORM bdc_field       USING 'BDC_CURSOR'  '04/02'.
            PERFORM bdc_field       USING 'BDC_OKCODE'  '=SELV'.
          ENDIF.
          PERFORM bdc_dynpro      USING 'SAPMM06E'    '0120'.
          PERFORM bdc_field       USING 'BDC_CURSOR'  'RM06E-EBELP'.
          PERFORM bdc_field       USING 'BDC_OKCODE'  '=KOPF'.
          PERFORM bdc_dynpro      USING 'SAPMM06E'    '0101'.
          PERFORM bdc_field       USING 'BDC_CURSOR'  'EKKO-VERKF'.
          PERFORM bdc_field       USING 'BDC_OKCODE'  'AB'.
          PERFORM bdc_field       USING 'EKKO-VERKF'  i_leg-po_nm.
          PERFORM bdc_field       USING 'EKKO-ZTERM'  i_sap-zterm.
          PERFORM bdc_field       USING 'EKKO-SPRAS'  'EN'.
          PERFORM bdc_field       USING 'BDC_SUBSCR'  'SAPLXM06'.
          PERFORM record_counter.
          LOOP AT i_xleg WHERE po_nm EQ i_leg-po_nm.
    *        w_count = w_count + 1.
            WRITE: i_leg-del_date TO w_del_date YYMMDD.
            CONCATENATE '20' w_del_date INTO w_del_date.
            MOVE w_del_date(4) TO w_year.
            MOVE w_del_date+4(2) TO w_date.
            MOVE w_del_date+6(2) TO w_mon.
            CONCATENATE w_date '/' w_mon '/' w_year INTO w_del_date.
            PERFORM item_xref_tables.
            IF w_insert_line EQ space.
    *-- Second Screen Line # 1
              PERFORM bdc_dynpro  USING 'SAPMM06E' '0120'.
              PERFORM bdc_field   USING 'BDC_CURSOR'  i_eeind.
              PERFORM bdc_field   USING 'BDC_OKCODE'  '/00'.
    *          PERFORM bdc_field   USING i_bstpo  w_item.
              PERFORM bdc_field   USING i_epstp  'D'.
              PERFORM bdc_field   USING i_knttp  'K'.
              PERFORM bdc_field   USING i_txz01  i_sap-txz01.
              PERFORM bdc_field   USING i_eeind  w_del_date.
              PERFORM bdc_field   USING i_netpr  i_sap-netprice.
              PERFORM bdc_field   USING i_matkl  '25080400'.
              PERFORM bdc_field   USING i_werks  i_sap-werks.
    **-- Second Screen Line # 2 Onwards.
            ELSE.
    *--- Call Insert Line.
              PERFORM line_item_data.
              IF i_epstp-field3 GT c_loop.
                PERFORM bdc_dynpro   USING 'SAPMM06E' '0120'.
                PERFORM bdc_field    USING 'BDC_CURSOR'  'RM06E-EBELP'.
                PERFORM bdc_field    USING 'BDC_OKCODE'  '=NP'.
                PERFORM record_counter.
                PERFORM line_item_data.
              ENDIF.
              PERFORM bdc_dynpro   USING 'SAPMM06E' '0120'.
              PERFORM bdc_field    USING 'BDC_CURSOR'  i_eeind.
              PERFORM bdc_field    USING 'BDC_OKCODE'  '/00'.
    *          PERFORM bdc_field    USING i_bstpo  w_item.
              PERFORM bdc_field    USING i_epstp  'D'.
              PERFORM bdc_field    USING i_knttp  'K'.
              PERFORM bdc_field    USING i_txz01  i_sap-txz01.
              PERFORM bdc_field    USING i_eeind  w_del_date.
              PERFORM bdc_field    USING i_netpr  i_sap-netprice.
              PERFORM bdc_field    USING i_matkl  '25080400'.
              PERFORM bdc_field    USING i_werks  i_sap-werks.
            ENDIF.
            w_insert_line = 'X'.
    *-- Third Screen.
            PERFORM bdc_dynpro      USING 'SAPLMLSP'    '0200'.
            PERFORM bdc_field       USING 'BDC_OKCODE'  '/00'.
            PERFORM bdc_field       USING 'BDC_SUBSCR'  'SAPLMLSP'.
            PERFORM bdc_field       USING 'BDC_SUBSCR'  'SAPLMLSL'.
            PERFORM bdc_field       USING 'BDC_SUBSCR'  'SAPLMLSL'.
            PERFORM bdc_field       USING 'BDC_SUBSCR'  'SAPLMLSP'.
            PERFORM bdc_field       USING 'BDC_CURSOR'  'ESLL-TBTWR(01)'.
            PERFORM bdc_field       USING i_ktext1 i_sap-txz01.
            PERFORM bdc_field       USING i_menge  i_xleg-quant.
            PERFORM bdc_field       USING i_meins  'PU'.
            PERFORM bdc_field       USING i_tbtwr  i_sap-netprice.
            PERFORM bdc_dynpro      USING 'SAPLMLSK'    '0200'.
            PERFORM bdc_field       USING 'BDC_CURSOR'  'ESKN-SAKTO(01)'.
            PERFORM bdc_field       USING 'BDC_OKCODE'  '/00'.
            PERFORM bdc_field       USING i_mkntm  w_quant.
            PERFORM bdc_field       USING i_kostl  w_costcenter.
            PERFORM bdc_field       USING i_sakto  w_glaccount.
            PERFORM bdc_dynpro      USING 'SAPLMLSK'    '0200'.
            PERFORM bdc_field       USING 'BDC_CURSOR'  'ESLL-INTROW'.
            PERFORM bdc_field       USING 'BDC_OKCODE'  '=BACK'.
            PERFORM bdc_dynpro      USING 'SAPLMLSP'    '0200'.
            PERFORM bdc_field       USING 'BDC_OKCODE'  '=ESB'.
            PERFORM bdc_field       USING 'BDC_SUBSCR'  'SAPLMLSP'.
            PERFORM bdc_field       USING 'BDC_SUBSCR'  'SAPLMLSL'.
            PERFORM bdc_field       USING 'BDC_SUBSCR'  'SAPLMLSL'.
            PERFORM bdc_field       USING 'BDC_SUBSCR'  'SAPLMLSP'.
            PERFORM bdc_field       USING 'BDC_CURSOR'  'ESLL-KTEXT1(01)'.
            ENDLOOP.
            PERFORM bdc_dynpro      USING 'SAPMM06E' '0120'.
            PERFORM bdc_field       USING 'BDC_OKCODE'  '=BU'.
            PERFORM bdc_transaction USING 'ME21'.
        ENDIF.
      ENDLOOP.
      PERFORM close_group.
    ENDFORM.                    " CREATE_BDC_SESSION
    *&      Form  WRITE_RESULTS
    FORM write_results.
      WRITE: text-tx5, w_input_rec_count.
    ENDFORM.                    " WRITE_RESULTS
    *&      Form  OPEN_INPUT_FILE
    FORM open_input_file.
      OPEN DATASET p_input FOR INPUT IN TEXT MODE.
      IF sy-subrc <> 0.
        MESSAGE e000 WITH p_input.
      ENDIF.
      DO.
        READ DATASET p_input INTO i_record_buffer.
        IF sy-subrc <> 0.
          EXIT.
        ELSE.
          SPLIT i_record_buffer-record_buffer AT  c_delimiter INTO
                                                    i_leg-po_nm
                                                    i_leg-byrc
                                                    i_leg-vendor
                                                    i_leg-po_date
                                                    i_leg-cur
                                                    i_leg-zterm
                                                    i_leg-fob
                                                    i_leg-mat
                                                    i_leg-mat_pck
                                                    i_leg-quant
                                                    i_leg-u_meas
                                                    i_leg-del_date
                                                    i_leg-ven_mat
                                                    i_leg-net_pr
                                                    i_leg-ship_via
                                                    i_leg-del_loc
                                                    i_leg-dist_acc
                                                    i_leg-txz01
                                                    i_leg-recip
                                                    i_leg-line_cd
                                                    i_leg-comp
                                                    i_leg-line_num
                                                    i_leg-indicator
                                                    i_leg-projnbr
                                                    i_leg-works
                                                    i_leg-work_ord
                                                    i_leg-wbs
                                                    i_leg-cost_elem
                                                    i_leg-xref_wbs
                                                    i_leg-percent
                                                    i_leg-filler
                                                    i_leg-gl_act
                                                    i_leg-label
                                                    i_leg-iwg_warehouse
                                                    i_leg-cost_cen
                                                    i_leg-expence_cl
                                                    i_leg-tax_code
                                                    i_leg-quan_gr
                                                    i_leg-amt_gr
                                                    i_leg-quan_fi
                                                    i_leg-amt_fi
    "Added by Naren Somen
                                                    i_leg-site.
    *                                                i_leg-flag
    *                                                i_leg-commit_amt.
          APPEND i_leg.
        ENDIF.
      ENDDO.
      DESCRIBE TABLE i_leg LINES w_input_rec_count.
      CLOSE DATASET p_input.
    ENDFORM.                    " OPEN_INPUT_FILE
    *&      Form  OPEN_OUTPUT_ERROR_FILE
    FORM open_output_error_file.
      OPEN DATASET p_error FOR OUTPUT IN TEXT MODE.
      IF sy-subrc <> 0.
        MESSAGE e001 WITH p_error.
      ENDIF.
    ENDFORM.                    " OPEN_OUTPUT_ERROR_FILE
    *&      Form  OPEN_GROUP
    FORM open_group.
      CALL FUNCTION 'BDC_OPEN_GROUP'
           EXPORTING
                client = sy-mandt
                group  = p_sess
                user   = p_uname
                keep   = 'X'.
    ENDFORM.                    " OPEN_GROUP
    *&      Form  BDC_DYNPRO
    FORM bdc_dynpro USING  program  dynpro.
      CLEAR bdcdata.
      bdcdata-program  = program.
      bdcdata-dynpro   = dynpro.
      bdcdata-dynbegin = w_flg.
      APPEND bdcdata.
      CLEAR bdcdata.
    ENDFORM.                               " BDC_DYNPRO
    *&      Form  BDC_FIELD
    FORM bdc_field USING fnam fval.
      CLEAR bdcdata.
      bdcdata-fnam = fnam.
      bdcdata-fval = fval.
      APPEND bdcdata.
      CLEAR bdcdata.
    ENDFORM.                               " BDC_FIELD
    *&      Form  BDC_transaction
    FORM bdc_transaction USING tran_code.
      CALL FUNCTION 'BDC_INSERT'
           EXPORTING
                tcode     = tran_code
           TABLES
                dynprotab = bdcdata.
      CLEAR bdcdata.
      REFRESH bdcdata.
    ENDFORM.                               " BDC_TRANSACTION
    *&      Form  CLOSE_GROUP
    FORM close_group.
      CALL FUNCTION 'BDC_CLOSE_GROUP'
           EXCEPTIONS
                not_open    = 0
                queue_error = 0
                OTHERS      = 0.
    ENDFORM.                               " CLOSE_GROUP
    *&      Form  READ_XREF_TABLES
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM read_xref_tables.
      CLEAR i_sap.
      PERFORM convert_pur_group            USING i_leg-byrc.
      PERFORM convert_vendor               USING i_leg-vendor.
      PERFORM convert_payterm              USING i_leg-zterm.
    ENDFORM.                    " READ_XREF_TABLES
    *&      Form  CONVERT_PUR_GROUP
    FORM convert_pur_group USING    p_byrc.
      SELECT SINGLE ekgrp FROM /bay2/u7emxrbuyr
         INTO w_purgrp
         WHERE system_id EQ c_185 AND leginp_cd EQ p_byrc.
      IF sy-subrc EQ 0.
        MOVE w_purgrp TO i_sap-ekgrp.
        CLEAR w_purgrp.
      ENDIF.
    ENDFORM.                    " CONVERT_PUR_GROUP
    *&      Form  CONVERT_VENDOR
    FORM convert_vendor USING    p_vendor.
      DATA : w_venfamily(8) TYPE c,
             w_vendor_temp(7) TYPE c,
             wa_vendor TYPE /bay2/u7pxxrvend,
             wa_vendor1 TYPE /bay2/u7pxxrvend.
      CLEAR: w_vendor, w_venfamily, w_vendor_temp.
    * Select with Full Vendor Number
      SELECT SINGLE * FROM /bay2/u7pxxrvend INTO wa_vendor
          WHERE leg_ven_num EQ p_vendor AND system_id = c_185.
      IF sy-subrc EQ 0.
        IF wa_vendor-ktokk EQ 'YKRD'.
          MOVE wa_vendor-lifnr TO w_vendor.
        ELSE.     " IF YSUP
    * Select the YKRD for corrusponding YSUP from WYT3
          SELECT ekorg lifnr
          INTO (wyt3-ekorg, wyt3-lifnr)
          FROM wyt3
          WHERE
          lifn2 EQ wa_vendor-lifnr.
            SELECT SINGLE lifnr
            INTO w_vendor
            FROM wyt3
            WHERE lifnr EQ wyt3-lifnr AND
                  ekorg EQ wyt3-ekorg AND
                  parvw EQ 'LF'.
            IF sy-subrc EQ 0.
              EXIT.
            ENDIF.
          ENDSELECT.                " SELECT ekorg lifnr
        ENDIF.                      " IF wa_vendor-ktokk EQ 'YKRD'.
      ENDIF.                        " IF SY-SUBRC EQ 0.
      IF w_vendor IS  INITIAL.
    * Select YKRD with Legacy Vendor Family Number
        MOVE p_vendor TO w_vendor_temp.
        CONCATENATE w_vendor_temp '%' INTO w_venfamily.
        SELECT SINGLE * FROM /bay2/u7pxxrvend INTO wa_vendor1
                WHERE leg_ven_num LIKE w_venfamily AND
                ktokk EQ 'YKRD' AND system_id = c_185.
        IF sy-subrc EQ 0.
          MOVE wa_vendor1-lifnr TO w_vendor.
          MOVE w_vendor TO i_sap-lifnr.
        ELSE.
          CONCATENATE p_vendor 'X' INTO i_sap-lifnr.
        ENDIF.
      ELSE.
        MOVE w_vendor TO i_sap-lifnr.
      ENDIF.
    ENDFORM.                    " CONVERT_VENDOR
    *&      Form  CONVERT_PAYTERM
    FORM convert_payterm USING    p_i_leg01_trms_code.
      SELECT SINGLE zterm
      INTO w_payterm
      FROM /bay2/u7emcpterm
      WHERE legpterm EQ p_i_leg01_trms_code AND system_id = c_185.
      IF sy-subrc = 0.
        MOVE w_payterm TO i_sap-zterm.
        CLEAR w_payterm.
      ENDIF.
    ENDFORM.                    " CONVERT_PAYTERM
    *&      Form  CONVERT_PLANT
    FORM convert_plant USING p_works.
      SELECT SINGLE werks FROM /bay2/u7smcpwerk
         INTO w_plant
         WHERE system_id EQ c_185
         AND legwerks EQ p_works.
      IF sy-subrc = 0.
        MOVE w_plant TO i_sap-werks.
      ENDIF.
    ENDFORM.                    " CONVERT_PLANT
    *&      Form  VENDOR_ADDRESS
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM vendor_address.
      REFRESH i_wyt3.
      SELECT * FROM wyt3 INTO i_wyt3
      WHERE lifnr EQ i_sap-lifnr
      AND parza = c_partner_counter.
        APPEND i_wyt3.
        CLEAR i_wyt3.
      ENDSELECT.
      DESCRIBE TABLE i_wyt3 LINES w_address.
    ENDFORM.                    " VENDOR_ADDRESS
    *&      Form  ITEM_XREF_TABLES
    FORM item_xref_tables.
      PERFORM convert_plant                USING i_xleg-works.
      PERFORM convert_costcenter           USING i_xleg-cost_cen
    i_xleg-works.
      PERFORM convert_glacc                USING i_xleg-expence_cl.
      MOVE: i_xleg-txz01(40) TO i_sap-txz01,
            i_xleg-po_nm TO i_sap-po_nm,
            i_xleg-filler+3(14) TO i_sap-netprice.
    *        i_xleg-commit_amt TO i_sap-commit_amt.
    ENDFORM.                    " ITEM_XREF_TABLES
    *&      Form  RECORD_COUNTER
    FORM record_counter.
      i_epstp-field3 = 1.
      i_knttp-field3 = 1.
      i_txz01-field3 = 1.
      i_eeind-field3 = 1.
      i_netpr-field3 = 1.
      i_matkl-field3 = 1.
      i_werks-field3 = 1.
      i_ktext1-field3 = 1.
      i_meins-field3 = 1.
      i_menge-field3 = 1.
      i_tbtwr-field3 = 1.
      i_mkntm-field3 = 1.
      i_kostl-field3 = 1.
      i_sakto-field3 = 1.
      i_ekpo_meins-field3 = 1.
      i_ekpo_menge-field3 = 1.
      w_count = 0.
    ENDFORM.
    *&      Form  LINE_ITEM_DATA
    FORM line_item_data.
       i_epstp-field3 = i_epstp-field3 + 1.
       i_knttp-field3 = i_knttp-field3 + 1.
       i_txz01-field3 = i_txz01-field3 + 1.
       i_eeind-field3 = i_eeind-field3 + 1.
       i_netpr-field3 = i_netpr-field3 + 1.
       i_matkl-field3 = i_matkl-field3 + 1.
       i_werks-field3 = i_werks-field3 + 1.
       i_ekpo_menge-field3 = i_ekpo_menge-field3 + 1.
       i_ekpo_meins-field3 = i_ekpo_meins-field3 + 1.
       w_item = w_item + 10.
    ENDFORM.
    *&      Form  CONVERT_COSTCENTER
    FORM convert_costcenter           USING p_costcenter p_works.
       CONCATENATE c_sq p_works p_costcenter c_zero INTO w_costcenter.
    ENDFORM.
    *&      Form  CONVERT_COSTCENTER
    FORM convert_glacc                USING w_expence_cl.
       SELECT SINGLE kstar FROM /bay2/u7sxcrecce INTO i_kstar-kstar WHERE
    leginp_cd EQ w_expence_cl.
       MOVE i_kstar-kstar TO w_glaccount.
    ENDFORM.
    Thanks,

  • VF01 BDC PROBLEM

    Hi.
    I have a BDC code which runs fine using call transaction VF01 and Mode = 'A'.
    But when I run it in Mode = N, its not executed. Invoice is not created.
    Any idea?
    I tried with other options like Update = 'S' and 'A' and 'L'.
    My code is as below ::
    FORM GET_OPENORDERS.
    SELECT VBELN ERDAT VKORG LFART FROM LIKP INTO TABLE ITAB_LIKP WHERE VKORG = '3010'.
      SELECT VBELN XBLNR FROM VBAK INTO TABLE ITAB_VBAK WHERE
      VBELN = '0000000483'.
                                             AUART = 'ZCKD' OR
                                             AUART = 'ZEXS' OR
                                             AUART = 'ZCLM' OR
                                             AUART = 'ZISO' OR
                                             VKORG = '3010' AND
                                             VTWEG = '30'  AND
                                             SPART = '30' AND
                                             ERDAT = SY-DATUM.
        IF NOT ITAB_VBAK[] IS INITIAL.
          SELECT VBELN VBTYP FROM VBUK INTO TABLE ITAB_VBUK FOR ALL ENTRIES IN ITAB_VBAK
                                                            WHERE
                                                            VBELN = ITAB_VBAK-VBELN AND
                                                            LFSTK = 'C' AND    " DELIVERY STATUS : COMPLETED
                                                            LFGSK = 'C' AND    " OVER ALLDELIVERY STATUS : COMPLETED
                                                            FKSAK NE 'C' AND   " BILLING STATUS ORDER : NOT COMPLETED
                                                            VBTYP = 'C'.       " DOC TYPE = ORDERS
        ENDIF.
      ENDFORM.                    " GET_OPENORDERS
    *&      Form  CREATE_INVOICE
          text
    -->  p1        text
    <--  p2        text
    FORM CREATE_INVOICE .
      LOOP AT ITAB_VBUK.
    DO.
       READ DATASET DATASET INTO RECORD.
       IF SY-SUBRC <> 0. EXIT. ENDIF.
        PERFORM BDC_DYNPRO      USING 'SAPMV60A' '0102'.
        PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                     '0000000464'.
                                       ITAB_VBUK-VBELN.
        PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM BDC_FIELD       USING 'KOMFK-VBELN(01)'
                                      ITAB_VBUK-VBELN.
                                     RECORD-VBELN_01_001.
        PERFORM BDC_DYNPRO      USING 'SAPMV60A' '0104'.
        PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                      'ZESO'.
        PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                      '=SICH'.
       PERFORM BDC_TRANSACTION USING 'VF01'.
    ENDDO.
      WAIT UP TO 1 SECONDS.
        CALL TRANSACTION 'VF01' USING BDCDATA MODE 'N'
                                       UPDATE 'S'
                                       MESSAGES INTO MESSTAB.
        COMMIT WORK AND WAIT.
        CLEAR: BDCDATA, MESSTAB.
        REFRESH: BDCDATA, MESSTAB.
      ENDLOOP.
    PERFORM CLOSE_GROUP.
    PERFORM CLOSE_DATASET USING DATASET.
    loop at MESSTAB.
    write : Messtab.
    endloop.
    ENDFORM.                    " CREATE_INVOICE
           Start new screen                                              *
    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.
      IF FVAL <> SPACE.
        CLEAR BDCDATA.
        BDCDATA-FNAM = FNAM.
        BDCDATA-FVAL = FVAL.
        APPEND BDCDATA.
      ENDIF.
    ENDFORM.                    "BDC_FIELD

    Hi All,
    Thanks for the replies.
    Just adding my comments here.
    We need to do the saperate recording for this problem.
    In SHDB, we have to select "Simulate Background Mode"
    My problem is solved.
    Adding here so that it will appear in teh search results for others....
    May be.. cheers,

  • Fs00 bdc problem in ticking checkbox fields

    Hello All,
    I have written bdc for tcode FS00 for gl master record upload but im getting error while uploading.
    In flat file i have putted value 'x' for posting without tax allowed, manage in local currency,open item and line item but when im running a bdc the checkboxes are getting checked but im getting the error "enter a valid value"
    If i create every account manually and tick the checkbox thn its not giving error but in bdc program if i m putting tick in checkbox im getting error
    Pls let me knw is there any other value of checkbox other thn 'x'?
    Thnks
    Sunny

    hi Sunny,
    just rin the BDS in mode A (show all screens) or E (stop at error), so that you'll see what is exactly the problem. I assume the problem is somewhere else (not by the checkboxes), for another field you enter a wrong value, which is not accepted by the system. Just check, where the cursor is placed, right after the error message!
    hope this helps
    ec

  • VA01 BDC problem

    Hi Experts,
    I am running a BDC for VA01 transaction, it is working fine when customer is not having incompletion log, but my problem is suppose customer is having incompletion log that time in Va01 it is showing one report which indicates all the error against that customer in ALV format. 
    When i am trying to record that report that time recording is going up to report but it is not coming out from there.
    I am already capturing standard messages but it is not capturing the report error, i have discussed with functional team they are saying for them that report itself is error.
    Can any one help me on this if customer is having any incompletion log in va01 how to capture that in bdc.

    Hi,
    You may well be able to get around this by using BAPI_SALESORDER_CREATEFROMDAT2 instead of a BDC - it has a parameter "BEHAVE_WHEN_ERROR" that may let you save the document even with the incompletion entries.  The users would then just have to process the entries later via VA02 but that should be part of a normal business process anyway.
    Gareth.

Maybe you are looking for

  • Need to display "Calendar Month/Year" at report level from Calendar Day

    Hello Experts, I have a scenario in which I have 0CALDAY (e.g. 01.01.2009) along with other fields available in my report. My requirement is to display "Calendar Month/Year" (01.2009) in my report. Is it possible to have "Calendar Month/Year" in my r

  • Problem with get pernr

    in my requirement i take the perner from one program  to ldb program and i want the ldb to run for my pernr value from other program...its working  in dubbing  mode .. now the prob is i m not able to come out of the loop between get pernr and end of

  • Oracle Services not seen in Service Panel

    I am runnig an Oracle 9 database on Windows NT server. For some reason the Oracle Services that was seen in the Services Window of the Control Panel disappeared.I could see the regedit is safe and the Database is running.How do I get the services to

  • Satellite Pro A200-1MA - Doesn't boot after disassembling

    Thats the one so my laptop was overheating heavily and I decided to clean the cooler and the parts around it. I disassembled the laptop to the point where I can take the cooler off, cleaned it and then I put everything back. The problem is now it won

  • Pms document tables

    HI i have to find from which tables the fileds like ratings,provisional ratings by RM,Comments by RM, Total score etc are retreived. I opened tcode phap_admin and gave appraisee name and when i execute it will open pms document .When i click on docum