BDC session release

Hello All,
I have a question in BDC session method. I am using BDC insert for calling ME11, ME12 and ME15 (create, change and delete) transaction for creating purchase info records. I have a specific situation where I am looping thru an internal table and calling BDC_insert (Create, change or delete) for each record . Finally, after looping all records, submitting 'rsbdcsub' program to release the bdc sessions. Only the first record in the internal table is committed and all others are ignored. Why is this happening? Do I need to explicitly call BDC_release after every insert.
I cannot release the session until the entire records are successfully inserted. So please suggest some solution for achieving this
Thanks
Ricky

Hi All,
Here is the code.
    CALL FUNCTION 'BDC_OPEN_GROUP'
      EXPORTING
        client                    = sy-mandt
      DEST                      = FILLER8
        group                     = l_group
      HOLDDATE                  = FILLER8
        keep                      = 'X'
        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
itab is an internal table which contain the input data to be processed.
wa_tab is a work area.
Loop at itab into wa_tab.
    if wa_tab-flag = 'A'. "Create info record
PERFORM bdc_dynpro_start USING 'SAPMM06I' '0100'.
PERFORM bdc_insert_field.  "This is recording program to create info record 
    call function bdc_insert
      exporting
            tcode = ME11
     tables
          dynprotab = t_bdc_table.
  elseif wa_tab-flag = 'C'. "Change info record
PERFORM bdc_dynpro_start USING 'SAPMM06I' '0100'.
PERFORM bdc_insert_field.  "This is recording program to change info record 
      call function bdc_insert
      exporting
            tcode = ME12
     tables
          dynprotab = t_bdc_table.
  else.   "Delete info record
PERFORM bdc_dynpro_start USING 'SAPMM06I' '0100'.
PERFORM bdc_insert_field.  "This is recording program to delete info record 
           call function bdc_insert
      exporting
            tcode = ME15
     tables
          dynprotab = t_bdc_table.
Endloop.
FORM bdc_insert_field USING f_name f_value.
  IF f_value <> space.
    CLEAR t_bdc_table.
    t_bdc_table-fnam = f_name.
    t_bdc_table-fval = f_value.
    APPEND t_bdc_table.
  ENDIF.
ENDFORM.                    "bdc_insert_field
form bdc_dynpro_start  using  p_g_program_1
                              p_g_screen.
  CLEAR t_bdc_table.
  t_bdc_table-program  = p_g_program_1.
  t_bdc_table-dynpro   = p_g_screen.
  t_bdc_table-dynbegin = 'X'.
  APPEND t_bdc_table.
endform.                    " bdc_dynpro_start
Call function bdc_close_group.
    SUBMIT rsbdcsub WITH mappe EQ l_group
                     WITH von EQ sy-datum
                     WITH bis EQ sy-datum
                     WITH fehler EQ '.'
                     EXPORTING LIST TO MEMORY
                     AND RETURN.
I want to call this submit only once in the program and if all records are successfully processed. Otherwise,  I need to delete the session to give it a roll back.
Hope it is clear now. Any other approach is also welcomed. Thanks!
Thanks
Ricky

Similar Messages

  • Incorrect state of bdc-sessions after system-termination

    Hello,
    following situation:
    I've run 8 bdc-sessions and system breaks down becaus of to less table space.
    After correction of table space and activating update (sm13)
    the job's go on.
    But 2 bdc-sessions have a false state - they show processing but sm50 and log shows that they do nothing. The creation of customers is not complete (only 50 %). How can I correct the state of the bdc-sessions and process the jobs further???
    1 BDC is finished but the state is false too (processing) How can i correct the state of tht session ?=
    thanks and regaards
    Andreas

    Good morning Rob,
    I've tried to release it but I get the following "false" message:
    Could not release folder "MIARMD_1029"  since it still contains a background job
    Message no. 00299
    -> there's no background job any longer!
    any ideas except creating new bdc-sessions???
    thx and greetings
    Andreas Mann

  • BDC session timings

    hi,
    please can anyone tell me how to time a bdc session for a particular time or date when the bdc session will be processed automatically?

    Hi
    <b>steps</b>
    go to sm36
    give the job details and program name all
    click on start condition , you will find all the options like
    <b>Batch job start time</b>
    You can have a job started:
    immediately
    at the time and date that you specify
    after another job has been completed.
    Note that jobs, including immediate-start jobs, must be released before they can be started.
    A job is normally released by an administrator. If you have the required authorization, it is released automatically when you schedule it.
    <b>Planned Start Date for Background Job</b>
    <u>Procedure</u>During scheduling: Specify the start date or the latest start date you require for your background job. If the job has been released, it will be processed on the date specified.
    In the job overview: To restrict the scope of the overview, specify the earliest or latest start date for the overview.
    <b>Name of previous job</b>
    <u>Procedure</u>
    Enter the name of the job that must be finished before background control processes your job.
    <b>Background Processing Event</b>
    Name of the event to which a job is linked.
    An event is a signal stating that a predefined status in the system has been reached. The background processing system receives events and then starts the background job/jobs that is/are linked to an event.
    <u>Procedure</u>In the job overview: Enter the event name to list the jobs that are linked to the event.
    When scheduling a job: Enter the event name on which the start of this job should depend.
    You can specify predefined events of the SAP applications or SAP System kernel or events you defined yourself. Which SAP events you can use is explained in the documentation of the SAP applications.
    <b>
    Scheduling Jobs Periodically</b>
    In order to schedule a job each time an event occurs, select Execute job periodically when scheduling.
    <b>Operation Mode</b>
    <u>Procedure</u>
    You can enter any name for the operation mode, but ensure that it is meaningful and that it makes the task of the operation mode clear.
    Examples
    <u>Normal operation</u>
    <u>Night operation</u>
    <b>Reward if usefull</b>

  • URGENT - HOW TO PROCESS A BDC SESSION (IN BACKGROUND) FROM INSIDE A REPORT

    Hi All,
    I have a requirement wherein I need to create a BDC session for mass update(from file) of one transaction and check if at all that update has taken place and proceed with the same session for another transaction.
    For this I need to know how to process the session in background in a report, so that if the processing is done, the next set of data to update a different transaction can happen.
    All inputs are welcome and highly valuable to me.
    If someone is unable to intrepret this, I'll detail it again.
    Thanks in advance,
    Vaishnavi Varadarajan

    Hi,
    1.Use RSBDCDRU is an exe pg.With this u can download the logs into local file.
    2.It will create the spool request .from there u can download or print.
    OtherWise:
    Use the code from the link below. U need to provide the session queue id as input and it will download the log to an excel file. U can change it to  ur reqmt.
    Re: BDC
    regards
    kiran

  • 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

  • BDC session error handling for IW41 transaction

    Hi,
    When the order confirmation is done by BDC session program, it is executed without any error. But if we do the same process manually, it is showing the error message as 'Posting period is Locked for 001 2012'. My question here is why this is not happening when it is executed through bdc session program.
    Anyone can help us?
    Thanks,
    Guna

    It is difficult to believe that you would get good results from background BDC process and error in foreground using same transaction and exactly the same data.  Beyond that, why is month 1 of the current year locked?    Are you absolutely sure that:
    BDC works correctly? maybe does NOT and the errors have been missed or ignored?
    Data is precisely the same for both BDC sessions?
    Same transaction is called?
    Sounds silly perhaps, but I have to believe that something is very different between the two sessions.

  • Is possible to skip first screen in BDC Session

    Hi all,
    Is it possible like  in call transaction method to skip first screen in Batch input session?
    Syntax----
    call transaction MM01 and skip first screen.
    I want same result By using Batch input session.
    Suggess..........
    Thanks
    Sanket sethi

    Actually i am open transaction SE38 and execute an Standard Report.In the selectiion screen I am changing something in layout.
    I recorded it by BDC.
    And use batch input session.
    Now i want to skip the se38 window i want to drop user on the execution of the report.
    I also do it by submit report but i want to know that is there any possibilities to use with BDC session.
    Thanks
    Sanket

  • 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

  • Storing of log file in A/P Server while running BDC session in SM35

    Hi All,
    I have issue when running BDC session in SM35.
    The actual issue is
    I need to store of log file generated while running BDC session in <b>SM35</b> in <b>Application/Presentation</b> Server path.
    When ever we run single session the Log file regarding that session we need to store in Application/Presentation Server.
    Can anybody have solution for this issue.
    Thanks in advance.
    Thanks & Regards,
    Rayeez.

    Hi
    See the std report RSBDC_ANALYSE, here you can know how to find out the log of B.I..
    You can create a program like that to load the log into file instead of showing it.
    Max

  • 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

  • Program To Update BDC Session Status in SM35

    Existing Process : Currently we create orders using a function module which internally uses BDC Session method for transaction VA01. If the session ran successfully then we check the status and use SAVE_TEXT to upload the long text for the order. But in some cases the order fails. Then the session will be errored out in SM35 and user runs the session manually and fixes the problem and post order. So the text cannot be uploaded now as the user ran the session manually. So I wrote a Z program to run the session using program RSBDCCTU which the runs the session in forground and get the text from memory which I exported to memory while initial transaction and upload it using SAVE_TEXT after the session ran successfully. This program works fine.
    Problem : After running my Z program the order is posted and text is uploaded but the session is still in error status in SM35. The standard program RSBDCCTU just runs the session in foreground but does not update the status.
    Is there any other way we can do this or any other standard programs available to update the status of the session.
    Any help will be appreciated.

    How are you importing text in the z program, which is exported in the function module? they are totally unrelated internal sessions.
    You can as well import text and use SAVE_TEXT using user exit USEREXIT_SAVE_DOCUMENT_PREPARE in include MV45AFZZ after executing the error session in SM35, you don't need a Z program.
    Use condition SY-BINPT = 'X' and  T180-TRTYP = 'H' in the user exit to process SAVE_TEXT.
    Regards
    Sridhar

  • VA01 BDC Session - Purchase requisition wiew not shown

    Hello Forum,
    I've a problem with a BDC session in ECC 6.0 about VA01. When I try to change the purchasing requisition data from the shcedule tab using the button identified from the BDC with the code "EIBB"  (the last one) the subsequent screen is not shown from the system. If I try to create manually a new sales order I'm able to view the screen.
    I tried to remake the recording in 4.6C and the screen is shown correctly.
    I'm in a mock conversion and in UAT but I wasn't able to find the problem.
    Can you suggest something << Moderator message - Everyone's problem is important >>?
    Many Thanks.
    Regards.
    Edited by: Rob Burbank on Oct 19, 2010 3:20 PM

    Thanks Anyway, but with an additional search I've found the solution Here.
    Batch input VA01 problem

  • ZXPADU02 - How To Stop It From Being Triggered in  a BDC Session

    I have an edit in ZXPADU02 that says if you are trying to change IT0167 you will get a POPUP Message telling you we don't want you doing that.   My problem is that I am using PA30 in a BDC session in another program to update IT167 and it is causing the User Exit to trigger the message, which gets an error because it can't display the POPUP.  Is there some way I can have this message NOT be triggered when I use PA30 in a BDC?

    Hi,
    You can one thing. When you are calling PA30 through BDC then you can populate some custom table with some value and in the exit check whether the custom table contains that value. If it contains then you can skip it. Other wise you can put keep some field vale in memory and then read the value from memory in the user exit.  Based on that you can modify your code.
    Thanks & Regards,
    Sandip

Maybe you are looking for