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

BAPI/ BDC in program

Former Member
0 Likes
381

Hi All,

I am using a 2 BAPI's and 3 BDC's in a program. I need all these BAPI and BDC's update the tanscations in a single bundled task? that is if any of BAPI or BDC failed the sucessful BAPI/BDC should be rolled back. How can I make it happen? Any sample code will be helpful

All Suggestion will be rewarded.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
362

Hi,

This requirement can make the program a complex one. But you can give a try.

Use BDC session method. At end, check whether all the BAPI's and BDC's are successfull or not, if successful write some code to process all the sessions else don't process all the sessions.

Hope this helps.

Thanks,

Srinivasa

2 REPLIES 2
Read only

Former Member
0 Likes
363

Hi,

This requirement can make the program a complex one. But you can give a try.

Use BDC session method. At end, check whether all the BAPI's and BDC's are successfull or not, if successful write some code to process all the sessions else don't process all the sessions.

Hope this helps.

Thanks,

Srinivasa

Read only

Former Member
0 Likes
362

You can take advantage of BAPI return & Call transaction's message tables. Please commit the work if all of them are successful , if not roll back. But check if your BAPIs have implicit commit or explicit commit. This solution can not work if BAPI commit is implicit.

Regards

Veera