cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with function Module WS_DELIVERY_UPDATE_2

Former Member
0 Kudos


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

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

Former Member
0 Kudos

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.


msethu_madhavan
Explorer
0 Kudos

Hi,

Did you searched about this...Pls check this one..

http://scn.sap.com/message/7129952#7129952

Thanks,

Sethu

msethu_madhavan
Explorer
0 Kudos

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