Advertising:

COMMIT-WORK required or causing FMs (BAPIs) and classes in RAP

From SAP Knowledge Base

Anyone who uses the ABAP RESTful Application Programming Model (RAP) to develop apps encounters the problem of using function modules or classic classes that require a COMMIT WORK, already call a COMMIT WORK themselves or use other non-permitted keywords such as IN UPDATE TASK.

With regard to the COMMIT WORK, the RAP framework only allows this in the SAVE sequence, but not in between, where the FuBas or classes with the above-mentioned keywords may be used.

The workaround for these function modules or classes is therefore to run them in a new/own LUW. This means that this code is executed asynchronously alongside the app.

One possibility is to call it with RFC destination 'NONE'.


This is a wiki created in the spare time of a private person working in the SAP ERP area. The aim is to collect knowledge for the own use. The wiki is maintained to the best of knowledge and belief.
All products shown, including in form of screenshots, belong to SAP SE. Their trademarks are, among others: SAP®,ABAP®,SAP Fiori®,SAP HANA®,SAP NetWeaver®,SAP® R/3®,SAP S/4HANA®,SAP S/4HANA® Cloud