‎2007 Sep 05 6:14 AM
Hi Folks,
Can anyone please let me know the functionality of the below given functional module with an simple example.
BAPI_TRANSACTION_COMMIT.
Thanks,
K.Kiran.
‎2007 Sep 05 6:16 AM
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.
check this sample of code,this FM is used if the BAPI return table does not have any error(messages with type E)
call function 'BAPI_FIXEDASSET_CHANGE'
exporting
companycode = is_final-bukrs
asset = is_final-anln1
subnumber = is_final-anln2
realestate = is_realestate
realestatex = is_realestatex
importing
return = it_return.
* If Asset Master is changed with out any errors
read table it_return with key type = 'E'.
if sy-subrc = 0.
flag = ' '.
else.
flag = 'X'.
* Call the COMMIT BAPI
call function 'BAPI_TRANSACTION_COMMIT'
exporting
wait = 'X'.
wait up to 2 seconds.
endif.Regards
Gopi
‎2007 Sep 05 6:19 AM
Hi
BAPI_TRANSACTION_COMMIT :-Execute external Commit when using BAPIs
<b>
Functionality</b>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.
Messages are returned in the parameter 'Return'. The documentation for this parameter contains the return values and their meanings.
Use the method BapiService.TransactionRollback to prevent changes to the database being committed.
Parameters
WAIT
RETURN
Exceptions
Function Group
BAPT
reward if usefull
‎2007 Sep 05 6:40 AM