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: 

Capturing Errors in BDC

Former Member
0 Kudos

Hi,

I'm getting error while running a BDC with Call Transaction method.

CALL TRANSACTION 'QP02' USING BDCDATA MODE 'N' UPDATE 'S' MESSAGES INTO IST_BDC_DATA.

from the internal table IST_BDC_DATA i'm displaying the error using through FM Format Messages.

what is happening is say for example i have 100 records in that 10th, 20th and 30th records have errors. when i run the transaction and when the loop reaches 10th record it throws an error and comes out of the loop. i'm not able to find that there are 2 more records with errors.

how can i find out that there are 3 records which as errors and at the same time i want to post all the remaining 97 records...

waiting for ur replies

Regards

Priya

3 REPLIES 3

Former Member
0 Kudos

Try the following bdc call options

l_t_ctu_params = 'NS'

CALL TRANSACTION 'QP02'

USING BDCDATA

OPTIONS FROM l_t_ctu_params

MESSAGES INTO g_t_message.

0 Kudos

earlier i tried this option also but same result.

Former Member
0 Kudos

Hi Senthil,

according to the issue you are facing...even though you have 100 records in the file - you are able to process records till you get an error. Is that correct? In the example you mentioned - the processing comes out at the 10th record (error) and rest of the 90 records are not processed.

Did you try asynchronous update option?

This should be your logic...

LOOP AT main_data_table.

REFRESH bdcdata

populated bdcdata with data for one transaction

call transaction

check subrc value - if non zero then format messages in messages table

and store them in a table - refresh messages table for next transaction

ENDLOOP.

once you process all the data you can print out all the collected error messages...

hope this helps..

Cheers