Skip to Content

How to create correction delivery in schedule agreement

Hi all -

I am loading legacy data into SAP and am creating schedule agreements. I create the agreement using SD_SALESDOCUMENT_CREATE, then COMMIT, then update the schedule lines using BAPI_SALES_DEL_SCHEDULE_CREATE also followed by a COMMIT. This works, and creates the schedule agreement with schedule lines.

At this same time, or even in another BAPI or function call if need be, I need to create a CORRECTION DELIVERY for this schedule agreement. I am populating the CORR_CUM_QTY_IN and CORR_CUM_QTY_INX in BAPI_SALES_DEL_SCHEDULE_CREATE with values in every field, and the return tells me 'CORR_CUMQTY_IN has been processed successfully', but when I look at the schedule agreement in VA32, there is no cum. issued qty or cum. delv qty, and no correction delivery has been created.

What am I missing??

Thanks so much...


Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on May 05, 2011 at 05:12 AM

    Hi Sharon,

    I am assuming you have called 'BAPI_TRANSACTION_COMMIT' function module after the BAPI_SALES_DEL_SCHEDULE_CREATE call. Also, first check in SE37 (menu Function Module >Test >Test Sequences) by calling these two funciton modules in sequence. Once the function module works, then you can change the parameters in the program accordingly.

    Is the return table having just one message?



    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Shyam -

      I am calling the BAPI_TRANSACTION_COMMIT function right after the BAPI_SALES_DEL_SCHEDULE_CREATE function. When I call that create function, I am adding schedule lines, so my return table has all of the other successful messages you would expect -

      ORDER_HEADER_IN has been processed successfully

      CORR_CUMQTY_IN has been processed successfully

      DEL_SCHEDULE_IN has been processed successfully

      SCHEDULE_IN has been processed successfully

      Sched. Agr. w/ Rel. 1030000058 has been saved.

      It even says the corrective cum qty was successful....but when I open the schedule agreement, and go to the Forecast Delivery Schedule tab on the line item, the Cml. iss. qty and Cml. dlv. qty fields are blank, and there are no deliveries associated with the order.

      Do I have to use a seperate BAPI to create the correction delivery? I've looked at BAPI_OUTB_DELIVERY_CREATE_SLS, but I don't see how to specify that this is a correction delivery and not a 'regular' delivery.



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.