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: 

Error Handling in BDC

Former Member
0 Kudos

Hi friends,

How can error handling in BDC IN FOREGROUND AND BACKGROUND PROCESSING in call transaction method?

plz reply for it.

Thanks in advance.

3 REPLIES 3

Former Member
0 Kudos

hi

good

useing BDCMSGCOLL structure you can collect the error for the CALL TRANSACTION method.

tha nks

mrutyun^

0 Kudos

Thanks for replaying

But my problem is not to check and collect error list but How can i handle this error.

Bcoz in one of my bdc program when i upload file then error generates in one data line entry then it is stop on that point it will not take next data from the file.so i manully go back and start it again.And sometimes until i am not entering right data back option also become hide.so u must be enter right data for perticular field.

So any method is there if any error generates or any wrong data comes from file then it will skip that data and take next data?

I hope give me reply.

thanks.

Former Member
0 Kudos

Hi,

In foreground:

CALL TRANSACTION 'xxx'

MODE 'E'

Whenever any error occurs, it will display the error screen, the user can change the value and proceed.

In background:

CALL TRANSACTION 'xxx'

MODE 'N'

MESSAGES INTO TABLE i_messagetab.

IF sy-subrc NE 0.

LOOP AT i_messagetab WHERE messtype = 'E'.

put the record which was passed to the bdc along with the message and append to an internal table.

ENDLOOP.

In the end of the program,

LOOP AT i_error.

WRITE 😕 record along with the message from the message table

ENDLOOP.

There is no direct way to correct the errors in CALL TRANSACTION method, when run in background.. only looking at the messages report.. you will understand that which records were incorrect.. and you will need to process those records again.

Thanks and Best Regards,

Vikas Bittera.