Re: Regarding bdc

Hi experts,
Please help me out as i am new to abap.My problem is to create a Classical batch input program-using transaction FK01 to create vendor/change the vendor address into R/3 system.  (Call Transaction Method)
Replies will be highly appreciated.
Thanks,
Pankaj

Pankaj, goto transaction SHDB,
create a recording of what you will be exactly doing .
This will give you all field names and transaction names and screens.
For exact syntax check on google , there are many sample codes.
BDC's are one of the easiest things in ABAP, with some tricky 
issues.
GOOD LUCK.

Similar Messages

  • Regarding bdc line items

    hi everybody,
                        how r u all.  i have a prob with bdc line items. all the fields r getting displayed in only one field.  tell me clearly how to handle bdc line items.
    Regards,
    sindhu.

    Hi,
    check this code for line items
    FORM POPULATE_BDC.
    DATA:L_COUNTER TYPE N,
             L_STRING TYPE STRING.
    LOOP AT IT_CUSTOMER.
    AT NEW KUNNR.
    CLEAR L_COUNTER.
          L_INDEX = SY-TABIX.
          READ TABLE IT_CUSTOMER INDEX L_INDEX.
    perform bdc_dynpro      using 'SAPMV10A' '0100'.
    perform bdc_field       using 'MV10A-KUNNR'
                                  IT_CUSTOMER-KUNNR.
    perform bdc_field       using 'MV10A-VKORG'
                                  IT_CUSTOMER-VKORG.
    perform bdc_field       using 'MV10A-VTWEG'
                                  IT_CUSTOMER-VTWEG.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    ENDAT.
    L_COUNTER = L_COUNTER + 1.
        CLEAR L_STRING.
    perform bdc_dynpro      using 'SAPMV10A' '0200'.
    CONCATENATE 'MV10A-MATNR(' L_COUNTER ')' INTO L_STRING.
    perform bdc_field       using L_STRING
                            IT_CUSTOMER-MATNR.
    CONCATENATE 'MV10A-KDMAT(' L_COUNTER ')' INTO L_STRING.
    perform bdc_field       using     L_STRING
                                     IT_CUSTOMER-KDMAT.
    CONCATENATE 'MV10A-MEGRU(' L_COUNTER ')' INTO L_STRING.
    perform bdc_field       using   L_STRING
                                    IT_CUSTOMER-MEGRU.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    *-- For Page down in Call Transaction Mode
        IF L_COUNTER = 14.
          CLEAR L_COUNTER.
          PERFORM BDC_DYNPRO      USING 'SAPMV45A' '4001'.
          PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                                '=P+'.
        ENDIF.
    perform bdc_dynpro      using 'SAPMV10A' '0200'.
    CONCATENATE 'MV10A-SELKZ(' L_COUNTER ')' INTO L_STRING.
    perform bdc_field       using L_STRING
                              IT_CUSTOMER-SELKZ.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=SELE'.
    perform bdc_dynpro      using 'SAPMV10A' '0300'.
    perform bdc_field       using 'MV10A-KDMAT'
                                  IT_CUSTOMER-KDMAT.
    perform bdc_field       using 'MV10A-LPRIO'
                                  IT_CUSTOMER-LPRIO.
    perform bdc_field       using 'MV10A-ANTLF'
                                  IT_CUSTOMER-ANTLF.
    PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                        '/EBACK'.
    at end of kunnr.
    READ TABLE IT_CUSTOMER INDEX L_INDEX.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=SICH'.
    CALL TRANSACTION 'VD51' USING IT_BDC MODE 'A' UPDATE 'S'
          MESSAGES INTO IT_MESSAGES.
          CLEAR IT_BDC.
          REFRESH IT_BDC.
    ENDAT.
      IF NOT IT_MESSAGES[] IS INITIAL.
        PERFORM FORMAT_MESSAGE.
      ENDIF.
    ENDLOOP.
    ENDFORM.                    " POPULATE_BDC
    regards,
    keerthi

  • Hi friends any one can reply this regarding Bdc

    HI friends,
    in bdc irrepsctive of screen resolution we use one structure is used .for table controls...
    can u kindly tell me what is that...i just forgotten...and if code avialable regarding that it much more useful.

    hi there..
    Following is a sample code of handling table control in BDC.
    REPORT Y730_BDC5 .
    *HANDLING TABLE CONTROL IN BDC
    DATA : BEGIN OF IT_DUMMY OCCURS 0,
           DUMMY(100) TYPE C,
           END OF IT_DUMMY.
    DATA : BEGIN OF IT_XK01 OCCURS 0,
           LIFNR(10) TYPE C,
           BUKRS(4)  TYPE C,
           EKORG(4)  TYPE C,
           KTOKK(4)  TYPE C,
           NAME1(30) TYPE C,
           SORTL(10) TYPE C,
           LAND1(3)  TYPE C,
           SPRAS(2)  TYPE C,
           AKONT(6)  TYPE C,
           FDGRV(2)  TYPE C,
           WAERS(3)  TYPE C,
           END OF IT_XK01,
           BEGIN OF IT_BANK OCCURS 0,
           BANKS(3)  TYPE C,
           BANKL(10) TYPE C,
           BANKN(10) TYPE C,
           KOINH(30) TYPE C,
           LIFNR(10) TYPE C,
           END OF IT_BANK.
    DATA : IT_BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE,
           IT_BDCMSGCOLL LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
    CALL FUNCTION 'WS_UPLOAD'
    EXPORTING
       FILENAME                      = 'C:\VENDOR.TXT'
       FILETYPE                      = 'ASC'
    TABLES
       DATA_TAB                      = IT_DUMMY.
    LOOP AT IT_DUMMY.
      IF IT_DUMMY-DUMMY+0(2) = '11'.
        IT_XK01-LIFNR = IT_DUMMY-DUMMY+2(10).
        IT_XK01-BUKRS = IT_DUMMY-DUMMY+12(4).
        IT_XK01-EKORG = IT_DUMMY-DUMMY+16(4).
        IT_XK01-KTOKK = IT_DUMMY-DUMMY+20(4).
        IT_XK01-NAME1 = IT_DUMMY-DUMMY+24(30).
        IT_XK01-SORTL = IT_DUMMY-DUMMY+54(10).
        IT_XK01-LAND1 = IT_DUMMY-DUMMY+64(3).
        IT_XK01-SPRAS = IT_DUMMY-DUMMY+67(2).
        IT_XK01-AKONT = IT_DUMMY-DUMMY+69(6).
        IT_XK01-FDGRV = IT_DUMMY-DUMMY+75(2).
        IT_XK01-WAERS = IT_DUMMY-DUMMY+77(3).
        APPEND IT_XK01.
      ELSE.
        IT_BANK-BANKS = IT_DUMMY-DUMMY+2(3).
        IT_BANK-BANKL = IT_DUMMY-DUMMY+5(10).
        IT_BANK-BANKN = IT_DUMMY-DUMMY+15(10).
        IT_BANK-KOINH = IT_DUMMY-DUMMY+25(30).
        IT_BANK-LIFNR = IT_DUMMY-DUMMY+55(10).
        APPEND IT_BANK.
      ENDIF.
    ENDLOOP.
    LOOP AT IT_XK01.
    REFRESH IT_BDCDATA.
    perform bdc_dynpro      using 'SAPMF02K' '0100'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RF02K-REF_LIFNR'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'RF02K-LIFNR'
                                  IT_XK01-LIFNR.
    perform bdc_field       using 'RF02K-BUKRS'
                                  IT_XK01-BUKRS.
    perform bdc_field       using 'RF02K-EKORG'
                                  IT_XK01-EKORG.
    perform bdc_field       using 'RF02K-KTOKK'
                                  IT_XK01-KTOKK.
    perform bdc_dynpro      using 'SAPMF02K' '0110'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFA1-TELX1'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'LFA1-NAME1'
                                  IT_XK01-NAME1.
    perform bdc_field       using 'LFA1-SORTL'
                                  IT_XK01-SORTL.
    perform bdc_field       using 'LFA1-LAND1'
                                  IT_XK01-LAND1.
    perform bdc_field       using 'LFA1-SPRAS'
                                  IT_XK01-SPRAS.
    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-KOINH(02)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTR'.
    DATA : FNAM(20) TYPE C,
           IDX      TYPE C.
      MOVE 1 TO IDX.
    LOOP AT IT_BANK WHERE LIFNR = IT_XK01-LIFNR.
      CONCATENATE 'LFBK-BANKS(' IDX ')' INTO FNAM.
      perform bdc_field       using FNAM
                                    IT_BANK-BANKS.
      CONCATENATE 'LFBK-BANKL(' IDX ')' INTO FNAM.
      perform bdc_field       using FNAM
                                    IT_BANK-BANKL.
      CONCATENATE 'LFBK-BANKN(' IDX ')' INTO FNAM.
      perform bdc_field       using FNAM
                                    IT_BANK-BANKN.
      CONCATENATE 'LFBK-KOINH(' IDX ')' INTO FNAM.
      perform bdc_field       using FNAM
                                    IT_BANK-KOINH.
      IDX = IDX + 1.
    ENDLOOP.
    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-FDGRV'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'LFB1-AKONT'
                                  IT_XK01-AKONT.
    perform bdc_field       using 'LFB1-FDGRV'
                                  IT_XK01-FDGRV.
    perform bdc_dynpro      using 'SAPMF02K' '0215'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFB1-ZTERM'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    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' '0310'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFM1-WAERS'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'LFM1-WAERS'
                                  IT_XK01-WAERS.
    perform bdc_dynpro      using 'SAPMF02K' '0320'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'WYT3-PARVW(01)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTR'.
    perform bdc_dynpro      using 'SAPLSPO1' '0300'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=YES'.
    CALL TRANSACTION 'XK01' USING IT_BDCDATA
                            MODE  'A'
                           UPDATE 'S'
                         MESSAGES INTO IT_BDCMSGCOLL.
    ENDLOOP.
    FORM BDC_DYNPRO USING PROG SCR.
      CLEAR IT_BDCDATA.
      IT_BDCDATA-PROGRAM = PROG.
      IT_BDCDATA-DYNPRO  = SCR.
      IT_BDCDATA-DYNBEGIN = 'X'.
      APPEND IT_BDCDATA.
    ENDFORM.
    FORM BDC_FIELD USING FNAM FVAL.
      CLEAR IT_BDCDATA.
      IT_BDCDATA-FNAM = FNAM.
      IT_BDCDATA-FVAL  = FVAL.
      APPEND IT_BDCDATA.
    ENDFORM.
    do reward if helpful

  • 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.

  • Doubt regarding BDC

    Hi all,
    I developed a BDC.
    Client had asked for a requirement  tat while uploading an excel for eg of 1000 records, and if ter is an error in the 600th record ,as of now it will throw error,but tey were telling BDC shud not stop ter,else it shud discard that particular record and shud continue processing. and at the end it shud display in the output which all wer the recored with error.
    Is this possible n if so how..?
    Please reply..
    Thanks in Advance
    Nitin

    Hi,
    I consider u hv collected all the 1000 records in the excel file into an internal table called it_upload.
    Loop at it_upload into wa_upload.
    *write the BDC code for e.g.,
    PERFORM bdc_dynpro      USING 'SAPMV86E' '0601'.
    PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '=SICH'.
          PERFORM bdc_field       USING 'BDC_SUBSCR'
                                        'SAPMV86E'.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        'RV86E-KOMMA'.
          PERFORM bdc_field       USING 'RV86E-DAT_STATA'
                                        sy-datum.
          PERFORM bdc_field       USING 'RV86E-ZET_STATA'
                                        '00:00:00'.
          PERFORM bdc_field       USING 'RV86E-KOMMA'
                                        wa_upload-vbeln.
    CALL TRANSACTION <tcode> USING it_bdcdata MODE 'N' UPDATE 'S' MESSAGES INTO it_bdcmsg.
    COMMIT WORK.
    LOOP AT it_bdcmsg INTO wa_bdcmsg.
            IF wa_bdcmsg-msgtyp = 'S'.
              MOVE wa_bdcmsg-msgv1 TO wa_error.
            ENDIF.
            APPEND  wa_error TO it_error.
    ENDLOOP.
    ENDLOOP.
    Hope this helps.
    Regards,
    Arnab.

  • Regarding BDC's, BAPI's, ALE ,IDOCs, BADI's

    Hi all,
    can any one send materials with screen shots having example programs
    for BDC's, BAPI's, ALE ,IDOCs, BADI's
    to my mail id
    <b><REMOVED BY MODERATOR></b>
    regards and thanks
    venu
    Message was edited by:
            Alvaro Tejada Galindo

    hi
    For BDC:
    http://myweb.dal.ca/hchinni/sap/bdc_home.htm
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/bdc&
    http://www.sap-img.com/abap/learning-bdc-programming.htm
    http://www.sapdevelopment.co.uk/bdc/bdchome.htm
    http://www.sap-img.com/abap/difference-between-batch-input-and-call-transaction-in-bdc.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/69/c250684ba111d189750000e8322d00/frameset.htm
    http://www.sapbrain.com/TUTORIALS/TECHNICAL/BDC_tutorial.html
    Check these link:
    http://www.sap-img.com/abap/difference-between-batch-input-and-call-transaction-in-bdc.htm
    http://www.sap-img.com/abap/question-about-bdc-program.htm
    http://www.itcserver.com/blog/2006/06/30/batch-input-vs-call-transaction/
    http://www.planetsap.com/bdc_main_page.htm
    call Transaction or session method ?
    http://www.sapbrain.com/FAQs/TECHNICAL/SAP_ABAP_DATADICTIONARY_FAQ.html
    http://www.****************/InterviewQ/interviewQ.htm
    http://help.sap.com/saphelp_46c/helpdata/en/35/2cd77bd7705394e10000009b387c12/frameset.htm
    ALE/ IDOC
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.sapgenie.com/sapedi/index.htm
    http://www.sappoint.com/abap/ale.pdf
    http://www.sappoint.com/abap/ale2.pdf
    http://www.sapgenie.com/sapedi/idoc_abap.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/78/217da751ce11d189570000e829fbbd/frameset.htm
    http://www.allsaplinks.com/idoc_sample.html
    http://www.sappoint.com/abap.html
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.sapgenie.com/sapedi/index.htm
    http://www.allsaplinks.com/idoc_sample.html
    Check these step-by-step links
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/ccab6730-0501-0010-ee84-de050a6cc287
    https://sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/8fd773b3-0301-0010-eabe-82149bcc292e
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/3c5d9ae3-0501-0010-0090-bdfb2d458985
    BAPI
    http://help.sap.com/saphelp_46c/helpdata/en/9b/417f07ee2211d1ad14080009b0fb56/frameset.htm
    http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
    Checkout !!
    http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
    http://techrepublic.com.com/5100-6329-1051160.html#
    http://www.sap-img.com/bapi.htm
    http://www.sap-img.com/abap/bapi-conventions.htm
    http://www.sappoint.com/abap/bapiintro.pdf
    http://www.sapgenie.com/abap/bapi/example.htm
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDAPII/CABFAAPIINTRO.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFABAPIREF/CABFABAPIPG.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCFESDE8/BCFESDE8.pdf
    List of all BAPIs
    http://www.planetsap.com/LIST_ALL_BAPIs.htm
    http://www.sappoint.com/abap/bapiintro.pdf
    http://www.sappoint.com/abap/bapiprg.pdf
    http://www.sappoint.com/abap/bapiactx.pdf
    http://www.sappoint.com/abap/bapilst.pdf
    http://www.sappoint.com/abap/bapiexer.pdf
    http://service.sap.com/ale
    http://service.sap.com/bapi
    http://www.geocities.com/mpioud/Abap_programs.html
    http://www.sapdevelopment.co.uk/reporting/reportinghome.htm
    <b><REMOVED BY MODERATOR></b>
    regards
    Nagesh.Paruchuri
    Message was edited by:
            Alvaro Tejada Galindo

  • Regarding BDC session

    Hi
    i am processing my BDC pro. in Session method.
    my requirement is i have to capture the error records into a file
    and i have to write that file on appl. server.
    how to capture the error records from error log?
    please reply

    Hai  Saritha,
    Usually if there are any errors in CALL TRANSACTION we send those records to SESSION METHOD by using below logic.
    eg:
    CALL TRANSACTION 'XK01' USING
    t_bdcdata MODE 'N' .
    IF sy-subrc 0.
    PERFORM session_bdc.
    ENDIF.
    ENDLOOP.
    IF s_flag = 'X'.
    CALL FUNCTION 'BDC_CLOSE_GROUP'.
    ENDIF.
    This is subroutine .
    FORM session_bdc .
    IF s_flag = ' '.
    CALL FUNCTION 'BDC_OPEN_GROUP'
    EXPORTING
    client = sy-mandt
    group = 'vcentric'
    holddate = filler8
    keep = 'X'
    user = sy-uname
    prog = sy-cprog.
    s_flag = 'X'.
    ENDIF.
    CALL FUNCTION 'BDC_INSERT'
    EXPORTING
    tcode = 'XK01'
    TABLES
    dynprotab = t_bdcdata.
    ENDFORM. " SESSION_BDC
    or we can send the error records on into an flat file by using the below logic.
    CALL TRANSACTION 'XK01' USING
    T_BDCDATA MODE 'N' MESSAGES INTO T_BDCMSG.
    IF SY-SUBRC 0.
    APPEND W_UPLOAD TO T_ERROR.
    ENDIF.
    CLEAR W_BDCMSG.
    READ TABLE T_BDCMSG INTO W_BDCMSG INDEX 1.
    CLEAR L_MSG.
    CALL FUNCTION 'FORMAT_MESSAGE'
    EXPORTING
    ID = W_BDCMSG-MSGID
    LANG = SY-LANGU
    NO = W_BDCMSG-MSGNR
    V1 = W_BDCMSG-MSGV1
    V2 = W_BDCMSG-MSGV2
    V3 = W_BDCMSG-MSGV3
    V4 = W_BDCMSG-MSGV4
    IMPORTING
    MSG = L_MSG
    EXCEPTIONS
    NOT_FOUND = 1
    OTHERS = 2.
    IF SY-SUBRC = 0.
    WRITE:/ W_UPLOAD-NAME1, '----', L_MSG.
    ENDIF.
    ENDLOOP.
    this is subroutine.
    FORM ERROR_RECORDS .
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    FILENAME = 'C:/ERROR.TXT'
    FILETYPE = 'ASC'
    WRITE_FIELD_SEPARATOR = 'X'
    TABLES
    DATA_TAB = T_ERROR.
    ENDFORM. " ERROR_RECORDS
    Reward is useful.
    Regards.
    Eshwar.

  • Regarding BDC with RFC Enabled FM

    Hi,
    When we run BDC with function module, I believe its the session method, but after the program is run I do not see any session in SM35, even if I KEEP THE SESSION ('X'). I am using the following function mod. however the data is being updated.
    CALL FUNCTION 'Z_FM_Z1_REC'
       EXPORTING
         mode                 = 'N'
       UPDATE               = 'A'
         group                = s_name
       USER                 = sy-uname
       KEEP                 = 'X'
       HOLDDATE             = h_date
      NODATA               = '/'
       MATNR_001            = i_tab-matnr
       MBRSH_002            = i_tab-mbrsh
       MTART_003            = i_tab-mtart
       KZSEL_01_004         = 'X'
       MAKTX_005            = i_tab-maktx
       MEINS_006            = i_tab-meins
       MTPOS_MARA_007       = 'NORM'
    IMPORTING
       SUBRC                = subrc
    TABLES
       MESSTAB              = messtab  .
    Also, this FM is RFC enabled but does not work, any idea why ?
    Thirdly, where is this session data stored (database table).
    Thanks!
    "Max Points Are Assured for Most Appropriate Answers"

    Hi,
    Answer to Q1) You need to check the content of your custom FM... Check if you have used BDC_OPEN_GROUP, BDC_INSERT and BDC_CLOSE_GROUP to generate the session... it is NOT the question with the FM that you are using...
    First, try using the above mentioned FMs to generate session... if it works (and it should), then put them into your custom FM.
    Answer to Q2) The table for storing all the BDC sessions is APQI.
    Regards, Tapas
    <Allot points pls if it solves your problem>

  • Regarding bdc for automatic run

    hi experts,
                    i have developed a bdc for hr in which the data is uploading from the excel sheet,what my user wants that this report will run automatically at 11 pm every day so for this send me the steps for this i know i have to exceute it in the background but how plz help me ...
    ***plz dnt send me the url come up with your own answer....
    thnx in advance.....

    Hi RAVI,
    if u've created the BDC in call transaction method, then create a variant for the selection screen with the relevant data. and create a scheduled job from SM36.
    in case of session: u need to schedule the two programs in SM36.
    1st the bdc program to create the session and next the program RSBDCSUB with variants. in case of scheduling RSBDCSUB session name & other details should be saved in the variants.
    Reward if useful
    Regards
    ANUPAM

  • Regarding BDC coding

    hi friends ,
    i m facing problem while uploading data from excel sheet to sap system,the fields are postking key,cmpycode,gl a/c,vendor code,vendor name,business area n amount...here below i m giving my cmplete coding part for ur help......
    looking forward to an early reply...PLZ HELP ME
    tables:rf02k,addr1_data,bseg,bkpf,cobl,rf05a.
    data:begin of itab occurs 0,
         lifnr like rf02k-lifnr,
         name1 like addr1_data,
         hkont like bseg-hkont,
         bukrs like bkpf-bukrs,
         wrbtr like bseg-wrbtr,
         gsber like cobl-gsber,
         newbs like rf05a-newbs,
         bschl like kmzei-bschl,
         bukrs like kmzei-bukrs,
         hkont like kmzei-hkont,
         gsber like kmzei-gsber,
         wrbtr like kmzei-wrbtr,
         end of itab.
    data:begin of jtab occurs 0.
         include structure bdcdata.
    data:end of jtab.
    data:begin of i_excel occurs 0.
         include structure alsmex_tabline.
    data:end of i_excel.
    parameters:fname like rlgrap-filename,
               ftype like rlgrap-filetype,
               start type i, end type i.
    at selection-screen on value-request for fname.
    call function 'F4_FILENAME'
    EXPORTING
      PROGRAM_NAME        = SYST-CPROG
      DYNPRO_NUMBER       = SYST-DYNNR
      FIELD_NAME          = ' '
    IMPORTING
       FILE_NAME           =  fname.
    start-of-selection.
    call function 'ALSM_EXCEL_TO_INTERNAL_TABLE'
      exporting
        FILENAME                      = fname
        I_BEGIN_COL                   = 2
        I_BEGIN_ROW                   = start
        I_END_COL                     = 8
        I_END_ROW                     = end
      TABLES
        INTERN                        = i_excel
    EXCEPTIONS
       INCONSISTENT_PARAMETERS       = 1
       UPLOAD_OLE                    = 2
       OTHERS                        = 3
    if SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    end-of-selection.
    loop at i_excel.
      case i_excel-col.
      when '0002'.
      itab-NEWBS = i_excel-value.
      when '0003'.
      itab-bukrs = i_excel-value.
      when '0004'.
      itab-hkont = i_excel-value.
      when '0005'.
      itab-lifnr = i_excel-value.
      when '0006'.
      itab-name1 = i_excel-value.
      when '0007'.
      itab-gsber = i_excel-value.
      when '0008'.
      itab-wrbtr = i_excel-value.
      endcase.
      at end of row.
      append itab.
      clear itab.
      endat.
      endloop.
    loop at Itab.
    refresh jtab.
    perform sub using 'SAPMF05A' '300'.
    PERFORM sub1 using 'BDC_CURSOR' 'RF05A-NEWBS'.
    PERFORM sub1 using 'BDC_OKCODE' '/00'.
    PERFORM sub1 using 'RF05A-NEWBS' ITAB-NEWBS.
    PERFORM sub1 using 'BKPF-BUKRS' ITAB-BUKRS.
    PERFORM sub1 using 'BSEG-HKONT' ITAB-HKONT.
    call transaction 'F-02' using jtab.
    perform sub using 'SAPMF02K' '100'.
    PERFORM sub1 using 'BDC_CURSOR' 'RF02K-LIFNR'.
    PERFORM sub1 using 'BDC_OKCODE' '/00'.
    PERFORM sub1 using 'RF02K-LIFNR' ITAB-LIFNR.
    PERFORM sub1 using 'ADDR1_DATA-NAME1' ITAB-NAME1.
    call transaction 'XK01' using jtab.
    PERFORM sub using 'SAPMF05A' '300'.
    PERFORM sub1 using 'BDC_CURSOR' 'COBL-GSBER'.
    PERFORM sub1 using 'BDC_OKCODE' '/00'.
    PERFORM sub1 using 'COBL-GSBER' ITAB-GSBER.
    PERFORM sub1 using 'BSEG-WRBTR' ITAB-WRBTR.
    call transaction 'FKMT'  using jtab .
    endloop.
    form sub using A B.
    clear jtab.
    jtab-program = A.
    jtab-dynpro = B.
    jtab-dynbegin = 'X'.
    append jtab.
    endform.
    form sub1 using C D.
    clear jtab.
    jtab-fnam = C.
    jtab-fval = D.
    append jtab.
    endform.

    Ravi,
    No need to write like that way...
    follow this way...
    in XX = put the value as like length of the fild..
    example: rf02k-lifnr is of length  10
    so i declaed lifnr(10) type cahr.
    then declare..
    data:begin of itab occurs 0,
    lifnr(10) type cahr," like rf02k-lifnr,
    name1(XX) type cahr," like addr1_data,
    hkont(XX) type cahr," like bseg-hkont,
    bukrs(XX) type cahr," like bkpf-bukrs,
    wrbtr(XX) type cahr," like bseg-wrbtr,
    gsber(XX) type cahr," like cobl-gsber,
    newbs(XX) type cahr," like rf05a-newbs,
    end of itab.
    maintain the flat file in excel/text format
    use to upload
            CALL FUNCTION 'UPLOAD'
                 EXPORTING
                      filename = 'c:\windows\desktop\'
                      filetype = 'DAT'
                 TABLES
                      data_tab = itab.
    loop  itab.
    pass records to BDC...ok
    endloop.
    Regards,
    Ramesh.

  • Regarding bdc's

    what is the transaction code by which we can enter records in sflight table
    (for recording bdc's)
    regards
    vamsi

    Hello Vamshi,
    Up to my knowledge these SFLIGHT, SBOOK are the demo tables in SAP used to practise some basis of ABAP.
    So these tables are not used in any of the transactions.
    Vasanth

  • Regarding BDC for QA01 ( inspection lot creation )

    I am creating an inspection lot in qa01.
    I am getting a model dialog box in between.
    The dialog box contains 3 group counter values ( say 5
                                                          6
                                                          7 )
    I need to Pick only only one group counter value.
    The value that needs to be picked is contained in a
    variable ( wl_gpcntr).
    Also, i have an internal table with all the group counters.
    So, i can get the index of the group counter which i
    need to filled in the inspection lot.
    Then i concatenated the field name with the index.
      ( PLKO-PLNAL(index of the group counter) ) into the
       screen field wl_grp_cntr and passed to the BDC_field
       subroutine.
    In the BDC steps, i have given
      PERFORM bdc_dynpro     USING 'SAPLCPSE' '2110'.
      PERFORM bdc_field :    USING 'BDC_CURSOR'
                                                wl_grp_cntr,
                             USING 'BDC_OKCODE' '=PICK'.
       Now, the Problem is
        In ALL SCREEN mode it is working perfectly,
        but in NO SCREEN mode it is creating an inspection
        lot but with blank group counter.
        kindly need suggestion.

    Hi,
    If you have activated two inspection types (eg 01, 0101) of same inspection lot origin (01), in material master you should  have a preferred indicator set for the inspection type for which you want to be selected when you perform goods receipt.
    This check box is available in the inspection type set up in the Material master.
    Also check whether the post to inspection stock indicator is set for the material (in the inspection type), then only material will be posted to inspection stock.
    Please confirm, what happens to the stock after making MIGO. check in MMBE and confirm
    Go through the link and maintain the necessary settings. I think default settings for 01 type should work.
    http://help.sap.com/saphelp_470/helpdata/en/2d/350e4d448c11d189420000e829fbbd/content.htm
    Regards
    Hari

  • Regarding bdc using sessions

    can anyone tell me what all fields to be set to what while using the function modules
    1) bdc_open_group
    2)bdc_insert
    3)bdc_close_group
    thank u

    HI,
    check the Include program "<b>BDCRECX1</b>" in SE38.
    If contains calling of all the function you have listed.
    for Example
    <b>CALL FUNCTION 'BDC_OPEN_GROUP'
             EXPORTING  CLIENT   = SY-MANDT  "client
                        GROUP    = GROUP     "session name
                        USER     = USER      
                        KEEP     = KEEP      "keep session
                        HOLDDATE = HOLDDATE. "date
    CALL FUNCTION 'BDC_INSERT'
             EXPORTING TCODE     = TCODE  "transaction for bdc
             TABLES    DYNPROTAB = BDCDATA. "data
    CALL FUNCTION 'BDC_CLOSE_GROUP'.</b>
    Regards,
    Message was edited by: HRA

  • Regarding bdc upload for purchase order

    hi friends,
    here i got a problem in purchase order upload.the format in excel sheet data is in this format mentioned bellow
    lifnr      ekorg  ekgrp   werks   lgort         ematn       menge netpr
    142     1000     1000     1000     1000     <b>100-100      10      150
                                               100-100     15     100
                                                100-100     10     140
                                                100-100     12     56
                                                100-100      8      40</b>
    here to identify items which r in bold and to write code for this is my problem. if the iteams r separated with  ' , '  i can use split at , and between loop and end loop i executed the code earlier. but now my flat file containing 1000+ records and to convert that in my mode of program is a problem. so can any one suggest me how to proceed and code the above mentioned flat file structure to be uploaded in one record.
    <b>this program is very urgent.............so take it as a request and help me in futher proceddings.......</b>
    thaning you all........
    i wait for replay...............

    Hi,
    I hope earlier you are comma seperated file, and you are easily spliting the values using SPLIT command.
    Now you are using flat file (fixed length) Using offset values you need map the fields manually in loop ... endloop control statement. (takes long time to find total lengh of record although you have to).
    If you using TABDELIMITED, use the same SPLIT command , instead of 'comma' use 'CL_ABAP_CHAR_UTILITIES=>TAB_DELIMITED' attribute.
    If you can maintain hierarchy. I hope it will be easy.
    see below structure if want to do in hierarchy mode. Write logic determine the detail record and map it. It is easy rather than direct offset mapping.
    <b>indicator ifnr ekorg ekgrp werks lgort
    indicator  ematn menge netpr
    1 142 1000 1000 1000 1000
    <i>2 100-100 10 150
    2 100-100 15 100
    2 100-100 10 140
    2 100-100 12 56
    2 100-100 8 40</i></b>
    Please let me know what type of file  i.e. reason i have given all three types.
    If it helps.Plz reward points.
    Regards
    Bhupal Reddy.

  • URGENT: - REGARDING bdc

    hi,
    i am new to bdc and i am working on report of it and when i press F8 the execution gives d runtime error.and d in dat msg is displayed dat file ven.txt is not opened.
    if any body provides d solution to dis problem he or she will be definately rewarded..
    plzz reply as it is urgent for me.
    Message was edited by:
            ric .s

    hi,
    i had tried all what u said by chaning INFILE into NFILE ,but is still is giving d runtime error:-
    REPORT ZTEST1.
    DATA: BDC_TAB LIKE BDCDATA OCCURS 6 WITH HEADER LINE,
          NFILE(20) VALUE 'C:\Document and Settings\sysasst.ii\desktop\VEN.txt'.
    DATA: BEGIN OF INREC,
          VENDNUM LIKE LFA1-LIFNR,
          STREET LIKE LFA1-STRAS,
          END OF INREC.
    PARAMETERS :  DISPMODE DEFAULT 'A',
                  UPDAMODE DEFAULT 'S'.
          START-OF-SELECTION.
              OPEN DATASET NFILE FOR INPUT IN TEXT MODE ENCODING DEFAULT.
         CALL FUNCTION 'BDC_OPEN_GROUP'
           EXPORTING
               USER   = SY-UNAME
                CLIENT = SY-MANDT
                  GROUP  = SESSION
                   EXCEPTIONS
                 CLIENT_INVALID = 1
          OTHERS =5.
          DO.
            READ DATASET NFILE INTO INREC.
            IF SY-SUBRC <> 0.
              EXIT.
            ENDIF.
            PERFORM FILL_BDC_TAB.
            CALL TRANSACTION 'FK02'
              USING   BDC_TAB
              MODE    'N'
              UPDATE  'A'.
             IF SY-SUBRC <> 0.
              WRITE: /'ERROR'.
           ENDIF.
         ENDDO.
    CLOSE DATASET NFILE.
    Short text
        File "C:\Document and Sett" is not open.
    What happened?
        Error in the ABAP Application Program
        The current ABAP program "ZTEST1" had to be terminated because it has
        come across a statement that unfortunately cannot be executed.
    Error analysis
        An exception occurred that is explained in detail below.
        The exception, which is assigned to class 'CX_SY_FILE_OPEN_MODE', was not
         caught and
        therefore caused a runtime error.
        The reason for the exception is:
        When accessing the file "C:\Document and Sett", the system recognized that this
         file is
        not open. Therefore, the file cannot be accessed.
    If u help me out of dis problem den i will definately give points ,dats promise.

Maybe you are looking for

  • Cant hear sound on tv shows bought from itunes

    i downloaded tv shows and movies from itunes.  video is fine but no sound

  • Games freeze or black screen after 1 1/2 hrs of playing..

    I first noticed this during Call of Duty, after about an hour to an hour and half of playing the screen would freeze, but the game would continue..I don't have any artifacting or tearing just freeze or ocassionaly black screen. I checked the temps on

  • Missing table data

    We are testing RFC scenarios and created a remote enabled FM ( with a table parameter ) in our ECC system.  The TCP/IP "XITEST" destination has been defined in SM59.  All the required configurations have also been done in XI.   When the FM is execute

  • SWC errors, while SWF works fine, why?

    Edit: I have tried using pure theora libs (no ffmpeg) and the same result - I have created a simple app showing theora info. When launched as standalone,works (shows theora version). As  SWC, error "can't allocate encoder context". Anyone any idea wh

  • [VB][CS] Bug - why myStory.Contents myStory.Texts.Item(1).Contents ?

    hi for me it is bug - but maybe there is logical explanation ... it occurs in ID CS2 and CS4 - so probably in CS3, too let's say we have only one TextFrame in document with contents: Line1<enter> Line2<#> and run something like this (VBScript/VB6 exa