‎2006 Nov 10 6:42 PM
There are two kind of bapi transaction model, I read somewhere on sdn.
One is with commit and one is without commit.
If given a BAPI, how do I know if it is with cmmit or without a commit ?
Is its a good SAP practice to use Commit inside BAPI ? If no then we are using one BAPI for some plausibility check, do we need to use BAPI_TRANSACTION_COMMIT after that to commit the work.
Thanks.
Regards,
Tushar.
‎2006 Nov 10 6:45 PM
yes u have to use BAPI_TRANSACTION_COMMIT after a standard bapi is called.
Thanks,
Vamsi.
‎2006 Nov 10 7:03 PM
Hi
U should read the BAPI documentation or some SAP notes, there isn't a rule only your experience. Generally you understand a BAPI needs a commit when the data aren't stored in database really.
Anyway if it's not dangerous to use the BAPI for commit after calling a BAPI doesn't need the commit.
Max
‎2006 Nov 10 7:06 PM
Hi, by design, BAPIs will not issue a commit work. The reason is that, BAPIs are sometimes called consecutivly right after one another in one logical unit of work, so the commit will happend after the last BAPI call to insure data consistancy. You should use the BAPI_TRANSACTION_COMMIT when working with BAPIs.
Regards,
Rich Heilman
‎2007 Feb 17 5:56 AM
Rich,
I ahve one query : Do i need to check message returned by BAPI_TRANSACTION_COMMIT that whether message type is E or other ?
For example :
Call BAPI_ADDRESSORG_SAVEREPLICA (which returns an error table)
If message type <> 'E' .
BAPI_TRANSACTION_COMMIT (which returns an error table)
if Message type <> 'E'.
Write/Generate Log.
endif.
Write/Generate Log.
endif.
What should bethe approach of calling BAPI.
Regards
Sonal.