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

Problem with function Module WS_DELIVERY_UPDATE_2


Hi All,

In a single report program, we are creating Sales order by using BAPI(BAPI_SALESORDER_CREATEFROMDAT2). Config is set to perform auto delivery for the created sales order & we have set delivery item category as not relavant for picking. PGI is done by using(WS_DELIVERY_UPDATE_2). Now we get an issue if we have multiple sales order with subsequest PGI.

First sales order is created and the subsequest PGI document creates successfully

Second sales order is created, however PGI throws an error "several deliveries were generated" and roles back the complete process.

Third Sales order gets created and the subsequent PGI document creates successfully

and this sequence is followed for 4th, 5th etc.,

For the second sales order in va03 we find sales document as

SD document 100000049 is not in the database or has been archived
and the subsequent delivery shows in vl03n as

Delivery 80001036 does not exist in the database or in the archived

Please tell us if someone has faced similar issue and if there is anything that i am missing.

Thanks

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Posted on Jan 06, 2014 at 07:11 AM

    Hi,

    Check whether you have maintained any output type for the sales order/delivery with dispatch time as 4 in the condition records.

    Regards,

    Sethu

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 06, 2014 at 11:04 AM

    Hi Sethu,

    Thanks for your reply.

    We have checked the same but we haven't maintained any output type for the sales order/delivery.

    Please let us know if there is any other possibilities.


    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 07, 2014 at 08:30 AM

    Hi Sethu,

    Thanks for your reply.

    I have tried the above mentioned coding but still no change.Again the error "Update was terminated' is coming for the second customer.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 08, 2014 at 06:24 AM

    Hi Meenal Gaur,

    Please I guess the issue is due to that fatch that a table is not getting refreshed,

    because function RV_DELIVERY_INIT is not being called for the second

    BAPI_SALESORDER_CREATEFROMDAT2 in MV45AF0B_BELEG_INITIALISIEREN. If this

    function module is called, the second BAPI can also be created.

    Please check if the issue is due to this case.

    Thanks.

    Best Regards,

    Loh, YH

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 08, 2014 at 10:50 AM

    Hi Yeow Hoong Loh,

    Thanks for your reply.

    I checked the above Function module RV_DELIVERY_INIT is called for the second BAPI_SALESORDER_CREATEFROMDAT2 in the program MV45AF0B_BELEG_INITIALISIEREN as well.

    Please let me know whatelse could be wrong.

    Regards,

    Meenal Gaur

    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.