Application Development and Automation 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: 
Read only

Return error ocurring during bdc

Former Member
0 Likes
630

Hello all,

I am a abaper and i got a project to in which there is a requirement that we have to do the bdc by remote function call.

I am able to do bdc through it but my main concern is the error which come while doing bdc.

I mean we can see the screen which in which there is error. I want to capture that error and that error should be return to the function.

Suppose we are doing bdc which the help of .net application. We want to retrun the error which is occuring during the bdc and return the error to the .net application. so can you tell me how can we return the error.

Thanks...

1 ACCEPTED SOLUTION
Read only

naveen_inuganti2
Active Contributor
0 Likes
568

Hi,

Implement RFC or any interface to communicate with non-SAP system. And have one table parameter with two fields..one with flag and other field is for message text. Then your table parameter output will be like following:

E: Process not occurred

S: Table updated updated successfully

etc.,

and,

As we know,

bdcmsgcoll type bdcmsgcoll occurs 0 with header line,
.....
......    
call transaction 'TCODE' using bdcdata mode 'N' update 'S' messages into bdcmsgcoll.

this syntax will helps you capture the messages with BDC processing. And then pass this message ID and types etc to 'FORMAT_MESSAGE' or some other function module whcih can gives you message text. And finally populate ABOVE internal table with those details.

Thanks,

Naveen Inuganti.

4 REPLIES 4
Read only

naveen_inuganti2
Active Contributor
0 Likes
569

Hi,

Implement RFC or any interface to communicate with non-SAP system. And have one table parameter with two fields..one with flag and other field is for message text. Then your table parameter output will be like following:

E: Process not occurred

S: Table updated updated successfully

etc.,

and,

As we know,

bdcmsgcoll type bdcmsgcoll occurs 0 with header line,
.....
......    
call transaction 'TCODE' using bdcdata mode 'N' update 'S' messages into bdcmsgcoll.

this syntax will helps you capture the messages with BDC processing. And then pass this message ID and types etc to 'FORMAT_MESSAGE' or some other function module whcih can gives you message text. And finally populate ABOVE internal table with those details.

Thanks,

Naveen Inuganti.

Read only

Former Member
0 Likes
568

Using 'messages into' option you can get the returned error messages. These messages can be returned

by the RFC also.

Thanks,

Aravind

Read only

RaymondGiuseppi
Active Contributor
0 Likes
568

Are you trying to reinvent FM ABAP4_CALL_TRANSACTION (RFC enabled) ?

Regards,

Raymond

Read only

Former Member
0 Likes
568

Hello,

You can populate the BDC error messages in 'bdcmsgcoll' table. Next call 'ECOP_MESSAGE_READ' FM, pass the message id and message number obtained from 'bdcmsgcoll' table to get the proper message text.

Now you can handle messages in your application.

Regards,

Saba