Skip to Content
author's profile photo Former Member
Former Member

Adding new item using BAPI_SALESORDER_CHANGE

Hi Everyone,

I am trying to use BAPI_SALESORDER_CHANGE to add a new item to my sales order.

I filled the sales order number in the parameter SALESDOCUMENT.

In the ORDER_HEADER_INX, I set the update flag to 'U'.

In the ORDER_ITEM_INX, I set the update flag to 'I'.

In the ORDER_ITEM_IN, I entered the material number.

In SCHEDULE_LINES, I entered the REQ_QTY.

In SCHEDULE_LINESX, I set the update flag to 'I'.

For both the SCHEDULE_LINESX and ORDER_ITEM_INX, I leave the item numbers blank. This is because I am inserting a new item.

I got a success message but no new item was added. What did I miss? Also, I am wondering if the system is able to link the REQ_QTY in the SCHEDULE_LINES to the Material in ORDER_ITEM_IN?

Best Regards,

Junwen

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on Nov 21, 2004 at 12:50 PM

    I have not used this BAPI. But just wanted to check, did you call BAPI_TRANSACTION_COMMIT after calling BAPI_SALESORDER_CHANGE? else do that.

    Regards

    Raja

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 18, 2005 at 07:17 AM

    Hi,

    As far as I know you should be using another BAPI: BAPI_SALESORDER_CREATEFROMDAT2

    Generally these rules apply:

    1. BAPI_SALESORDER_CREATEFROMDAT2 is used to create new orders or add line items to existing orders.

    2. BAPI_SALESORDER_CHANGE is used to make amendments to existing orders.

    3. BAPI_SALESORDER_CHANGE is used to cancel line items.

    Hope this helps.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.