Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9760

Re: BAPI_TRANSACTION_COMMIT with WAIT = 'X' inside a BADi

$
0
0

Ok, that explains. But no, the rules are being violated, I believe (which Notes are those?). The way I would try to work around the limitation:

 

1) if the DB changes done by BAPI need to be committed regardless of what the SAP standard logic calling the BADI does afterwards, try to call the BAPI from within new SAP LUW (a nested LUW);

 

or

 

2) if the BAPI changes need to be committed in SAP standard LUW, remove BAPI_TRANSACTION_COMMIT, switch on synchronous updating using SET UPDATE TASK LOCAL, and register CL_SYSTEM_TRANSACTION_STATE=>TRANSACTION_FINISHED handler method where BUFFER_REFRESH_ALL FM would called.

 

The way to build a nested LUW is awkward to say the least - one needs to call a program using CALL TRANSACTION or SUBMIT.. AND RETURN. So, if the BAPI call needs anything that is not passable using report PARAMETERS or SELECT-OPTIONS (like internal tables?), one needs to think of a way to pass the necessary data (normally shared memory objects or export to shared memory, where the former is the more complicated but preferred way).

 

cheers

Jānis


Viewing all articles
Browse latest Browse all 9760

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>