Hello,
I am working on an SAP RAP-based development and encountering an ABAP Runtime Error 'BEHAVIOR_ILLEGAL_STATEMENT' when executing a button action.
The button requires a parameter input, and when I enter a value and click the button, the error occurs.
Inside my class, I am calling another class where I use BAPI_TRANSACTION_COMMIT and BAPI_TRANSACTION_ROLLBACK. However, I receive the following error message:
Error Message:
It seems that calling COMMIT WORK or ROLLBACK WORK directly is restricted within the transactional context of RAP.
How can I handle transactional BAPI calls properly within RAP without triggering this error?
Thanks in advance!
errorInformation code line:
Request clarification before answering.
Hello,
Try calling the BAPI and commit work in a separate LUW. Call the BAPI logic in a FM in Update task/separate task if you cannot avoid the commit work. It might work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am encountering the error 'Statement "COMMIT WORK" is not allowed with this status' when calling a method inside a class within an action in an SAP RAP-based development. The method contains a BAPI call, and the error occurs when executing the statement cl_exchange_rates=>put. How can I resolve this issue, considering that COMMIT WORK is being triggered within the BAPI call?
| User | Count |
|---|---|
| 5 | |
| 5 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.