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: 

Passing fields to BAPI BAPI_SALESORDER_CREATEFROMDAT2

Former Member
0 Kudos
1,351

Hi all,

i need to create or change a sales order from the inbound idoc.

i need to create the SO if its not present else i need to change.

Bapi 's am using are

BAPI_SALESORDER_CREATEFROMDAT2 --- creation of SO

BAPI_SALESORDER_CHANGE -


change of SO

I need to pass the following fields to BAPI,

Header

Order no

Sold to party

Ship to party

PO number (Sold to party)

Purchase order no. (Ship to party)

Requested Delivery Date

Delivery Block

Order Reason

PO number

Sales Group

Item

Material

Qty

First Delivery Date

Customer material no

Plant

Route

Order text

Purchase order item

Line Reason Code

Reason of Rejection

Billing Date

Purchase order item (sold to party)

Purchase order item (ship to party)

I want to know where are these fields in the BAPI ...?? and where do i send these fields ..?

thanks in advance.

~ Termi S.

3 REPLIES 3

Former Member
0 Kudos
122

Hi Termi,

Try Using Bapi ..

first try to get the sales order details using the bapi..

BAPI_SALESORDER_GETDETAIL.

and try to pass the details from above and add extra line item as per requirement to BAPI..

BAPI_SALESORDER_CHANGE..

ORDER_ITEM_IN "Empty for new item

ORDER_ITEM_INX "fill your item data and pass to above BAPI

let us know if it helped u..

Regds,

Manas

0 Kudos
122

Thanx for the reply Manas but what i need is the parameters where i need to pass the header data and the idem data.

I know that ORDER_HEADER_IN and ORDER_ITEMS_IN are used to pass but am unable to find some fields mentioned above in header and as well as item.

Former Member
0 Kudos
122

For the BAPI_SALESORDER_CREATEFROMDAT2 u can refer link.

http://www.sap-img.com/abap/bapi-salesorder-createfromdat2.htm

For the BAPI_SALESORDER_CHANGE u can refrer following link.

http://abap.wikiprog.com/wiki/BAPI_SALESORDER_CHANGE