cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

 

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:

Statement "ROLLBACK WORK" is not allowed with this status.

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!
11111111111111111.png222222222222222222.png333333333333333333.png

errorInformation code line:
44444444444444.png

0 Likes
View Entire Topic
junwu
SAP Champion
SAP Champion
0 Likes

how about just removing those commit/rollback call?