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

Sales order creation using BAPI

Former Member
0 Likes
568

Hi all,

I am new to Bapi & interfaces. i need to create sales order using bapi.

Can u please send coding how to create sales order using bapi.

Thanks in advance

Venkat

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
508

Here is a sample of how to use the BAPI

http://www.sapgenie.com/abap/bapi/example.htm

Try using on similar lines for sales order.

Regards,

ravi

Note : Please mark all the helpful answers

4 REPLIES 4
Read only

varun_maharshi
Active Participant
0 Likes
508

BAPI_SALESORDER_CREATEFROMDATA will work for you... You can find all the bapis in TCODE BAPI

Read only

Former Member
0 Likes
508

Hello Venkat,

There are 3 BAPI's to Create the sales order. They are

BAPI_SALESORDER_CREATEFROMDAT1 Sales order: Create Sales Order

BAPI_SALESORDER_CREATEFROMDAT2 Sales order: Create Sales Order

BAPI_SALESORDER_CREATEFROMDATA Create Sales Order, No More Maintenance

The BAPI sis used in the Include MWWMJF21_BAPI_SALESORDER_CREAT

Do the same in ur report also.

If useful reward points.

Regards,

Vasanth

Read only

Former Member
0 Likes
509

Here is a sample of how to use the BAPI

http://www.sapgenie.com/abap/bapi/example.htm

Try using on similar lines for sales order.

Regards,

ravi

Note : Please mark all the helpful answers

Read only

Former Member
0 Likes
508

If you want to just create a simple sales order, then use BAPI_SALESORDER_CREATEFROMDATA

Populate the header structure with <u>Order Header</u> Information such as Order Type, Sales Organisation, Distribution Channel, Division, Purchase order number, if that is set as mandatory.

Then populate the <u>LINE ITEMS</u> structure with Line item number, material number, quantity, Unit of measurement.

Populate <u>Partner Profiles</u> with partner function and partner number. Specify at least Sold to Part (SP/WE)

The above fields are the bare minimum you need to provide.

Create a test data and test the BAPI_SALESORDER_CREATEFROMDATA in SE37. See if it is working and creates an order.

Then you can use the function module in your program and create internal tables of the same structure as BAPISHEADER and BAPITEM and BAPIPARTNR.