Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Express document "Update was terminated" for BAPI BAPI_SALESORDER_CREATEFROMDAT2

firefighter1
Explorer
0 Kudos
541

Hi All,

For first sales order I didn't get any error. But when I tried to create another sales in same session I am getting this error for when BAPI_TRANSACTION_COMMIT is executed. When I check in ST22 got the below error analysis.

While debugging, I got to know that, in internal table DA_XVBFAI has first created sales order data and new sales order data. So it is getting dump. I went through so many pages but didn't the answer, Please hep.

1 ACCEPTED SOLUTION

raymond_giuseppi
Active Contributor
278

You could

  • call the BAPI_TRANSACTION_COMMIT function module with the parameter WAIT = X.
  • call function module SD_SALES_DOCUMENT_INIT with the parameter SIMULATION_MODE_BAPI = X between each call.
  • Execute the BAPI calls with the DESTINATION 'NONE' followed by a call of RFC_CONNECTION_CLOSE.
3 REPLIES 3

abo
Active Contributor
278

Since the header information in BAPI_SALESORDER_CREATEFROMDAT2 is not a table but a structure, I'd say you can only use it to create ONE order for every commit cycle.

To create a second order, after the first commit set the data for the new order and again call BAPI_SALESORDER_CREATEFROMDAT2 with commit.

raymond_giuseppi
Active Contributor
279

You could

  • call the BAPI_TRANSACTION_COMMIT function module with the parameter WAIT = X.
  • call function module SD_SALES_DOCUMENT_INIT with the parameter SIMULATION_MODE_BAPI = X between each call.
  • Execute the BAPI calls with the DESTINATION 'NONE' followed by a call of RFC_CONNECTION_CLOSE.

0 Kudos
278

Function module SD_SALES_DOCUMENT_INIT works for me. Thank you.