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 followed by BDC

Former Member
0 Likes
652

Hi all,

I have a requirement wherein i am calling a BAPI follwed by a BDC to achieve a upload of databse.Now my problem is that the BAPI call will be successful only if i call BAPI_TRANSACTION_COMMIT.

But it may so happen that my bdc fails.In that case i dont want my BAPI to make the changes.How can i have a check on these as whenever my BDC fails the BAPI should be rollbacked.

Itz an urgent issue.Plz reply soon..

Useful answers will be rewarded..

Thanks & Regards,

Arun

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
623

Hi all,

I have a requirement wherein i am calling a BAPI follwed by a BDC to achieve a upload of databse.Now my problem is that the BAPI call will be successful only if i call BAPI_TRANSACTION_COMMIT.

But it may so happen that my bdc fails.In that case i dont want my BAPI to make the changes.How can i have a check on these as whenever my BDC fails the BAPI should be rollbacked.

Itz an urgent issue.Plz reply soon..

Useful answers will be rewarded..

Thanks & Regards,

Arun

4 REPLIES 4
Read only

Former Member
0 Likes
624
Read only

pradeep_nellore
Participant
0 Likes
623

Hi,

If u r using a CALL TRANSACTION u can check SY-SUBRC of CALL TRANSCATION, and then proceed as u like.

Thanks

Pradeep

Read only

Former Member
0 Likes
623

Hello Arun

after BDC if you using call transaction you can check sy-subrc.

if it is 0 then use BAPI_TRANSACTION_COMMIT else use FM BAPI_TRANSACTION_ROLLBACK to revert changes.

reward points if helpful

Read only

Former Member
0 Likes
623

THANKS