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_salesorder_createfromdat2 with external ordernumber

Former Member
0 Likes
1,197

Hi,

I'm using the BAPI_SALESORDER_CREATEFROMDAT2 function already sucessfull, but now I have an external System (eShop) which will be the leading system for the sales order number.

Up to now, I created the order and received the SAP sales order number via MESSAGE_V2. Is it also possible to hand over a given sales order number to SAP (SAP will be configured to a new DOC_TYPE) as the "leading" order number?

I could not find any reference for this issue.

Any help would be appreciated.

Michael

3 REPLIES 3
Read only

frederic_r
Participant
0 Likes
711

Hi,

no this is not possible. SAP manages his own numbering regarding the customizing. The only thing you can do is to insert in the SAP salesorder from SAP, the sales order from your other system. This has to be send to the bapi in field 'purch_no_c' from the order_header_in structure

Read only

0 Likes
711

Hi Fred,

thanx for this fast answer. I'm already using the PURCH_NO_C, but this is the customers purchase number. I have another order number created by an eShop. Some of the SAP users told me, they can change the behaviour for creating the order number based on the DOC_TYPE, so it will accept an order number created by another system.

I just read about the DOC_NUMBER, but have not tried it yet.

Regards

Michael

Read only

0 Likes
711

no this is not possible. SAP manages his own numbering regarding the customizing. The only thing you can do is to insert in the SAP salesorder from SAP, the sales order from your other system. This has to be send to the bapi in field 'purch_no_c' from the order_header_in structure

@Fred - That's not true. SD document types are configured with both an internal and an external number range assignment. You can use either range depending on the requirement based on whether or not the number is filled...