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

BAPI for sales order creation with Reference

former_member202077
Participant
0 Likes
785

Hello Experts,

I have a order, with its reference I have to create a new sales order.

Am looking for BAPi, with which I can create a sales order with a Reference order (which is in my hand), so I checked SE37 with wild cards, but I did not find any!!

1) Pls. let me know a BAPI

2) And just like that I do not want to create a new order with the reference(existing) order, I have to change the PO number & order Reason(2 fileds) in newley creationg order, pls. let me know How to do it

Thank you

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
702

Hi..

Use BAPI_SALESORDER_CREATEFROMDAT2 to create Sales Order.

To search for a Bapi always use transaction 'BAPI' and search by expanding the tree as per your requirement.

Regards,

Karthik

To change an order use BAPI_SALESORDER_CHANGE. The function module documentation will contain sufficient information for you to proceed.

Edited by: Rob Burbank on Sep 2, 2010 3:18 PM

Hello Experts,

I have a order, with its reference I have to create a new sales order.

Am looking for BAPi, with which I can create a sales order with a Reference order (which is in my hand), so I checked SE37 with wild cards, but I did not find any!!

1) Pls. let me know a BAPI

2) And just like that I do not want to create a new order with the reference(existing) order, I have to change the PO number & order Reason(2 fileds) in newley creationg order, pls. let me know How to do it

Thank you

2 REPLIES 2
Read only

Former Member
0 Likes
703

Hi..

Use BAPI_SALESORDER_CREATEFROMDAT2 to create Sales Order.

To search for a Bapi always use transaction 'BAPI' and search by expanding the tree as per your requirement.

Regards,

Karthik

To change an order use BAPI_SALESORDER_CHANGE. The function module documentation will contain sufficient information for you to proceed.

Edited by: Rob Burbank on Sep 2, 2010 3:18 PM

Read only

Former Member
0 Likes
702

Hi,

First try to pass these two parameters to BAPI_SALESORDER_CREATEFROMDAT2


ORDER_HEADER_IN-REFDOCTYPE = Your Sch. Agreement No. (Please Check) and 
ORDER_HEADER_IN-SD_DOC_CAT = 'E'.

If the above doesnt work ,than try using BAPI "BAPI_SALESDOCUMENT_COPY"

I hope you are working in SAP R/3 4.6C and above version because i am not sure whether this BAPI is available in lower version.

Let us know if this helps you..

Rgds,

Mayank