‎2008 Jul 24 9:28 AM
Hi Friends,
Can anyone give a very simple and clear difference betwee Commit work in BAPIS and BAPI_Transaction_Commit, I have referred to many online info regarding the two but i m not clear about their functional difference? Please help me with very simple answers?
Regards,
MD.
‎2008 Jul 24 9:36 AM
Hello MD
Have you ever tried to see the code written in FM BAPI_TRANSCATION_COMMIT .
There we have just Commit work .
what happens is sometimes IN BAPIs there is no internal commit used those we can test it through SE37 for that we go for Extenal commit .
Otherwise there is no difference between Commit work in BAPIS and BAPI_Transaction_Commit
regards
Hitesh
‎2008 Jul 24 9:42 AM
Hi Friend,
I would say the difference is the way you call them. Otherwise both are same.
SAP though recommends using BAPI_Transaction_Commit and not using Commit_work in the BAPI...
Hope this helps you.
Regards,
Chandra Sekhar
‎2008 Jul 24 9:43 AM
hi check this...
the commit work is used when there is a need of modification for the master records such as modfying ,updating the master data ......for that weed commit work..generally we use this in the programs ....with out this there is no updataion of the change in master records....some of the fms or bapi had inside this commit work by the fm bapi_transaction_commit .
this fm is used when processing with mostly the fms
‎2008 Jul 24 9:44 AM
MD,
hope this would help to understand better:
Execute external Commit when using BAPIs
Functionality
This method executes a COMMIT WORK command. It is required for transactions developed outside the SAP system that change data in the SAP system by using BAPI calls.
When you call BAPIs in your program that change data in the SAP system, you must then call this method to write the changes to the database.
Notes
Messages are returned in the parameter 'Return'. The documentation for this parameter contains the return values and their meanings.
Further information
Use the method BapiService.TransactionRollback to prevent changes to the database being committed.Amit.
‎2008 Jul 24 9:50 AM
Hi ,
When you use a BAPI, you can not
directly use commit work, instead you are allowed to use only
BAPI_TRANSACTION_COMMIT
Short text
Execute external Commit when using BAPIs
Functionality
This method executes a COMMIT WORK command. It is required for
transactions developed externally to the R/3 System that change data in
the R/3 System via BAPI calls.
When you call BAPIs in your program that change data in the R/3 System,
afterwards you must call this method to write the changes to the
database.
Notes
Messages are returned in the parameter 'return'. This parameter
documentation contains the return codes and their descriptions.
Further Information
Use the method BapiService.TransactionRollback to prevent changes to the
database being committed.
Regards.
Eshwar.
‎2008 Jul 24 9:55 AM
Hi MD,
BAPIs must not invoke a COMMIT WORK. instead use the BAPI TransactionCommit to execute the commit after the BAPI has executed
cheers,
sowjanya.