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: 

HAI PROBLEM SALES ORDER CREATE

Former Member
0 Kudos

hi,

my requirement is to create a salesorder for quotation.

But in BAPI_SALESORDER_CREATEFROMDAT2 ,i did not see any reference to quotation.please help me to do this

regards

Guru

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Check these fields of BAPISDHD1 (Communication Fields: Sales and Distribution Document Header)

REFOBJTYPE Object Type

REFOBJKEY Object key

REFDOCTYPE Document type of reference object

REF_DOC_L_LONG Reference Document Number

EVEN, BAPISDITM structure has

REF_DOC Document number of the reference document

REF_DOC_IT Item no of the reference document

Regards,

Raj

Message was edited by: Rajasekhar Dinavahi

4 REPLIES 4

Former Member
0 Kudos

Hi,

I think that reference will be at the line item level.

If you look at the parameter ORDER_ITEMS_IN STRUCTURE BAPISDITM the fields REF_DOC, REF_DOC_IT represent the ref. doc and the line item number.

Try passing the Quote no and line item no. to these fields.

Regards,

Ravi

Note : please mark the helpful answers and close the thread if the question is answered

0 Kudos

hi,

i tried with REF_DOC AND REF_DOC_IT in ORDER_ITEMS_IN.

i have set only refdoc and refdocit in orderitemin . i did not set values for any other import parameters.

<b>the error is V E1 312 sales doc type is not defined(in returns</b>)<i></i>

<u><i><b>can u please tell me total procedure for creating sales order for quotation</b></i></u>

Former Member
0 Kudos

Hi,

Check these fields of BAPISDHD1 (Communication Fields: Sales and Distribution Document Header)

REFOBJTYPE Object Type

REFOBJKEY Object key

REFDOCTYPE Document type of reference object

REF_DOC_L_LONG Reference Document Number

EVEN, BAPISDITM structure has

REF_DOC Document number of the reference document

REF_DOC_IT Item no of the reference document

Regards,

Raj

Message was edited by: Rajasekhar Dinavahi

former_member184569
Active Contributor
0 Kudos

Hi Guru,

Here is some documentation on it.

Method

SalesOrder.CreateFromDat2

Sales order: Create Sales Order

Functionality

You can use this method to create sales orders.

You must enter at least sales order header data (via ORDER_HEADER_IN structure) and partner data (via the ORDER_PARTNERS table) as input parameters.

Enter the item data via the ORDER_ITEMS_IN table. You can allocate item numbers manually, by filling in the relevant fields, or the system does it, according to the settings for Customizing, by leaving the relevant fields blank.

If you have configurable items, you must enter the configuration data in the ORDER_CFGS_REF, ORDER_CFGS_INST, ORDER_CFGS_PART_OF and ORDER_CFGS_VALUE tables.

Credit cards can be transferred via the BAPICCARD structure, on the one hand, data for card identification, on the other, data for a transaction which has taken place in an external system.

Once you have created the sales order successfully, you will receive the document number (SALESDOCUMENT field). Any errors that may occur will be announced via the RETURN parameter.

If no sales area has been created in the sales order header, then the system creates the sales area from the sold-to party or ship-to party, who has been entered in the partner table. If a clear sales area cannot be created, you will receive a system message, and the sales order will not be created.

Notes

Mandatory entries:

ORDER_HEADER_IN : DOC_TYPE Sales document type

SALES_ORG Sales organization

DISTR_CHAN Distribution channel

DIVISION Division

ORDER_PARTNERS..: PARTN_ROLE Partner role, SP sold-to party

PARTN_NUMB Customer number

ORDER_ITEMS_IN..: MATERIAL Material number

Ship-to party:

If no ship-to party is entered, use the following: Ship-to party =

sold-to party.

Commit control:

The BAPI does not have a database commit. This means that the relevant application must leave the commit, in order that can be carried out on on the database. The BAPI BAPI_TRANSACTION_COMMIT is available for this.

German key words:

The following key words must be entered in German, independantly of

the logon language:

DOC_TYPE Sales document type, for example: TA for standard order

PARTN_ROLE Partner role, for example: WE for ship-to party

Thanks,

Susmitha