‎2005 Sep 12 9:09 AM
Sorry for not noticing that it is an ABAP Programming forum.
Hi,
How can I use Bapi_Transaction_Commit in conjunction with a standard BAPI_A( for e.g) in webdynpros?
wdContext.currentBAPI_AElement.modelobject.execute();
The above source code would immediately execute the Bapi without knowing about the Bapi_Transaction_Commit.
Or am I missing something crucial?
Regards
MK
‎2005 Sep 12 10:34 AM
This is very much relevant for ABAP. I guess you want to know why you want to call BAPI_TRANSACTION_COMMIT after calling a standard BAPI.
Here is the function module documentation explaining that.
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.
Use the method BapiService.TransactionRollback to prevent changes to the
database being committed.
Regards
Raja
‎2005 Sep 12 10:52 AM
hi, MK
Some BAPI will change some data in SAP table, but the change won't be effective, untill you call BAPI_TRANSACTION_COMMIT. And if you call BAPI_TRANSACTION_ROLLBACK, the change will be ineffective.
As you call BAPI in the web dynpro, it belong to a remote call. After call the BAPI you want, and get no error info, then call BAPI_TRANSACTION_COMMIT to submit the data update you want to do on SAP sever.