‎2009 Mar 02 5:00 AM
Hi,
I am using two BAPIs 'BAPI_ACC_ACTIVITY_ALLOC_POST' and 'BAPI_NETWORK_CONF_ADD' in my custom function module. These two BAPIs are used as explained below:
1) Fisrt the BAPI 'BAPI_ACC_ACTIVITY_ALLOC_POST' is called. If sy-subrc NE '0', the error messages are read.
2) Then the BAPI 'BAPI_NETWORK_CONF_ADD' is called. If sy-subrc NE '0', its error messages are read.
3) If there is no error for the two BAPIs called above, then the actual posting is done by calling the BAPI
'BAPI_ACC_ACTIVITY_ALLOC_POST'. If sy-subrc EQ 0, Commit work.
I would like to know if the Commit work in third step will commit the changes of the steps 1 and 2 as the the statement COMMIT WORK completes the current SAP LUW.
Or will it commit the step 3 only.
Thanks & Regards,
Soumya.
‎2009 Mar 02 5:01 AM
‎2009 Mar 02 5:01 AM
‎2009 Mar 02 5:08 AM
Hi Soumya,
It will commit only for the 3ed step.
if subrc= 0 then you need to commit remainiing BAPI's aswell.
Regards!
‎2009 Mar 02 5:11 AM
Hi Soumya,
COMMIT WORK will commit the SAP LUW.
if sy-subrc eq 0 in the third step then all the 3 steps will be commited.
Regrds,
Phani.
‎2009 Mar 02 5:12 AM
hi,
yes it will commit step 1 and 2
Commit is used to write the changes from buffer to the database
thanks
‎2009 Mar 02 5:15 AM
Hi,
I need to commit the step 3 only. Will a roll back work before calling the BAPI in step 3 will help?
Regards,
Soumya.
‎2009 Mar 02 5:19 AM
Hi soumya,
you can rollback for the step 1& 2 if sy-subrc ne 0.
and then use the comit work if sy-subrc eq 0 for step 3.
Hope this will help you.
regards,
Phani.
‎2009 Mar 02 5:16 AM