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

regarding BAPI

Former Member
0 Likes
527

hi

Can we write commit work inside BAPI function module.if not why.

I know that we have to call BAPI_TRANSACTION_COMMIT after calling BAPI.

my doubt is why it is not recommended to write commit work in BAPI FM.

regards

prasanna kumar

3 REPLIES 3
Read only

Former Member
0 Likes
509

BAPI doesnt have COMMIT inside we need to call the COMMIT Transaction after calling the BAPI function. Sometimes SAP will do auto commit after a session is over. we cant say when that commit is executed. So it better to call BAPI_TRANSACTION_COMMIT after every BAPI call.

Read only

Former Member
0 Likes
509

hi Jaya,

Acc. to me.. BAPI with commit work is not the standarad practice as it is used by standarrd programs and is the standard way of updating tables. and also in some cases rollback might be required.

In case you need commit work, you can go for ZBAPi with your bapi and commit bapi in it.

In case you want to test both in a single go, you can test it through SE37, check my post in wiki for same,

https://www.sdn.sap.com/irj/sdn/wiki?path=%2fdisplay%2fabap%2ffunction%2bmodule%2btest%2bsequence

Sachin

Read only

Former Member
0 Likes
509

after the execution of bapi u want to display the data .

in my bapi there is a savion interaction betn bapi.

bapi to savion data transfer so u write coomit bapi after end of ur progarm.