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

Hi

Former Member
0 Likes
824

Is it nesseccary calling the BAPI_TRANSACTION_COMMIT Function module after every BAPI FM?Please explain?

Regards,

Anu.

8 REPLIES 8
Read only

Former Member
0 Likes
791

Yes you have to....Better use that instead of commit.

See the reason. http://www.sap-img.com/fu018.htm

rgds,

TM

Please mark points if helpful.

Message was edited by: Thomas Mann

Read only

Former Member
0 Likes
791

HI anu,

1. Is it nesseccary calling the BAPI_TRANSACTION_COMMIT Function module after every BAPI FM?

Yes, its compulsory.

2. BCOS

3. If we don't call,

then our changes won't be reflected.

(ie., our changes won't be commited / written to database)

4. This is like this bcos there is LUW (logical unit of work)

concept in R/3.

regards,

amit m.

Read only

Former Member
0 Likes
791

Hi Anu,

Yes for reflecting chages done by BAPI.You need to call the FM BAPI_TRANSACTION_COMMIT .

Read only

Former Member
0 Likes
791

Hi ,

BAPI will not commit any DB changes , so u have to do external LUW to commit DB changes .

that is the Adv of using BAPI ,Bcos it will useful or create Simulation of the Transaction.

Regards

Prabhu

Read only

Former Member
0 Likes
791

Hi,

Individual BAPI's should not commit work to the database. This is part of the definition for BAPIs.

This allows the calling program to control the Logical Unit of Work (LUW) by calling BAPI_TRANSACTION_COMMIT. You can commit after each BAPI call, or after a sequence of them.

For example, your application may involve several BAPIs being called over several dialog steps. If the user aborts before the last step, you should be able to roll back without having to reverse any individual transactions.

Only if they confirm the last step would you call BAPI_TRANSACTION_COMMIT.

With BAPI_TRANSACTION_COMMIT ..the external systems have a way of deciding on whether to

Commit or to Roll back Changes.

so i guess the diff lies more in the way how u want to call commit ,either from outside or from within ure BAPI.

SAP though recommends using BAPI_Transaction_Commit and not using Commit_work in the BAPI...

The following is a good summary: http://help.sap.com/saphelp_46c/helpdata/en/a5/3ec8654ac011d1894e0000e829fbbd/frameset.htm

Rgds,

Prakash

Read only

Former Member
0 Likes
791

Thank U for the Response.But I had one clarification. if I run BAPI FM from SE37 Transaction it will reuturn the messgage right?Suppose I will execute the BAPI FM some Purchase Order creation.In this case can we see the Purchase in database table?

Regards,

Anu.

Read only

0 Likes
791

Yes all the tables related to the purchase order will be updated with the new record when you call the BAPI

Read only

0 Likes
791

yeah u can , but not in se37 ? it will not waste Number series in the Simulation Mode .

Regards

Prabhu