Help me in bdc

Hi frnd...
    i hav a doubt in bdc that when we go for call transaction or session method for inserting data into respective tables, we come through errors.
so can anyone help me how to handle error.
so we say that we delete successful records and reprocess the bdc.
but can anyone tell how to delete those records.
i dont think its possible manually.
so plz reply me so that i can clarify my dpubt.
                                     regards,
                                      rajesh

Hai Rahesh
Check the following Code
report Z_CALLTRANS_VENDOR_01
no standard page heading line-size 255.
Generated data section with specific formatting - DO NOT CHANGE ***
data: begin of it_lfa1 occurs 0,
KTOKK like lfa1-ktokk,
NAME1 like lfa1-name1,
SORTL like lfa1-sortl,
LAND1 like lfa1-land1,
end of it_lfa1.
End generated data section ***
data : it_bdc like bdcdata occurs 0 with header line.
*DATA: IT_MESSAGES TYPE TABLE OF BDCMSGCOLL WITH HEADER LINE.
*DATA: LV_MESSAGE(255).
<b>data : it_messages like bdcmsgcoll occurs 0 with header line.
data : V_message(255).</b>
data : V_flag.
data : V_datum1 type sy-datum.
data : begin of it_mesg occurs 0,
message(100),
end of it_mesg.
*V_datum1 = sy-datum-1.
parameters : P_Sess like APQI-GROUPID.
start-of-selection.
perform Get_data.
*perform open_group.
loop at it_lfa1.
perform bdc_dynpro using 'SAPMF02K' '0100'.
perform bdc_field using 'BDC_CURSOR'
'RF02K-KTOKK'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RF02K-KTOKK'
it_lfa1-KTOKK.
perform bdc_dynpro using 'SAPMF02K' '0110'.
perform bdc_field using 'BDC_CURSOR'
'LFA1-LAND1'.
perform bdc_field using 'BDC_OKCODE'
'=UPDA'.
perform bdc_field using 'LFA1-NAME1'
it_lfa1-name1.
perform bdc_field using 'LFA1-SORTL'
it_lfa1-sortl.
perform bdc_field using 'LFA1-LAND1'
it_lfa1-land1.
<b>call transaction 'XK01' using it_bdc
mode 'N'
update 'S'
messages into it_messages.</b>
if sy-subrc <> 0.
if V_flag <> 'X'.
perform open_group.
V_flag = 'X'.
endif.
perform bdc_transaction. "using 'XK01'.
endif.
<b>perform format_messages.</b>
<b>refresh : it_bdc,it_messages.</b>.
endloop.
if V_flag = 'X'.
perform close_group.
endif.
*& Form Get_data
text
--> p1 text
<-- p2 text
FORM Get_data .
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = 'C:\srinu_vendor.txt'
FILETYPE = 'DAT'
TABLES
DATA_TAB = it_lfa1
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.
ENDFORM. " Get_data
*& Form bdc_dynpro
text
-->P_0061 text
-->P_0062 text
FORM BDC_DYNPRO USING PROGRAM DYNPRO.
CLEAR it_BDC.
it_BDC-PROGRAM = PROGRAM.
it_BDC-DYNPRO = DYNPRO.
it_BDC-DYNBEGIN = 'X'.
APPEND it_BDC.
ENDFORM.
Insert field *
FORM BDC_FIELD USING FNAM FVAL.
CLEAR it_BDC.
it_BDC-FNAM = FNAM.
it_BDC-FVAL = FVAL.
APPEND it_BDC.
ENDFORM.
*& Form format_messages
text
--> p1 text
<-- p2 text
<b>FORM format_messages .
loop at it_messages.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
ID = it_messages-MSGID
LANG = 'EN'
NO = it_messages-MSGNR
V1 = it_messages-MSGV1
V2 = it_messages-MSGV2
V3 = it_messages-MSGV3
V4 = it_messages-MSGV4
IMPORTING
MSG = V_message
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.
ENDIF.
write : / V_message.
clear : V_message.
endloop.
ENDFORM. " format_messages</b>
*& Form open_group
text
--> p1 text
<-- p2 text
FORM open_group .
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING
CLIENT = SY-MANDT
GROUP = P_Sess
HOLDDATE = V_datum1
KEEP = 'X'
USER = SY-UNAME
IF SY-SUBRC = 0.
write : / 'Session Creating wit Name : ',P_Sess.
ENDIF.
ENDFORM. " open_group
*& Form close_group
text
--> p1 text
<-- p2 text
FORM close_group .
CALL FUNCTION 'BDC_CLOSE_GROUP'.
ENDFORM. " close_group
*& Form bdc_transaction
text
-->P_0132 text
FORM bdc_transaction. "USING VALUE(P_0132).
CALL FUNCTION 'BDC_INSERT'
EXPORTING
TCODE = 'XK01'
POST_LOCAL = NOVBLOCAL
PRINTING = NOPRINT
SIMUBATCH = ' '
CTUPARAMS = ' '
TABLES
DYNPROTAB = it_bdc
EXCEPTIONS
INTERNAL_ERROR = 1
NOT_OPEN = 2
QUEUE_ERROR = 3
TCODE_INVALID = 4
PRINTING_INVALID = 5
POSTING_INVALID = 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.
ENDFORM. " bdc_transaction
Thanks & regards
Sreenivasulu P

Similar Messages

  • Problem to generate same VA01 search help screen in BDC Program

    Hi All,
              I have got one issue.
              The issue is that i need to generate the search (F4) help screen of VA01 search for articles in the program,.
              I tried to record using BDC, but the screen generated is different.
              Can anyone please guide me how to generate that same search help screen in Program using BDC or any other tool.

    Hi
    Just check the field in the VA01 for which you are using BDC , you may get the standard search help for that .
    It wuld be great if you elaborate your requierment .
    Regards
    Rahul

  • Please help give the BDC example for KZZ2, overhead rate BDC program

    Hi, All
    I have implemented notes 208474, and I need an add-on BDC program for KZZ2. Could anybody help me?
    Thanks in advance.
    <LOCKED BY MODERATOR - URGENT, PLEASE HELP OR SIMILAR ARE FORBIDDEN>
    Edited by: Alvaro Tejada Galindo on Aug 15, 2008 5:17 PM

    you might have got the details of what to extend for this customer n XD01. do a recording for those fields which have to be extended and call transaction XD01 and do a bdc. Other also after extending it do another recording to modify this using XD02 like the similar way taking the fields that you have to modify and do a bdc. Know from them if they need both of them in one BDC Prg or different BDC Progams. This is one way.
    The other way is to search if you have any BAPI's to do this and use those BAPI's.
    Award points if it helps.

  • Help me on BDC for FI document !

    hi my Friends,
    I am Functional consultant on FI-CO module and i know a little on ABAP.
    Now I want to develope a ABAP program to transfer Accounting transaction from data File into FI-CO (FB50 screen.)
    Please show me the document or share me your source code for reference.
    thanks !

    Hi ,
    If u want to call a transaction and goto a particular screen as soon as u call the transaction, u can record the flow in BDC.
    That is u have to goto SHDB transaction for recording and then specify the transaction code then pass the values and once u reach the screen, press save button and press back.
    Code will get automatically generated.
    Then u can copy and paste the part of the code that is needed.
    Check these below :
    http://help.sap.com/saphelp_erp2005/helpdata/en/fa/097119543b11d1898e0000e8322d00/frameset.htm
    http://www.sapgenie.com/abap/bdc.htm
    http://www.sap-img.com/abap.htm
    - An

  • Help needed in BDC

    Dear Experts,
    I have a module pool program and transaction for shipping advice, where I have given a option that if user enters Sales Order in the selection screen and in the next screen it shows all the related infromation of that order and if needed user can edit few fields in this screen and can take print.
    Now for the same report I dont want to show any screen to user after user enters the order and executes directly it should display the dialog box for 'Print' and 'Print Preview'.
    I did BDC recording for the transaction of shipping adive report and with that code I have developed other program and if run this program in foreground (Mode "A")it will show all screens with that dialog screen for 'Print' also but if I run in background (Mode "B") it will not show any screen and it will print the document directly.
    Now my requirement is I have to show only dialog screen for 'Print' & 'Print Preview'.
    Please give me your valuable Ideas on how to achieve this...
    Thanks in advance.
    Best Regards
    Venkat

    Hello,
    May be you are not using the full recording or might have some mistake(s) is going on in the completion of recording that is why it is creating problem. And also please check the call transaction code in the BDC program, whether you are performing the accurate t-code with that or not and also perform BDC functions also. If it is right than it would not might have any problem regarding the required output as you want.
    Thanks & Regards,
    Akg

  • Help on KO22 - BDC Update - Very Urgent

    Dear Gurues,
    Im writing a program for mass update the Budget Price in Transaction Code KO22 using a BDC.
    I have complete my codings but,when i execute in foreground i found that the amount is not updated in the field.I belived is something wrong with my codings which i dont know how to solve it.
    Can anyone review my BDC codes and let me know whats wrong with my code. Im only having problem in updating BPDY-WERT1(01) field. ( Which is Amount Field ).
    Below is my codes for BDC :-
        LOOP AT ITAB_BDC.
              perform bdc_dynpro      using 'SAPMKBUD' '0300'.
              perform bdc_field       using 'BDC_OKCODE'
                                            '/EEOKS'.
              perform bdc_field       using 'BDC_CURSOR'
                                            'CODIA-AUFNR'.
              perform bdc_field       using 'BDC_CURSOR'
                                            'SVALD-VALUE(01)'.
              perform bdc_field       using 'BDC_OKCODE'
                                            '=FURT'.
              perform bdc_field       using 'SVALD-VALUE(01)'
                                             p_kokrs.
              perform bdc_dynpro      using 'SAPMKBUD' '0300'.
              perform bdc_field       using 'BDC_CURSOR'
                                            'CODIA-AUFNR'.
              perform bdc_field       using 'BDC_OKCODE'
                                            '/00'.
              perform bdc_field       using 'CODIA-AUFNR'
                                             ITAB_BDC-order.
                                           'E11101000100'.
              perform bdc_dynpro      using 'SAPLKBPP' '0320'.
              perform bdc_field       using 'BDC_CURSOR'
                                            'BPDY-WERT1(01)'.
              perform bdc_field       using 'BDC_OKCODE'
                                            '=POST'.
              perform bdc_field       using 'DROPT-PTIME'
                                            '1'.
              perform bdc_field       using 'BPDY-WERT1(01)'
                                            ITAB_BDC-amt.
                                    '               110.00'.
              perform bdc_transaction using 'KO22'.
          PERFORM BDC_REPORT.
        ENDLOOP.

    Hi Gurues,
    Thanks for your reply,But im not able to get the value in the amount field.When debug i saw the value.But somehow when execute the bdc in sm35 in foreground, im not able to see the amount value.
    Below is my detail codes :- pls advise if i have coded anything wrong ...
    REPORT zfilbi082 NO STANDARD PAGE HEADING LINE-SIZE 255.
      Program name : ZFILBI080
      ERN          : 050001702
      Title        : MASS UPLOAD INTERNAL ORDER BUDGETTING
      Purpose      : MASS UPLOAD INTERNAL ORDER BUDGETTING
      Author       : VASANTHAN KRISHNAN
      Date         : 07 OCT 2005
      Amendment                                                          *
      Date        Who        ERN      Description                        *
    Tables: coas.
    DATA:
      BEGIN OF ITAB_BDC OCCURS 0,
        order(14),
        amt(12),
      END OF ITAB_BDC.
    data L_amount(12) type c.
    Declaration **************************
    DATA: BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE,
          NO TYPE I.
    Screen Selection **********************
    11/02/2003 IPC ENHANCEMENT STARTS ERN 090000577 **
    SELECTION-SCREEN BEGIN OF BLOCK bl3 WITH FRAME TITLE text-002.
    PARAMETERS :P_kokrs LIKE coas-kokrs DEFAULT 'HCPM' OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK bl3.
    11/02/2003 IPC ENHANCEMENT ENDS   ERN 090000577 **
    SELECTION-SCREEN BEGIN OF BLOCK bl2 WITH FRAME TITLE text-001.
    PARAMETERS :P_INPUT LIKE RLGRAP-FILENAME DEFAULT 'C:\io07102005.txt'.
    SELECTION-SCREEN END OF BLOCK bl2.
    SELECTION-SCREEN BEGIN OF BLOCK bl1
    WITH FRAME TITLE TEXT-002.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN END OF LINE.
    PARAMETERS SESSION(12) DEFAULT 'IOBUDGET'.
    PARAMETERS USER(12) DEFAULT SY-UNAME.
    SELECTION-SCREEN END OF BLOCK bl1.
    SELECTION-SCREEN BEGIN OF BLOCK bl0 WITH FRAME TITLE text-003.
    PARAMETER: p_test AS CHECKBOX DEFAULT 'X'.
    PARAMETERS KEEP AS CHECKBOX DEFAULT 'X'.
    SELECTION-SCREEN END OF BLOCK bl0.
    *******Start Of Selection ***********
    START-OF-SELECTION.
      CLEAR NO.
      PERFORM UPLOAD.
      PERFORM PROCESS.
    *&      Form  process
          text
    -->  p1        text
    <--  p2        text
    FORM PROCESS.
      IF P_TEST <> 'X'.
        PERFORM OPEN_GROUP.
        data :date(10) type c,
              date1(10) type c.
        LOOP AT ITAB_BDC.
        l_amount = ITAB_BDC-amt.
              perform bdc_dynpro      using 'SAPMKBUD' '0300'.
              perform bdc_field       using 'BDC_OKCODE'
                                            '/EEOKS'.
              perform bdc_field       using 'BDC_CURSOR'
                                            'CODIA-AUFNR'.
              perform bdc_field       using 'BDC_CURSOR'
                                            'SVALD-VALUE(01)'.
              perform bdc_field       using 'BDC_OKCODE'
                                            '=FURT'.
              perform bdc_field       using 'SVALD-VALUE(01)'
                                             p_kokrs.
              perform bdc_dynpro      using 'SAPMKBUD' '0300'.
              perform bdc_field       using 'BDC_CURSOR'
                                            'CODIA-AUFNR'.
              perform bdc_field       using 'BDC_OKCODE'
                                            '/00'.
              perform bdc_field       using 'CODIA-AUFNR'
                                             ITAB_BDC-order.
                                           'E11101000100'.
              perform bdc_dynpro      using 'SAPLKBPP' '0320'.
              perform bdc_field       using 'BDC_CURSOR'
                                            'BPDY-WERT1(01)'.
              perform bdc_field       using 'BDC_OKCODE'
                                            '=POST'.
              perform bdc_field       using 'DROPT-PTIME'
                                            '1'.
              perform bdc_field       using 'BPDY-WERT1(01)'
                                             l_amount.
                                            ITAB_BDC-amt.
                                    '               110.00'.
              perform bdc_transaction using 'KO22'.
          PERFORM BDC_REPORT.
        ENDLOOP.
        PERFORM CLOSE_GROUP.
      ELSE.
        WRITE:/'NO BATCH PROCESS UPDATES' COLOR COL_HEADING.
        WRITE:/ 'NO Of Internal Order BUdget' COLOR COL_HEADING.
        LOOP AT ITAB_BDC.
          PERFORM BDC_REPORT.
        ENDLOOP.
      ENDIF.
    ENDFORM.
    *&      Form  popup
          text
    -->  p1        text
    <--  p2        text
    FORM POPUP CHANGING E_PFILE LIKE RLGRAP-FILENAME.
      DATA LD_PFILE LIKE RLGRAP-FILENAME.
      CALL FUNCTION 'WS_FILENAME_GET'
           EXPORTING
               def_filename     = ''
                DEF_PATH         = 'C:\io.TXT'
                MASK             = ',.txt,.txt,.,..'
                MODE             = 'O'
                TITLE            = TEXT-T01
           IMPORTING
                FILENAME         = LD_PFILE
           EXCEPTIONS
                INV_WINSYS       = 1
                NO_BATCH         = 2
                SELECTION_CANCEL = 3
                SELECTION_ERROR  = 4
                OTHERS           = 5.
      CHECK SY-SUBRC EQ 0.
      E_PFILE = LD_PFILE.
    ENDFORM.
    *&      Form  upload
          text
    -->  p1        text
    <--  p2        text
    FORM UPLOAD.
      CALL FUNCTION 'WS_UPLOAD'
           EXPORTING
                FILENAME                = P_INPUT
                FILETYPE                = 'DAT'
           TABLES
                DATA_TAB                = ITAB_BDC
           EXCEPTIONS
                CONVERSION_ERROR        = 1
                FILE_OPEN_ERROR         = 2
                FILE_READ_ERROR         = 3
                INVALID_TYPE            = 4
                NO_BATCH                = 5
                UNKNOWN_ERROR           = 6
                INVALID_TABLE_WIDTH     = 7
                GUI_REFUSE_FILETRANSFER = 8
                CUSTOMER_ERROR          = 9
                OTHERS                  = 10.
      iF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      EXCEPTIONS
        FILE_OPEN_ERROR               = 1
        FILE_READ_ERROR               = 2
        UNKNOWN_ERROR                 = 3
        CUSTOMER_ERROR                = 4
        OTHERS                        = 5.
    ENDFORM.
    *&      Form  OPEN_GROUP
          text
    -->  p1        text
    <--  p2        text
      create batchinput session                                          *
      (not for call transaction using...)                                *
    FORM OPEN_GROUP.
      IF SESSION EQ SPACE.
        MESSAGE e010(ad) WITH 'Create BDC session failed'.
      ELSE.
        SKIP.
        WRITE: /(20) 'Create group'(I01), SESSION.
        SKIP.
      open batchinput group
        CALL FUNCTION 'BDC_OPEN_GROUP'
             EXPORTING
                  CLIENT = SY-MANDT
                  GROUP  = SESSION
                  USER   = USER
                  KEEP   = KEEP.
                       HOLDDATE = HOLDDATE.
        WRITE: /(30) 'BDC_OPEN_GROUP'(I02),
                (12) 'returncode:'(I05),
                     SY-SUBRC.
      ENDIF.
    ENDFORM.
    *&      Form  CLOSE_GROUP
          text
    -->  p1        text
    <--  p2        text
      end batchinput session                                             *
      (call transaction using...: error session)                         *
    FORM CLOSE_GROUP.
    close batchinput group
      CALL FUNCTION 'BDC_CLOSE_GROUP'.
      WRITE: /(30) 'BDC_CLOSE_GROUP'(I04),
              (12) 'returncode:'(I05),
                   SY-SUBRC.
    ENDFORM.
    *&      Form  BDC_TRANSACTION
          text
    -->  p1        text
    <--  p2        text
           Start new transaction according to parameters                 *
    FORM BDC_TRANSACTION USING TCODE.
    batch input session
      IF SESSION EQ SPACE.
        MESSAGE e010(ad) WITH 'Create BDC session failed'.
      ELSE.
        CALL FUNCTION 'BDC_INSERT'
             EXPORTING
                  TCODE     = TCODE
             TABLES
                  DYNPROTAB = BDCDATA.
      ENDIF.
      REFRESH BDCDATA.
    ENDFORM.
    *&      Form  BDC_DYNPRO
          text
    -->  p1        text
    <--  p2        text
           Start new screen                                              *
    FORM BDC_DYNPRO USING PROGRAM DYNPRO.
      CLEAR BDCDATA.
      BDCDATA-PROGRAM  = PROGRAM.
      BDCDATA-DYNPRO   = DYNPRO.
      BDCDATA-DYNBEGIN = 'X'.
      APPEND BDCDATA.
    ENDFORM.
    *&      Form  BDC_FIELD
          text
    -->  p1        text
    <--  p2        text
           Insert field                                                  *
    FORM BDC_FIELD USING FNAM FVAL.
      CLEAR BDCDATA.
      BDCDATA-FNAM = FNAM.
      BDCDATA-FVAL = FVAL.
      APPEND BDCDATA.
    ENDFORM.
    *&      Form  BDC_REPORT
          text
    -->  p1        text
    <--  p2        text
           REPORT
    WRITE:/ 'NO Of Internal Order Budget for Controlling Area',
             '(',P_kokrs,')'.
          FORM BDC_REPORT                                               *
    FORM BDC_REPORT.
      NO = NO + 1.
      WRITE:/ NO,
              p_kokrs(4),
              ITAB_BDC-order(12),
              ITAB_BDC-AMT(10).
    ENDFORM.

  • Help required in BDC for Vendor creation

    Hi ,
         I have to create vendors using bdc via trxn FK01.
    my requirement is to add multiple street adress but while recording initial screen contains only one line for street.
    how should i proceed ?
    I am working in ecc6.0.given below is my BDC.
    perform open_group.
    loop at record.
    perform bdc_dynpro      using 'SAPMF02K' '0105'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RF02K-BUKRS'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'RF02K-BUKRS'
                                  record-bukrs.
    perform bdc_field       using 'RF02K-KTOKK'
                                  record-ktokk.
    perform bdc_dynpro      using 'SAPMF02K' '0110'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFA1-REGIO'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'LFA1-ANRED'
                                  record-anred.
    perform bdc_field       using 'LFA1-NAME1'
                                  record-name1 .
    perform bdc_field       using 'LFA1-STRAS'
                                  record-stras.
    perform bdc_field       using 'LFA1-ORT01'
                                   record-ort01.
    perform bdc_field       using 'LFA1-PSTLZ'
                                  record-pstlz.
    perform bdc_field       using 'LFA1-LAND1'
                                 record-land1.
    perform bdc_field       using 'LFA1-REGIO'
                                  record-regio.
    perform bdc_dynpro      using 'SAPMF02K' '0120'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFA1-KUNNR'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_dynpro      using 'SAPMF02K' '0130'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFBK-BANKS(01)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTR'.
    perform bdc_dynpro      using 'SAPMF02K' '0210'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFB1-ALTKN'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'LFB1-AKONT'
                                  record-akont.
    perform bdc_field       using 'LFB1-ALTKN'
                                  record-altkn.
    perform bdc_dynpro      using 'SAPMF02K' '0215'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFB1-ZWELS'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'LFB1-REPRF'
                                  record-reprf.
    perform bdc_field       using 'LFB1-ZWELS'
                                  record-zwels.
    perform bdc_dynpro      using 'SAPMF02K' '0220'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFB5-MAHNA'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_dynpro      using 'SAPMF02K' '0610'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=UPDA'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFB1-QLAND'.
    perform bdc_transaction using 'FK01'.
    refresh bdcdata.
    clear bdcdata.
    endloop.
    perform close_group.
    Edited by: Rachel on Jun 19, 2008 11:23 AM

    Hi,
    while recording from the SHDB, in the initail screen of FK01
    you will have the check box Use central address management. check that, you will get multiple streets.
    Thanks,
    Rajinikantth

  • FV50-Park a G/L Account Document BDC Warning message in screen 1001

    I need some help with a BDC program.  I am working on a BDC program to process transaction FV50.   I went to SHDB and created a recording macro. When I test the recording with u201Csimpleu201D information the recording works correctly and the document is parked.  But, when I try to park a document with todays date for the Document Date and I use a date from a previous period I get a warning message which requires an extra screen to be displayed and u201Centeru201D has to pressed. My recording does not work when I get a warning message. I went back and re-recorded transaction FV50 and cause the u201Cwarningu201D message to be displayed so that I can add the extra screen to my BDC recording. I do not see the u201Cextrau201D screen in the new BDC recording.  Anyone know why? How can I make this BDC program handle this extra warning message?

    You will have to add some logic to your program to check the date. If it is from the previous period, process the warning screen; otherwise, do not.
    You may run into other problems as well. FV50 looks like an EnjoySAP transaction and not well suited to batch input.
    Rob

  • BDC for MB21

    Hello,
    Please help me with BDC for mb21 for multiple item
    System to sytem no of items display in MB21 screen varies & new items has to be entered further.
    For eg: if I have 30 items to be reserved. My MB21 screen is showing only 19 item, to reserve the rest of the item i have to go to new item button.
    Please help me to create BDC for the above without manual intervention.
    Subbu.
    MOderator Message: We cannot give a step-by-step solution.... even if you are a Functional guy. Get hold of an ABAPer and get your work done. Coding parts are better done by ABAPers.
    Edited by: kishan P on Jan 28, 2011 4:10 PM

    Hi,
    Please search in SCN with search term "How to use table control in BDC", you will get the information and idea to do it with MB21 transaction code.
    REgards,
    Nagaraj

  • Bdc recording for trancastion ME01

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

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

  • BDC recording for transaction 'Me01'

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

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

  • Regarding BDC for MB31

    Hi,
    Can anybody help me for  BDC CODE for MB31(Goods Receipt for Production Order).
    This is 1st time i am using BDC for MB31. I don't know how to do recording of MB31.
    How many fields are mandatory? Or Anyother way to create Good Receipt.(Like FM or BAPI)
    Thanks And Regards,
    Amit

    Hi Amit,
    Use following function module to create Goods receipt:
    MB_CREATE_GOODS_MOVEMENT
    The function module provides a general interface for posting goods movements.
    Hope this helps.
    Regards,
    Abhijeet

  • Regarding BDC for CO01

    Hi Friends,
    Can anybody help me for BDC CODE for CO01(Create production order).
    This is 1st time i am using BDC for CO01. I don't know how to do recording of CO01.
    How many fields are mandatory? Or Anyother way to Create production orde.(Like FM or BAPI)
    Thanks And Regards,
    Amit

    Amit,
    Here is a trick (you can treat it as method) to know mandatory fields for BDC method.
    1. Go to your transaction code, I guess you are working 'co01'.
    2. Press 'Enter' on the screen, you would be asked to enter value for a field-enter correct value and then press enter, next you may be asked to enter value for another field....continue until you don't get any error/warning.
    3. You will be taken to next/second screen if you were successful entering correct values in the first screen.
    4. Mean while, note down those fields that you have filled.
    5. Follow above steps until you are done with all screens.
    6. Next you can start recording from T.Code 'SHDB'.
    Reply to the post if you have any question in the explanation.

  • Executing BDC in foreground mode

    Hi SAP!
    Can anybody help to run BDC in foreground mode and get the resulting log to insure that run was OK?
    Thanks in advance!

    Hi Maxim,
    PL check the following threads..
    Reading session log
    Re: Urgent -  Doubt in Session
    Regards,
    Suresh Datti

  • Can BDC Data be corrected of an erroneous transaction (Sesion Method) ?

    Hi,
    I read the below text at
    http://wiki.sdn.sap.com/wiki/display/ABAP/BatchInputFAQ#BatchInputFAQ-WhatistheSimulateBackgroundmode%3F
    There is a built-in error and recovery mechanism in SM35 to view the log of errors and run the erroneous transactions again (note: the BDC data cannot be corrected)
    So,
    1. If BDC Data cant be corrected, why would one run the session again ?
    2. What one achieves by rerunning ?
    If it needs correction of data, then would it require creation of a new session by the program ?
    Regards,
    Chitwanjit

    Hello,
    this may be helpful if the BDC data is ok but the customizing is incorrect.
    E.g. you've built up BDC Data but your functional expert forgot to transport his
    new created Order-Type to production :-(.
    Or if you get 1001 errors because some number range is simply full.
    Regards
    Wolfgang

Maybe you are looking for

  • An Open Letter to Verizon about Android 2.2 and Fascinate

                                                                            March 12, 2011 Dear Verizon, I purchased my Samsung Fascinate phone from one of your stores last September.  I distinctly recall the sales rep saying that Android 2.2 would be av

  • Programmatically trigger cursor release?

    Hello, I am using the Actor Framework to develop a large application in LabVIEW. I have cursors on a graph that trigger data to be populated into actors using an event structure and a cursor release event. The data is also populated (initialized) whe

  • Sql Developer Data Modeler 3.0 EA1: Engineering singular to plural

    Do you have a strategy for how I engineer all my singular entity names (such as EMPLOYEE) into plural table names (such as EMPLOYEES)? - Marc de Oliveira

  • CMS advice

    Could someone reccomend a good CMS thats goes well with coldfusion Thanks

  • General Protection Fault in module WIN87EM.DLL while Running Windows XP Mode

    I am attempting to run a legacy, 16-bit program, P3, on a Windows XP Mode Virtual Machine, hosted by a Windows 7 x64 box. When performing various activities in the program, I receive "P3 caused a General Protection Fault in module WIN87EM.DLL at 0001