‎2006 Jun 28 6:05 AM
Is it nesseccary calling the BAPI_TRANSACTION_COMMIT Function module after every BAPI FM?Please explain?
Regards,
Anu.
‎2006 Jun 28 6:07 AM
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
‎2006 Jun 28 6:09 AM
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.
‎2006 Jun 28 6:11 AM
Hi Anu,
Yes for reflecting chages done by BAPI.You need to call the FM BAPI_TRANSACTION_COMMIT .
‎2006 Jun 28 6:13 AM
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
‎2006 Jun 28 6:18 AM
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
‎2006 Jun 28 6:27 AM
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.
‎2006 Jun 28 6:30 AM
Yes all the tables related to the purchase order will be updated with the new record when you call the BAPI
‎2006 Jun 28 6:59 AM
yeah u can , but not in se37 ? it will not waste Number series in the Simulation Mode .
Regards
Prabhu