Application Development and Automation 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: 
Read only

Call Transaction / Bapi plus Commit work in a Update task?

Former Member
0 Likes
621

How to use Call Transaction / Bapi plus Commit work in a Update task.

We have configured a output type for Purchase order, so when ever a PO is created via Me21N a sales order needs to be created. I tried using Bapi BAPI_SALESORDER_CREATEFROMDAT1 in the routine but

BAPI_TRANSACTION_COMMIT is not working as this is all happening in Update task.

How to create a SO in the above case?

Thanks in advance

Cheers!!

Anand

2 REPLIES 2
Read only

Former Member
0 Likes
470

Hi Anand,

I understand that your requirement is to create a sales order on creation of purchase order.

I guess you can do the same in the BADI ME_PURCHDOC_POSTED.

Please try implementing the same. This BADI will be triggered whenever the purchase document is posted.

Please go ahead and implement your sales order logic in this BADI and let me know if this solution works for you.

Regards,

Hariharan

Read only

Former Member
0 Likes
470

Anand,

I would try calling out to a new program using SUBMIT Z_YOUR_NEW_PROGRAM.

And have the new Z program create the SO as needed.