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,205

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
foessleitner
SAP Champion
SAP Champion

Hi,

to avoid the COMMIT WORK issue, I used an aRFC function which executes the BAPI (CALL FUNCTION <new_arfc_function> STARTING NEW TASK <task_name> CALLING <method> ON END OF TASK. ... WAIT FOR ASYNCHRONOUS TASKS .... - Also possible is just DESTINATION 'NONE'.

Regards, Föß

umtyzc
Participant
0 Likes

Thanks Johann, Can you send example code?