cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAVE Sequence BAPI Commit Issue, ABAP RESTful Programming On-Premise

Former Member
14,212

Hi Experts,

I am trying to implement unmanaged scenario for a create operation. I am using 'BAPI_EPM_SO_CREATE' to create a sales order with create method.

This BAPI has a parameter 'persist_to_db' which is by default true. When I am calling the BAPI , getting dump because the BAPI contains 'COMMIT WORK'. As we know we cannot use commit work during transnational phase.

So then passed 'abap_false' to persist_to_db and placed commit work in save method (part of save sequence). But still I am getting dump for using commit.

Due to this reason I am unable to persist the data even after successful execution of the BAPI. How do I commit the data in save seqeunce. Kindly help.

Regards,

ABAPer.

View Entire Topic
former_member683250
Discoverer
0 Likes

I have also encountered the same issue. BAPI internally calls a commit work and we have second commit by the framework.

I have updated comments here -

https://blogs.sap.com/2019/05/23/sap-cloud-platform-abap-restful-programming-model-rap-for-beginners...

Here is Runtime Error that we get -

What happened?

Error in the ABAP application program.

The current ABAP program “SAPMV45A” had to be terminated because it found a
statement that could not be executed.

Error analysis

There is probably an error in the program
“SAPMV45A”.
A BEHAVIOR implementation is active for XYZ While this is the case,
the following ABAP statements are illegal:

– COMMIT
– ROLLBACK
– SUBMIT
– CALL TRANSACTION
– LEAVE
all DYNPRO-related statements, such as MESSAGE, CALL DIALOG, and CALL
SCREEN

The following statement is only allowed in the “Save” phase: – CALL
FUNCTION IN UPDATE TASK

RajuSubba
Participant
0 Likes

Have u find any solution for this