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

Creating a Sales order with reference to Contract using Bapi.

Former Member
0 Likes
1,177

Hello friends,

Im using BAPISDORDER_GETDETAILEDLIST to get data from a Contract and then tring to create a sales order. Ive tried several BAPI's but failed every time.

1. BAPI_SALESDOCU_CREATEFROMDATA

error: enter document number from 45000000 to 49999999.

2. BAPI_SALESORDER_CREATEFROMDAT2

It creates a another contrach instead of a sales order.

3. SD_SALESDOCUMENT_CREATE

It creates a another contrach instead of a sales order.

please help me solve this issue.

thanks

2 REPLIES 2
Read only

TMSingh_SAP
Participant
0 Likes
877

Deepak,

your question will not help anybody that they can give answer, this is very specific to your code.

In such cases share more details, like what code have you written, what data you are passing..and what is the message class, message no etc.

If you have checked these FMs, then share the debug screen and values input...and what is coming in output.....

We will not be able to help in such cases..where you just mentioned FMs/bapi..and error as enter doc# between 4XXX to 49XX.

If we see the text of error...then it says doc# is not passed correctly......so debug and come here.

Thanks,

Mohan

Read only

srikanthnalluri
Active Participant
0 Likes
877

BAPI_SALESORDER_CREATEFROMDAT2 would create a sales order, check input data to this FM.

What are you passing to the AUART. It should be either 'OR' or any sales order document type.