Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

bdc not working in background

manubhutani
Active Contributor
0 Kudos

Hi.

I am updating the table T508a using call transaction method(BDC).When i take the mode as "A" ie display all..its working but when i use it as "N" ie no diaplay.. its not working......

Also when using "A" mode after saving the data,i have to press the back button,which is not in the recording...so pleaae help me what should i do nw..

waitin very eagerly ..

4 REPLIES 4

Former Member
0 Kudos

Hi,

Go through this info. Plz check ur given the correct parameters are not.

RSBDCSUB - You can start the processing of the sessions using this.

RSBDCBTC - This has something to do with the Queues of the batch input sessions, you cannot start any session using this.

RSBDCSUB is used for executing BDC sessions, e.g. you create BDC sessions in a user exit and want to execute them once every day. You can schedule RSBDCSUB to execute you BDC sessions at a particular time.

Difference b/w RSBDCSUB and RSBDCBTC :

When the program is processed and waiting for the session to be released, if we use RSBDCSUB then the Whole sessions ceated for the program are released at a single go, Whereas if we use RSBDCBTC, each session is givena Unique Session ID and it can be released automatically regardless of the program name.

RSBDCSUB

Processing Sessions Automatically

Use

In most cases, batch input sessions can be processed automatically. It is not necessary for a session to wait until a system administrator explicitly starts the processing of the session.

This section explains how to have sessions started automatically soon after the session has been generated in an R/3 System.

Prerequisites

The ABAP program RSBDCSUB must be scheduled as a periodic job in the R/3 background processing system. RSBDCSUB checks for and starts any batch input sessions that have not yet been run. It schedules such sessions for immediate execution in the background processing system.

Procedure

Schedule RSBDCSUB to run periodically in one or more background jobs.

If you have regularly scheduled batch input runs, you can schedule separate jobs for each of the scheduled data transfers. The start time for the RSBDCSUB job can be set according to the batch input schedule. And you can use a variant to restrict RSBDCSUB only to the batch input sessions that you expect.

With RSBDCSUB, you can use all of the selection criteria offered on the batch input main menu to select sessions to run:

session name

date and time of generation

status: ready to run or held in the queue because of errors

Result

Batch input sessions are started automatically rather than by hand. The RSBDCSUB program can be set up to start all sessions that arrive in an R/3 System, or it can be fine-tuned to start only batch input sessions that you expect.

for RSBDCBTC check the link!!

http://sapabap.iespana.es/sap/oss/0015999.htm

Regards,

Omkar.

Former Member
0 Kudos

Please go through the code by comparing your last line's of that code for call transcation ...... for 'N' MODE .with update 'S' .


PERFORM dynpro USING  BDC_OKCODE'      '=BACK'.
* Call transaction to update customer instalment text
  CALL TRANSACTION 'ME22' USING bdc_tab MODE 'N' UPDATE 'S'
         MESSAGES INTO messtab.
* Check if update was succesful
  IF sy-subrc EQ 0.
    ADD 1 TO gd_update.
    APPEND wa_ekko TO it_success.
  ELSE.
*   Retrieve error messages displayed during BDC update
    LOOP AT messtab WHERE msgtyp = 'E'.
*     Builds actual message based on info returned from Call transaction
      CALL FUNCTION 'MESSAGE_TEXT_BUILD'
           EXPORTING
                msgid               = messtab-msgid
                msgnr               = messtab-msgnr
                msgv1               = messtab-msgv1
                msgv2               = messtab-msgv2
                msgv3               = messtab-msgv3
                msgv4               = messtab-msgv4
           IMPORTING
                message_text_output = w_textout.
    ENDLOOP.

*   Build error table ready for output
    wa_error = wa_ekko.
    wa_error-err_msg = w_textout.
    APPEND wa_error TO it_error.
    CLEAR: wa_error.
  ENDIF.

* Clear bdc date table
  CLEAR: bdc_tab.
  REFRESH: bdc_tab.

GIRISH

Former Member
0 Kudos

hi

good

check out the length of the text file that you r trying to upload using the background method or check with the ok codes that you r passing in between each screen shots,i hope there must be some problem in these two,.

Thanks

mrutyun^

former_member182346
Active Contributor
0 Kudos

hi

faced similar problem erlier.

Just remove all the break points and try to run it into mdode 'N'.

I hope it ll work, if ther is no abv mentioned problem.

thanks & regards

vinsee