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 SAles order

Former Member
0 Likes
1,023

Hi

i want to add one new line item in existing Sales order using BAPI.

Please give me the pre-requisite fields.

i am trying,in return parameter-document saved is coming as message.

but nothing updates.

please help me ,reply ASAP.

7 REPLIES 7
Read only

Former Member
0 Likes
974

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

Prabhudas

Read only

0 Likes
974

My requirement is to add one new material in existing sales order,not for new sales order creation.

Read only

0 Likes
974

BAPI_SALESORDER_GETDETAIL. "it uses to get the old sales order with material

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

BAPI_SALESORDER_CHANGE.. "this will use to change and add new material or items

Read only

0 Likes
974

HI Prabhu,

i am passing item lvel,new material details order_item_in,

and also passed falgs in order_item_inx.

i got a warning message like not yet completely edit sales document,and one success messge - saved document.

but new material was not added in my document.

where is i am missing?

Read only

0 Likes
974

Hi

You will have to pass the schedule line details too in the relevant schedule lines tables parameter.

Atleast pass one schedule line.

Regards,

Ankur Parab

Read only

0 Likes
974

Are you calling BAPI_TRANSACTION_COMMIT or commit work after the Change BAPI call?

Read only

former_member229729
Active Participant
0 Likes
974

Hi,

"BAPI_SALESORDER_CHANGE"

seems to be the apt BAPI for your requirement.

Please look into the help thro "Function Module Documentation" for, how to Add/Update/Delete a Line Item from the existing Order.

Also, BUS2032 is the relevant Business Object.  You can find any BAPI pertaining to Sales Order 
assigned every methods.

All the Best.

Regards,

Ramani N