SESSION METHOD ( BDC )

1)When we will go for SESSION METHOD in BDC ?
2)How to schedule SESSION METHOD   in Background ?
3)How to down load errors from Log file ?
4)What happens when an error is encountered while updating in Background as well as in foreground ?
Waiting for early reply with points..................

1. If you are having huge amount of data, if you are uploading the data for multiple applications and if the logfile is necessary...
2. U can use RSBDCSUB
3.
There is a way but it is a bit complicated you will have to do it in debugging the SM35 screen. I hope that I am clear enough below
What I do to get the Log of the SM35 session is take it from the internal table storing the log
in debug mode.
1)First goto SM35
2)Select the log
3)Click on Log
4)Click on the Session
5)Go into debugging mode /h
6)Click on Display
7)Create a Breakpoint on Subroutine 'extend_message_texts'
8) You will find a internal table bdclm, let the subroutine process completely
9)then save the internal table as excel sheet by clicking on the button next to the find button at the top which comes when you see the contents of bdclm
Thus the errors are saved in a file.
4. If there are any error records in session, all those error records will get poulated in log .and after the session is completed , u can see error records which can be corrected and reprocessed again.

Similar Messages

  • Decision between call transaction and session method:BDC

    Hi,
    Kindly guide how to take decision between call transaction and session method?
    Thanks,
    Sanjay

    Hello Sanjay,
    here are some links which discuss the difference between them:
    http://scn.sap.com/thread/721344
    http://scn.sap.com/thread/166845
    Best regards,
    Laszlo

  • About Session method(BDC)

    hiii all,
    plz tell me hw to handle
    !) multiple applications in SESSION method & in which cases we required it. (plz gv me step-by-step procedure to achieve it)?
    2) And what is the structure of FIELD_CATALOG_MERGE?
    3) can anyone expalin me abt SD & MM business process flow.?
    thank u in advance.
    sweta

    Hi Sweta,
    <b>Handling multiple applications (transations) in session method:</b>
    how can we handle multiple applications in session method
    how to handle multiple transaction in session method.
    <b>
    FIELD_CATALOG_MERGE</b>
    AlV!  Field Catalog Merge!
    For more detailed info goto SE37.
    Function module - REUSE_ALV_FIELDCATALOG_MERGE
    Click the "Function Module Documentation" for more information on the parameters.
    <b>MM Process flow</b>
    The typical procurement cycle for a service or material consists of the following phases:
    1. Determination of Requirements
    Materials requirements are identified either in the user departments or via materials planning and control.
    (This can cover both MRP proper and the demand-based approach to inventory control.
    The regular checking of stock levels of materials defined by master records, use of the order-point method, and forecasting on the basis of past usage are important aspects of the latter.) You can enter purchase requisitions yourself, or they can be generated automatically by the materials planning and control system.
    2. Source Determination
    The Purchasing component helps you identify potential sources of supply based on past orders and existing longer-term purchase agreements. This speeds the process of creating requests for quotation (RFQs), which can be sent to vendors electronically via SAP EDI, if desired.
    3. Vendor Selection and Comparison of Quotations
    The system is capable of simulating pricing scenarios, allowing you to compare a number of different quotations. Rejection letters can be sent automatically.
    4. Purchase Order Processing
    The Purchasing system adopts information from the requisition and the quotation to help you create a purchase order. As with purchase requisitions, you can generate Pos yourself or have the system generate them automatically. Vendor scheduling agreements and contracts (in the SAP System, types of longer-term purchase agreement) are also supported.
    5. Purchase Order Follow-Up
    The system checks the reminder periods you have specified and - if necessary - automatically prints reminders or expediters at the predefined intervals. It also provides you with an up-to-date status of all purchase requisitions, quotations, and purchase orders.
    6. Goods Receiving and Inventory Management
    Goods Receiving personnel can confirm the receipt of goods simply by entering the Po number. By specifying permissible tolerances, buyers can limit over- and underdeliveries of ordered goods.
    7. Invoice Verification
    The system supports the checking and matching of invoices. The accounts payable clerk is notified of quantity and price variances because the system has access to PO and goods receipt data. This speeds the process of auditing and clearing invoices for payment.
    <b>SD process flow</b>
    SD Process Flow
    best regards,
    Thangesh

  • Error in my BDC SESSION METHOD

    Hi,
    I was trying work on BDC SESSION METHOD AND MY TCODE IS XK01.
    Here is my code can some one tell me where i am doing wrong becoz its not giving the output as I expected. And I am uploading a tab delimeter file.
    report ZAN_BDCVENDOR
           no standard page heading line-size 255.
    include bdcrecx1.
    DATA: I_BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
    DATA: BEGIN OF RECORD OCCURS 0,
    LIFNR(016),
    BURKS(004),
    EKORG(004),
    KTOKK(004),
    AKONT(010),
    FDGRV(010),
    WAERS(005),
    END OF RECORD.
    start-of-selection.
    perform open_group.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        filename                      = 'C:\VENDOR.TXT'
    FILETYPE                      = 'ASC'
      tables
        data_tab                      = RECORD
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    LOOP AT RECORD.
    perform bdc_dynpro      using 'SAPMF02K' '0100'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'USE_ZAV'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'RF02K-LIFNR'
                                  '8765'.
    perform bdc_field       using 'RF02K-BUKRS'
                                  '1000'.
    perform bdc_field       using 'RF02K-EKORG'
                                  '1000'.
    perform bdc_field       using 'RF02K-KTOKK'
                                  '0001'.
    perform bdc_field       using 'USE_ZAV'
                                  'X'.
    perform bdc_dynpro      using 'SAPMF02K' '0210'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFB1-FDGRV'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=UPDA'.
    perform bdc_field       using 'LFB1-AKONT'
                                  '160000'.
    perform bdc_field       using 'LFB1-FDGRV'
                                  'A1'.
    perform bdc_dynpro      using 'SAPMF02K' '0310'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFM1-WAERS'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=UPDA'.
    perform bdc_field       using 'LFM1-WAERS'
                                  'usd'.
    perform bdc_transaction using 'XK01'.
    ENDLOOP.
    perform close_group.
                  CALL FUNCTION 'BDC_OPEN_GROUP'
                   EXPORTING
                    CLIENT                    = SY-MANDT
                    DEST                      = FILLER8
                     GROUP                     = 'SESSION1'
                    HOLDDATE                  = FILLER8
                    KEEP                      = FILLER1
                     USER                      = SY-UNAME
                    RECORD                    = FILLER1
                    PROG                      = SY-CPROG
                  IMPORTING
                    QID                       =
                  EXCEPTIONS
                    CLIENT_INVALID            = 1
                    DESTINATION_INVALID       = 2
                    GROUP_INVALID             = 3
                    GROUP_IS_LOCKED           = 4
                    HOLDDATE_INVALID          = 5
                    INTERNAL_ERROR            = 6
                    QUEUE_ERROR               = 7
                    RUNNING                   = 8
                    SYSTEM_LOCK_ERROR         = 9
                    USER_INVALID              = 10
                    OTHERS                    = 11
                  IF sy-subrc <> 0.
                  WRITE 'ERROR IN OPEN_GROUP'.
                  ENDIF.
                   CALL FUNCTION 'BDC_INSERT'
                   EXPORTING
                     TCODE                  = TCODE
                     POST_LOCAL             = NOVBLOCAL
                     PRINTING               = NOPRINT
                     SIMUBATCH              = ' '
                     CTUPARAMS              = ' '
                     TABLES
                       dynprotab              = I_BDCDATA
                   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.
                   CALL FUNCTION 'BDC_CLOSE_GROUP'
                   EXCEPTIONS
                     NOT_OPEN          = 1
                     QUEUE_ERROR       = 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.
    I appreciate

    Hi,
    i guess, the error is due to, u didnt pass the TCODE parameter in BDC_INSERT FM.
    Try by passing it...
    CALL FUNCTION 'BDC_INSERT'
    EXPORTING
    TCODE = TCODE*
    POST_LOCAL = NOVBLOCAL
    PRINTING = NOPRINT
    SIMUBATCH = ' '
    CTUPARAMS = ' '
    TABLES
    dynprotab = I_BDCDATA
    EXCEPTIONS
    INTERNAL_ERROR = 1
    NOT_OPEN = 2
    QUEUE_ERROR = 3
    TCODE_INVALID = 4
    PRINTING_INVALID = 5
    POSTING_INVALID = 6
    OTHERS = 7
    Hope it works!!
    Regards,
    Pavan

  • Creation of Material using BDC Session method & global class

    Hi
    Creation of Material using BDC Session method & global class by using oops.
    can anyone plz help me out

    Hi,
    it looks like it's not possible to call this BAPI wihtout material number. Here is a quote from BAPI documentation.
    When creating material master data, you must transfer the material
    number, the material type, and the industry sector to the method. You
    must also enter a material description and its language.
    Cheers

  • Creating Sales order texts while using BDC session method is not working

    Hi All,
    I have an existing program which creates sales order using BDC session method.( Actual program uses BAPI to create sales order and in case if any error occurs during creation of sales order BDC session is generated so that user can process it later and i am facing issues in this part of code where it uses BDC)
    I wanted to modify this BDC sesion  to update the sales order text also. I tried recording VA01 for creationg sales order text unfortunatly it is not capturing the data i am entering in the text fields.
    Please suggest if there is any way to create sales order using BDC.
    Regards
    Sheeba

    Hi Madhu,
    '=TP_CREATE' is the OK code i am getting for creating TEXTS. But the text entered are not captured in BDC.
    Part of BDC program generated for cretaing sales order texts.
    perform bdc_dynpro      using 'SAPMV45A' '4003'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=%_GC 128 22'.
    perform bdc_field       using 'LV70T-SPRAS'
                                  'EN'.
    perform bdc_dynpro      using 'SAPMV45A' '4003'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=TP_CREATE'.
    perform bdc_field       using 'LV70T-SPRAS'
                                  'EN'.
    perform bdc_dynpro      using 'SAPMV45A' '4003'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=%_GC 128 22'.
    perform bdc_field       using 'LV70T-SPRAS'
                                  'EN'.
    perform bdc_dynpro      using 'SAPMV45A' '4003'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=TP_CREATE'.
    perform bdc_field       using 'LV70T-SPRAS'
                                  'EN'.
    perform bdc_dynpro      using 'SAPMV45A' '4003'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/EBACK'.
    perform bdc_field       using 'LV70T-SPRAS'
                                  'EN'.
    perform bdc_dynpro      using 'SAPMV45A' '4001'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=SICH'.
    Regards,
    Sheeba

  • Problem in bdc session method for tcode FS00

    Hi Experts,
    problem in bdc session method, when i run this program no output is shown.
    Even it is not calling the transaction.
    code as follows.
    *& Report  Z_GL_MASTER
    *& CATEGORY         =  BDC.
    *& DESCRIPTION      =  UPLOADING G/L MASTER RECORDS.
    *& TECHNICAL CONST  =  FRANCIS REDDY.
    *& FUNTIONAL CONST  =  FICO.
    REPORT  Z_GL_MASTER.
    *& Internal  Table
    DATA : BEGIN OF IT_UPLOAD OCCURS 0,
           SAKNR LIKE  GLACCOUNT_SCREEN_KEY-SAKNR,          " ACCOUNT NUMBER.
           BUKRS LIKE  GLACCOUNT_SCREEN_KEY-BUKRS,          " COMPANY CODE.
           KTOKS LIKE GLACCOUNT_SCREEN_COA-KTOKS,           " ACCOUNT GROUP.
           XPLACCT LIKE GLACCOUNT_SCREEN_COA-XPLACCT,       " P&L STATEMEMENT.
           GVTYP LIKE  GLACCOUNT_SCREEN_COA-GVTYP,          " P&L STATEMENT TYPE.
           XBILK LIKE GLACCOUNT_SCREEN_COA-XBILK,           " BALANCE SHEET STATEMENT
           SHORT LIKE GLACCOUNT_SCREEN_COA-TXT20_ML,        " SHORT TEXT.
           LONG LIKE GLACCOUNT_SCREEN_COA-TXT50_ML,         " LONG TEXT.
           WAERS LIKE GLACCOUNT_SCREEN_CCODE-WAERS,         " ACCOUNT CURRENCY.
           XSALH LIKE GLACCOUNT_SCREEN_CCODE-XSALH,         " ONLY BALANCES IN LOCAL CURRENCY.
           MITKZ LIKE GLACCOUNT_SCREEN_CCODE-MITKZ,         " RECONCILATION ACCOUNT FOR ACCOUNT TYPEGLACCOUNT_SCREEN_CCODE-MITKZ
           XOPVW LIKE GLACCOUNT_SCREEN_CCODE-XOPVW,         " OPEN ITEM MANAGEMENT.
           XKRES LIKE GLACCOUNT_SCREEN_CCODE-XKRES,         " LINE ITEM DISPLAY.
           ZUAWA LIKE GLACCOUNT_SCREEN_CCODE-ZUAWA,         " SORT KEY.
           FSTAG LIKE GLACCOUNT_SCREEN_CCODE-FSTAG,         " FIELD STATUS GROUP.
           XGKON LIKE GLACCOUNT_SCREEN_CCODE-XGKON,         " RELAVENT CASH FLOW.
           END OF IT_UPLOAD.
    *& Internal  Table FOR BDC DATA.
    DATA : IT_BDCDATA TYPE  BDCDATA OCCURS 0  WITH HEADER LINE.
    *& DATA DECLARATIONS.
    DATA : V_FILE LIKE RLGRAP-FILENAME.
    *&  SELECTION SCREEN.
    PARAMETER : P_FILE LIKE V_FILE.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
         PERFORM GET_FILENAME.
    START-OF-SELECTION.
          PERFORM UPLOAD_DATA.
          PERFORM BDCDATA_OPEN.
          PERFORM BDC_POPULATE.
          PERFORM BDC_CLOSE.
    *&      Form  GET_FILENAME
    form GET_FILENAME .
      CALL FUNCTION 'F4_FILENAME'
       EXPORTING
         PROGRAM_NAME        = SYST-CPROG
         DYNPRO_NUMBER       = SYST-DYNNR
         FIELD_NAME          = 'P_FILE'
       IMPORTING
         FILE_NAME           = P_FILE.
    endform.                    " GET_FILENAME
    *&      Form  UPLOAD_DATA
    form UPLOAD_DATA .
    CALL FUNCTION 'WS_UPLOAD'
    EXPORTING
       FILENAME                      =  P_FILE
       FILETYPE                      = 'DAT'
      TABLES
        data_tab                     = IT_UPLOAD.
    endform.                    " UPLOAD_DATA
    *&      Form  BDCDATA_OPEN
       FORM FOR BDC_OPEN_GROUP.
    form BDCDATA_OPEN .
    CALL FUNCTION 'BDC_OPEN_GROUP'
    EXPORTING
       CLIENT                    = SY-MANDT
       GROUP                     = 'GLMASTER'
       HOLDDATE                  = SY-DATUM
       KEEP                      = 'X'
       USER                      = SY-UNAME.
    endform.                    " BDCDATA_OPEN
    *&      Form  BDC_POPULATE
      POPULATING BDC DATA .
    form BDC_POPULATE .
    loop at it_upload.
    PERFORM BDC_SUB1 USING 'X' 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
    PERFORM BDC_SUB2 USING 'BDC_OKCODE' '=ACC_CRE'.
    PERFORM BDC_SUB2 USING 'BDC_CURSOR' 'GLACCOUNT_SCREEN_KEY-SAKNR'.
    PERFORM BDC_SUB2 USING 'GLACCOUNT_SCREEN_KEY-SAKNR'    IT_UPLOAD-SAKNR.
    PERFORM BDC_SUB2 USING 'GLACCOUNT_SCREEN_KEY-BUKRS'    IT_UPLOAD-BUKRS.
    PERFORM BDC_SUB1 USING 'X' 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
    PERFORM BDC_SUB2 USING 'BDC_OKCODE' '=2102_GROUP'.
    PERFORM BDC_SUB2 USING 'BDC_CURSOR' 'GLACCOUNT_SCREEN_COA-KTOKS'.
    PERFORM BDC_SUB2 USING 'GLACCOUNT_SCREEN_COA-KTOKS'    IT_UPLOAD-KTOKS.
    PERFORM BDC_SUB2 USING 'GLACCOUNT_SCREEN_COA-XPLACCT'  IT_UPLOAD-XPLACCT.
    PERFORM BDC_SUB1 USING 'X' 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
    PERFORM BDC_SUB2 USING 'BDC_OKCODE' '=2102_BS_PL'.
    PERFORM BDC_SUB2 USING 'GLACCOUNT_SCREEN_COA-GVTYP'    IT_UPLOAD-GVTYP.
    PERFORM BDC_SUB2 USING 'GLACCOUNT_SCREEN_COA-XBILK'    IT_UPLOAD-XBILK.
    PERFORM BDC_SUB1 USING 'X' 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
    PERFORM BDC_SUB2 USING 'BDC_CURSOR' 'GLACCOUNT_SCREEN_COA-TXT20_ML'.
    PERFORM BDC_SUB2 USING 'GLACCOUNT_SCREEN_COA-TXT20_ML' IT_UPLOAD-SHORT.
    PERFORM BDC_SUB2 USING 'GLACCOUNT_SCREEN_COA-TXT50_ML' IT_UPLOAD-LONG.
    PERFORM BDC_SUB1 USING 'X' 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
    PERFORM BDC_SUB2 USING  'BDC_OKCODE' '=TAB02'.
    PERFORM BDC_SUB2 USING 'GLACCOUNT_SCREEN_CCODE-WAERS'  IT_UPLOAD-WAERS.
    PERFORM BDC_SUB2 USING 'GLACCOUNT_SCREEN_CCODE-XSALH'  IT_UPLOAD-XSALH.
    PERFORM BDC_SUB2 USING 'GLACCOUNT_SCREEN_CCODE-MITKZ'  IT_UPLOAD-MITKZ.
    PERFORM BDC_SUB2 USING 'GLACCOUNT_SCREEN_CCODE-XOPVW'  IT_UPLOAD-XOPVW.
    PERFORM BDC_SUB2 USING 'GLACCOUNT_SCREEN_CCODE-XKRES'  IT_UPLOAD-XKRES.
    PERFORM BDC_SUB2 USING 'GLACCOUNT_SCREEN_CCODE-ZUAWA'  IT_UPLOAD-ZUAWA.
    PERFORM BDC_SUB1 USING 'X' 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
    PERFORM BDC_SUB2 USING 'BDC_OKCODE' '=TAB03'.
    PERFORM BDC_SUB2 USING 'GLACCOUNT_SCREEN_CCODE-FSTAG' IT_UPLOAD-FSTAG.
    PERFORM BDC_SUB2 USING 'GLACCOUNT_SCREEN_CCODE-XGKON' IT_UPLOAD-XGKON.
    CALL FUNCTION 'BDC_INSERT'
      EXPORTING
        TCODE                  = 'FS00'
       TABLES
         dynprotab              = IT_BDCDATA.
    endloop.
    endform.                    " BDC_POPULATE
    *&      Form  BDC_CLOSE
    FORM FOR CLOSING BDC_GROUP
    form BDC_CLOSE .
    CALL FUNCTION 'BDC_CLOSE_GROUP'.
    endform.                    " BDC_CLOSE
    *&      Form  BDC_SUB1
       FORM FOR BDCDATA.
    form BDC_SUB1   USING  A  B  C.
    CLEAR  IT_BDCDATA.
    IT_BDCDATA-DYNBEGIN = A.
    IT_BDCDATA-PROGRAM =  B.
    IT_BDCDATA-DYNPRO =   C.
    APPEND IT_BDCDATA.
    endform.                    " BDC_SUB1
    *&      Form  BDC_SUB2
          text
    form BDC_SUB2   USING  A  B.
    CLEAR  IT_BDCDATA.
      IT_BDCDATA-FNAM = A.
      IT_BDCDATA-FVAL = B.
      APPEND IT_BDCDATA.
    endform.                    " BDC_SUB2
    Points will be  rewarded.
    Thanks in advance.
    Francis.

    Hi,
    Once the program is executed..It will a BDC session..
    THen you have to use the transaction SM35..To process the BDC session..
    Thanks,
    Naren

  • How to handle the errors in BDC Session method

    Hi All,
    I am uploading Material Master (MM01) records using BDC Session Method.my problem is when i am running the program, all the error records are going to flat file.how can i correcting the error records and after correction how can i re-process the error records.tell me with example.
    i have around 70,000 records in my flat file.

    Hi,
    I am attaching few threads.Hope these will help you.
    If there are any error records in session, all those error records will get poulated in log .SM35 and after the session is completed , u can see error records which can be corrected and reprocessed again
    We have the structures BDCLD and BDCLM, which will capture the log details inthe session. Firstly, sesssion should be processed. After that log will be created. Then caputure the information into an internal table using BDCLM and BDCLD.
    and refer the link.
    error correction in bdc session
    regards
    Madhu

  • How to handle screen resolution in bdc session method.

    hi all,
    how to handle screen resolution in bdc session method.

    Hello,
    Why do need that for? Is it to add rows on a table control??
    If it does, add new rows by using the add button instead of adding into the table control directly to each row.
    Bye
    Gabriel.

  • Error occured in bdc(session method)

    hai,
    i was written one bdc program with session method but unfortunatly it's throwing some error like bdc_group is invalid.
    this problem happening at when i was going to give the file path through f4 in selection screen it's showing like  BDC_OPEN_GROUP, group .. is invalid
    iam sending my coding also plz give me the clarifications abt this one.
               SESSION METHOD           **********************
    TYPES : BEGIN OF TY_DATA,
           LIFNR TYPE LIFNR,
           EKORG TYPE EKORG,
           KTOKK TYPE KTOKK,
           NAME1 TYPE NAME1_GP,
           SORTL TYPE SORTL,
           LAND1 TYPE LAND1_GP,
           WAERS TYPE BSTWA,
           END OF TY_DATA.
    DATA : WA_DATA TYPE TY_DATA,
           WA_BDCDATA TYPE BDCDATA,
           WA_BDCMSGCOLL TYPE BDCMSGCOLL.
    DATA : IT_DATA TYPE TABLE OF TY_DATA,
           IT_BDCDATA TYPE TABLE OF BDCDATA,
           IT_BDCMSGCOLL TYPE TABLE OF BDCMSGCOLL.
    DATA : V_FILE TYPE STRING.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    PARAMETER : PA_FILE LIKE FC03TAB-PL00_FILE, "OBLIGATORY default 'C:\MAHESH\IT_FILE.TXT'
                P_GROUP LIKE APQI-GROUPID OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK B1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR PA_FILE.
      PERFORM GET_F4_FOR_FILE USING PA_FILE.
      V_FILE = PA_FILE.
      PERFORM UPLOAD_FILE_TO_ITAB USING V_FILE CHANGING IT_DATA.
      PERFORM OPEN_SESSION USING P_GROUP.
      LOOP AT IT_DATA INTO WA_DATA.
        REFRESH IT_BDCDATA.
    FIRST SCREEN DETAILS
        PERFORM FILL_SCREEN_DETAILS USING 'SAPMF02K' '0107' 'X'.
    **** FIELD DETAILS
        PERFORM FILL_FIELD_DETAILS USING 'BDC_CURSOR' 'RF02K-KTOKK'.
    OK CODES
        PERFORM FILL_FIELD_DETAILS USING 'BDC_OKCODE' '/00'.
    **** FILED LIFNR
        PERFORM FILL_FIELD_DETAILS USING 'RF02K-LIFNR' WA_DATA-LIFNR.
    FIELD EKORG
        PERFORM FILL_FIELD_DETAILS USING 'RF02K-EKORG' WA_DATA-EKORG.
    **** FIELD KTOKK
        PERFORM FILL_FIELD_DETAILS USING 'RF02K-KTOKK' WA_DATA-KTOKK.
    SECOND SCREEN DETAILS
        PERFORM FILL_SCREEN_DETAILS USING 'SAPMF02K' '0110' 'X'.
    FIELD CURSOR
        PERFORM FILL_FIELD_DETAILS USING 'BDC_CURSOR' 'lfa1-land1'.
    OK CODES
        PERFORM FILL_FIELD_DETAILS USING 'BDC_OKCODE' '=upda'.
    field NAME
        PERFORM FILL_FIELD_DETAILS USING 'LFA1-NAME1' WA_DATA-NAME1.
    field SORTL
        PERFORM FILL_FIELD_DETAILS USING 'LFA1-SORTL' WA_DATA-SORTL.
    field LAND1
        PERFORM FILL_FIELD_DETAILS USING 'LFA1-LAND1' WA_DATA-LAND1.
    THIRD SCREEN DETAILS
        PERFORM FILL_SCREEN_DETAILS USING 'SAPMF02K' '0310' 'X'.
    FIELD CURSOR
        PERFORM FILL_FIELD_DETAILS USING 'BDC_CURSOR' 'LFM1-WAERS'.
    OK CODES
        PERFORM FILL_FIELD_DETAILS USING 'BDC_OKCODE' '=upda'.
       ******** field SORTL
        PERFORM FILL_FIELD_DETAILS USING 'LFM1-WAERS' WA_DATA-WAERS.
        PERFORM BDC_INSERT USING 'MK01' IT_BDCDATA.
      ENDLOOP.
      PERFORM CLOSE_SESSION.
    *&      Form  GET_F4_FOR_FILE
    FORM GET_F4_FOR_FILE  USING    P_PA_FILE.
      CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
        EXPORTING
          FIELD_NAME = 'PA_FILE'
        CHANGING
          FILE_NAME  = PA_FILE.
      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_F4_FOR_FILE
    *&      Form  UPLOAD_FILE_TO_ITAB
    FORM UPLOAD_FILE_TO_ITAB  USING    FP_V_FILE
                              CHANGING FP_IT_DATA LIKE IT_DATA.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          FILENAME            = FP_V_FILE
          FILETYPE            = 'ASC'
          HAS_FIELD_SEPARATOR = 'X'
        TABLES
          DATA_TAB            = FP_IT_DATA.
      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.                    " UPLOAD_FILE_TO_ITAB
    *&      Form  OPEN_SESSION
    FORM OPEN_SESSION  USING    FP_P_GROUP.
      CALL FUNCTION 'BDC_OPEN_GROUP'
       EXPORTING
         CLIENT                    = SY-MANDT
      DEST                      = FILLER8
         GROUP                     = FP_P_GROUP
      HOLDDATE                  = FILLER8
         KEEP                      =  'X'
         USER                      = SY-UNAME
      IF SY-SUBRC = 0.
        WRITE : / 'PROCESS THE SESSION',FP_P_GROUP,'USING SM35'.
      ENDIF.
    ENDFORM.                    " OPEN_SESSION
    *&      Form  FILL_SCREEN_DETAILS
    FORM FILL_SCREEN_DETAILS  USING PROGRAM
                                    DYNPRO
                                    DYNBEGIN.
      WA_BDCDATA-PROGRAM = PROGRAM.
      WA_BDCDATA-DYNPRO  = DYNPRO.
      WA_BDCDATA-DYNBEGIN = DYNBEGIN.
      APPEND WA_BDCDATA TO IT_BDCDATA.
      CLEAR WA_BDCDATA.
    ENDFORM.                    " FILL_SCREEN_DETAILS
    *&      Form  FILL_FIELD_DETAILS
    FORM FILL_FIELD_DETAILS  USING  FNAM FVAL.
      WA_BDCDATA-FNAM = FNAM.
      WA_BDCDATA-FVAL = FVAL.
      APPEND WA_BDCDATA TO IT_BDCDATA.
      CLEAR WA_BDCDATA.
    ENDFORM.                    " FILL_FIELD_DETAILS
    *&      Form  BDC_INSERT
    FORM BDC_INSERT  USING FP_TCODE TYPE SYTCODE
                           FP_IT_BDCDATA LIKE IT_BDCDATA.
      CALL FUNCTION 'BDC_INSERT'
        EXPORTING
          TCODE     = FP_TCODE
        TABLES
          DYNPROTAB = FP_IT_BDCDATA.
      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_INSERT
    *&      Form  CLOSE_SESSION
    FORM CLOSE_SESSION .
      CALL FUNCTION 'BDC_CLOSE_GROUP'
    EXCEPTIONS
      NOT_OPEN          = 1
      QUEUE_ERROR       = 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.
    ENDFORM.                    " CLOSE_SESSION

    hai,
    i was written one bdc program with session method but unfortunatly it's throwing some error like bdc_group is invalid.
    this problem happening at when i was going to give the file path through f4 in selection screen it's showing like  BDC_OPEN_GROUP, group .. is invalid
    iam sending my coding also plz give me the clarifications abt this one.
               SESSION METHOD           **********************
    TYPES : BEGIN OF TY_DATA,
           LIFNR TYPE LIFNR,
           EKORG TYPE EKORG,
           KTOKK TYPE KTOKK,
           NAME1 TYPE NAME1_GP,
           SORTL TYPE SORTL,
           LAND1 TYPE LAND1_GP,
           WAERS TYPE BSTWA,
           END OF TY_DATA.
    DATA : WA_DATA TYPE TY_DATA,
           WA_BDCDATA TYPE BDCDATA,
           WA_BDCMSGCOLL TYPE BDCMSGCOLL.
    DATA : IT_DATA TYPE TABLE OF TY_DATA,
           IT_BDCDATA TYPE TABLE OF BDCDATA,
           IT_BDCMSGCOLL TYPE TABLE OF BDCMSGCOLL.
    DATA : V_FILE TYPE STRING.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    PARAMETER : PA_FILE LIKE FC03TAB-PL00_FILE, "OBLIGATORY default 'C:\MAHESH\IT_FILE.TXT'
                P_GROUP LIKE APQI-GROUPID OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK B1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR PA_FILE.
      PERFORM GET_F4_FOR_FILE USING PA_FILE.
      V_FILE = PA_FILE.
      PERFORM UPLOAD_FILE_TO_ITAB USING V_FILE CHANGING IT_DATA.
      PERFORM OPEN_SESSION USING P_GROUP.
      LOOP AT IT_DATA INTO WA_DATA.
        REFRESH IT_BDCDATA.
    FIRST SCREEN DETAILS
        PERFORM FILL_SCREEN_DETAILS USING 'SAPMF02K' '0107' 'X'.
    **** FIELD DETAILS
        PERFORM FILL_FIELD_DETAILS USING 'BDC_CURSOR' 'RF02K-KTOKK'.
    OK CODES
        PERFORM FILL_FIELD_DETAILS USING 'BDC_OKCODE' '/00'.
    **** FILED LIFNR
        PERFORM FILL_FIELD_DETAILS USING 'RF02K-LIFNR' WA_DATA-LIFNR.
    FIELD EKORG
        PERFORM FILL_FIELD_DETAILS USING 'RF02K-EKORG' WA_DATA-EKORG.
    **** FIELD KTOKK
        PERFORM FILL_FIELD_DETAILS USING 'RF02K-KTOKK' WA_DATA-KTOKK.
    SECOND SCREEN DETAILS
        PERFORM FILL_SCREEN_DETAILS USING 'SAPMF02K' '0110' 'X'.
    FIELD CURSOR
        PERFORM FILL_FIELD_DETAILS USING 'BDC_CURSOR' 'lfa1-land1'.
    OK CODES
        PERFORM FILL_FIELD_DETAILS USING 'BDC_OKCODE' '=upda'.
    field NAME
        PERFORM FILL_FIELD_DETAILS USING 'LFA1-NAME1' WA_DATA-NAME1.
    field SORTL
        PERFORM FILL_FIELD_DETAILS USING 'LFA1-SORTL' WA_DATA-SORTL.
    field LAND1
        PERFORM FILL_FIELD_DETAILS USING 'LFA1-LAND1' WA_DATA-LAND1.
    THIRD SCREEN DETAILS
        PERFORM FILL_SCREEN_DETAILS USING 'SAPMF02K' '0310' 'X'.
    FIELD CURSOR
        PERFORM FILL_FIELD_DETAILS USING 'BDC_CURSOR' 'LFM1-WAERS'.
    OK CODES
        PERFORM FILL_FIELD_DETAILS USING 'BDC_OKCODE' '=upda'.
       ******** field SORTL
        PERFORM FILL_FIELD_DETAILS USING 'LFM1-WAERS' WA_DATA-WAERS.
        PERFORM BDC_INSERT USING 'MK01' IT_BDCDATA.
      ENDLOOP.
      PERFORM CLOSE_SESSION.
    *&      Form  GET_F4_FOR_FILE
    FORM GET_F4_FOR_FILE  USING    P_PA_FILE.
      CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
        EXPORTING
          FIELD_NAME = 'PA_FILE'
        CHANGING
          FILE_NAME  = PA_FILE.
      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_F4_FOR_FILE
    *&      Form  UPLOAD_FILE_TO_ITAB
    FORM UPLOAD_FILE_TO_ITAB  USING    FP_V_FILE
                              CHANGING FP_IT_DATA LIKE IT_DATA.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          FILENAME            = FP_V_FILE
          FILETYPE            = 'ASC'
          HAS_FIELD_SEPARATOR = 'X'
        TABLES
          DATA_TAB            = FP_IT_DATA.
      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.                    " UPLOAD_FILE_TO_ITAB
    *&      Form  OPEN_SESSION
    FORM OPEN_SESSION  USING    FP_P_GROUP.
      CALL FUNCTION 'BDC_OPEN_GROUP'
       EXPORTING
         CLIENT                    = SY-MANDT
      DEST                      = FILLER8
         GROUP                     = FP_P_GROUP
      HOLDDATE                  = FILLER8
         KEEP                      =  'X'
         USER                      = SY-UNAME
      IF SY-SUBRC = 0.
        WRITE : / 'PROCESS THE SESSION',FP_P_GROUP,'USING SM35'.
      ENDIF.
    ENDFORM.                    " OPEN_SESSION
    *&      Form  FILL_SCREEN_DETAILS
    FORM FILL_SCREEN_DETAILS  USING PROGRAM
                                    DYNPRO
                                    DYNBEGIN.
      WA_BDCDATA-PROGRAM = PROGRAM.
      WA_BDCDATA-DYNPRO  = DYNPRO.
      WA_BDCDATA-DYNBEGIN = DYNBEGIN.
      APPEND WA_BDCDATA TO IT_BDCDATA.
      CLEAR WA_BDCDATA.
    ENDFORM.                    " FILL_SCREEN_DETAILS
    *&      Form  FILL_FIELD_DETAILS
    FORM FILL_FIELD_DETAILS  USING  FNAM FVAL.
      WA_BDCDATA-FNAM = FNAM.
      WA_BDCDATA-FVAL = FVAL.
      APPEND WA_BDCDATA TO IT_BDCDATA.
      CLEAR WA_BDCDATA.
    ENDFORM.                    " FILL_FIELD_DETAILS
    *&      Form  BDC_INSERT
    FORM BDC_INSERT  USING FP_TCODE TYPE SYTCODE
                           FP_IT_BDCDATA LIKE IT_BDCDATA.
      CALL FUNCTION 'BDC_INSERT'
        EXPORTING
          TCODE     = FP_TCODE
        TABLES
          DYNPROTAB = FP_IT_BDCDATA.
      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_INSERT
    *&      Form  CLOSE_SESSION
    FORM CLOSE_SESSION .
      CALL FUNCTION 'BDC_CLOSE_GROUP'
    EXCEPTIONS
      NOT_OPEN          = 1
      QUEUE_ERROR       = 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.
    ENDFORM.                    " CLOSE_SESSION

  • Bdc session method

    Hi all ,
    where BDC_OK  fields  will store  in which table .
    and also how to reslove the screen resolution  in bdc session method .
    Regards ,
    Kiran .

    hi
    to maintain Screen Resolution just try this
    in the BDC Program source code u will find
    include BDCRECX1 just double click on it,u can see the selection screen of BDC
    and form definitions for Open_Group ,BdcTransaction & CloseGroup,since it is a std include program
    u cannot change it so copy this to a Z include and use that Z include instead of BDCRECX1
    Then go to form BDCTRANSACTION using TCODE
    in that form Declare a workarea(eg: opt) of structure type CTU_PARAMS
    data:   messtab like bdcmsgcoll occurs 0 with header line.
    data : opt type ctu_params.
    pass the values to it
    dismode-> Processing mode (A,E,N,P)
    updmode-> Update mode (L,S,A)
    defsize-> Default Screen Size (X) to maintain Screen Resolution
      opt-dismode = ctumode.
      opt-updmode = cupdate.
      opt-defsize = 'X'.
    if session = 'X'.
        call function 'BDC_INSERT'
         exporting
           tcode                  = tcode
           ctuparams              = 'OPT'
          tables
            dynprotab              = bdcdata.
    else.
        refresh messtab.
        call transaction tcode using bdcdata options from opt messages into messtab.
    endif.
    Regards

  • Bdc for Vlo2 in session method

    Hi Guru's
    Please help me out. Will reward with the points for the helpfull answers.
    I need to create a session method for the 'VL02' Transaction.
    I need to Record as
    VL02-----> Overview--
    > Picking.
    The only field which i have to enter in the First screen is 'Delivery'.
    The only field which i have to enter in the second screen is 'Picking Quantity'.
    However the field in the second screen which i need to enter is a multiple item field.
    Please help me out.
    Thanx in advance.

    BDC for vl02
    BDC for vl02

  • Bdc with session method

    hi all,
            i need to upload these transactions(MB1A, MB31,MB1A )one after the other.i have  the data in flat file(excel). I need to use BDC for this. I am prefering SESSION method for this.Can any one help me to acieve this. shall i record the transactions one after the othet and keep BDC_INSERT after the perform statements. will achieve this. Help me with a sample code for this

    Hi Kiran,
    Upload data into internal table (itab) using the below function modules.And then by using session method populate that in the BDCDATA internal table as you generally do session method.
    PARAMETERS: filename LIKE rlgrap-filename .
    PARAMETERS: kzheader AS CHECKBOX.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR filename.
      CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
           EXPORTING
                mask      = '*.xls'
                static    = 'X'
           CHANGING
                file_name = filename.
    START-OF-SELECTION.
      CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
           EXPORTING
                filename                = filename
                i_begin_col             = begcol
                i_begin_row             = begrow
                i_end_col               = endcol
                i_end_row               = endrow
           TABLES
                intern                  = itab
           EXCEPTIONS
                inconsistent_parameters = 1
                upload_ole              = 2
                OTHERS                  = 3.
      IF sy-subrc <> 0.
        WRITE:/ 'Upload Error ', SY-SUBRC.
      ENDIF.
    Reward points if useful.
    Thanks & Regards,
    khan.
    Edited by: Ahmed Khan on Apr 29, 2008 8:01 AM

  • BDC Session method (sample code OR  document)

    Hi Friends,
    I need BDC Session method sample program to practice. or realted document. plz help me out.
    Regards & Thanks
    Kali Pramod

    Hi,
      Goto transaction SHDB record a Transaction Completly and then save it and click create program this creates program using Call Transaction and Session Method, if you go through the program you can know the complete process.
      Hope this could be of little help.
    Thanks,
    Prashanth

  • Question in BDC session method.

    Hi guys,
    I am trying to upload BOM using BDC session method.
    While doing this, i have learnt the steps by heart. But i do not understrand the logic behind the steps. For example, why do we include this statement
    Data: IT-BDC like BDCDATA occurs 0 with headerline.
    What if we don't include this statement?
    Moderator message: sorry, these forums are not targeted to provide step by step guides to beginners, please search for available information, take courses, etc.
    locked by: Thomas Zloch on Sep 10, 2010 1:06 PM

    Hello Dhirendra,
    Thanks for immediate reply. I want to understand BDC method conceptually. What exactly happens by performing each step.
    I am putting up the BDC i made. I copied some of the code from here and there. It works fine but i don't understand the purpose of BDCDATA,
    call transaction 'cs01'
    and form bdc_dynpro and form bdc_field.
    I am quite new to ABAP. Please don't mind if i ask dumb questions.
    I am unable to understand how control flows through the code logic.
    report ZBDCFORCS01
           no standard page heading line-size 255.
    *include bdcrecx1.
    DATA: IT_BDC LIKE BDCDATA OCCURS 0 WITH HEADER LINE,
          IT_MSGCOLL LIKE BDCMSGCOLL OCCURS 0.
    TYPES TRUXS_T_TEXT_DATA(4096) TYPE C OCCURS 0.
    DATA: I_TAB_RAW_DATA TYPE TRUXS_T_TEXT_DATA.
    DATA: BEGIN OF ITAB OCCURS 0,
          MATNR(18),
          WERKS(4),
          STLAN(1),
          IDNRK(18),
          MENGE(20),
          END OF ITAB.
    SELECTION-SCREEN: BEGIN OF BLOCK b1.
      PARAMETERS: CS01FILE TYPE RLGRAP-FILENAME.
    SELECTION-SCREEN: END OF BLOCK b1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR CS01FILE.
      CALL FUNCTION 'F4_FILENAME'
       EXPORTING
         PROGRAM_NAME        = SYST-CPROG
         DYNPRO_NUMBER       = SYST-DYNNR
         FIELD_NAME          = ' '
       IMPORTING
         FILE_NAME           = CS01FILE
    start-of-selection.
    CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
      EXPORTING
      I_FIELD_SEPERATOR          =
      I_LINE_HEADER              =
        I_TAB_RAW_DATA             = I_TAB_RAW_DATA
        I_FILENAME                 = CS01FILE
      TABLES
        I_TAB_CONVERTED_DATA       = ITAB[]
    EXCEPTIONS
       CONVERSION_FAILED          = 1
       OTHERS                     = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    *perform open_group.
    LOOP AT ITAB.
    perform bdc_dynpro      using 'SAPLCSDI' '0100'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RC29N-STLAN'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'RC29N-MATNR'
                                 '1400-500'.
    itab-matnr.
    perform bdc_field       using 'RC29N-WERKS'
                                 '1000'.
    itab-werks.
    perform bdc_field       using 'RC29N-STLAN'
                                 '1'.
    itab-stlan.
    perform bdc_field       using 'RC29N-DATUV'
                                  '10.09.2010'.
    perform bdc_dynpro      using 'SAPLCSDI' '0110'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'RC29K-BMENG'
                                  '1'.
    perform bdc_field       using 'RC29K-STLST'
                                  '1'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RC29K-EXSTL'.
    perform bdc_dynpro      using 'SAPLCSDI' '0111'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RC29K-LABOR'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_dynpro      using 'SAPLCSDI' '0140'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RC29P-MENGE(02)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'RC29P-IDNRK(01)'
                                 '1300-320'.
    ITAB-IDNRK.
    perform bdc_field       using 'RC29P-IDNRK(02)'
                                 '1300-312'.
    ITAB-IDNRK.
    perform bdc_field       using 'RC29P-MENGE(01)'
                                 '2'.
    ITAB-MENGE.
    perform bdc_field       using 'RC29P-MENGE(02)'
                                 '2'.
    ITAB-MENGE.
    perform bdc_dynpro      using 'SAPLCSDI' '0130'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RC29P-POSNR'.
    perform bdc_field       using 'RC29P-POSNR'
                                  '0010'.
    perform bdc_field       using 'RC29P-IDNRK'
                                  '1300-320'.
    perform bdc_field       using 'RC29P-MENGE'
                                  '2'.
    perform bdc_field       using 'RC29P-MEINS'
                                  'PC'.
    perform bdc_dynpro      using 'SAPLCSDI' '0131'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RC29P-POTX1'.
    perform bdc_field       using 'RC29P-SANKA'
                                  'X'.
    perform bdc_dynpro      using 'SAPLCSDI' '0130'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RC29P-POSNR'.
    perform bdc_field       using 'RC29P-POSNR'
                                  '0020'.
    perform bdc_field       using 'RC29P-IDNRK'
                                  '1300-312'.
    perform bdc_field       using 'RC29P-MENGE'
                                  '2'.
    perform bdc_field       using 'RC29P-MEINS'
                                  'PC'.
    perform bdc_dynpro      using 'SAPLCSDI' '0131'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RC29P-POTX1'.
    perform bdc_field       using 'RC29P-SANKA'
                                  'X'.
    perform bdc_dynpro      using 'SAPLCSDI' '0140'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RC29P-POSNR(01)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_dynpro      using 'SAPLCSDI' '0140'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RC29P-POSNR(01)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=FCBU'.
    perform bdc_transaction using 'CS01'.
    *perform close_group.
    CALL TRANSACTION 'CS01' USING IT_BDC
                MODE 'A'
                UPDATE 'S'
                MESSAGES INTO IT_MSGCOLL.
    REFRESH IT_BDC.           
    ENDLOOP.
    FORM BDC_DYNPRO USING PROGRAM_DYNPRO.
      CLEAR IT_BDC.
      BDCDATA-PROGRAM = PROGRAM.
      BDCDATA-DYNPRO = DYNPRO.
      BDCDATA-DYNBEGIN = 'X'.
      APPEND IT_BDC.
    ENDFORM.
    FORM BDC_FIELD USING FNAM FVAL.
      CLEAR BDCDATA.
      BDCDATA-FNAM = FNAM.
      BDCDATA-FVAL = FVAL.
      APPEND BDCDATA.
    ENDFORM.
    Edited by: Yayati6260 on Sep 10, 2010 12:29 PM

Maybe you are looking for

  • I can't install Adobe Flash Pro CS 6 on my OSX Mac! Help!

    Every time I try to install Flash Pro CS6 on my mac, I get the following error: "The installation failed - installer failed to initialize.  This could be due to a missing file." I've rebooted the mac, logged as the administrator to install, and got t

  • Screen overlap when connected to projector

    when i connect my macbook to my NEC projector using mini DVI to DVI cable part of the image from the right hand side of the screen is displayed on the left hand side. How would i correct this display problem?

  • Has anyone seen this before?   -sh-2.05b#

    When I boot up my PB the screen goes blank and I get this message: -sh-2.05b# What's going on with my PB?

  • Unkown error (-50) ipod classic

    i have recently been having a lot of issues with my ipod. ever since i updated my itunes to the most recent.songs not syncing onto it and when they do they are named wrong and have the wrong album artwork. or even better some of them just dont play.

  • Very urgent!...regarding encryption/decryption

    I have an application developed in java (using JCE1.2.2) for encrypting a text file.Iam using Tripel DES algorithm for encryption.So,Using this application I get an encrypted file. Now I want to develop an application in C/C++ using which I can decry