2007 Jun 18 4:51 PM
Hey guys,
I have a situation here... I tried searching the forum i could not really
find anything...
We have an incommin SALESORDER_CREATEFROMDAT2 IDOC which has 10 line items .
1 out of the 10 items fail, The sales order is created with the 9 line items.
Now when the error for the single line item is fixed, and the batch process reprocesses the IDOC we have a new SO with all 10 items and 9 items repeated. So we have double sales order for 9 items.
Now we handle the inbound IDOC using BAPI_IDOC_INPUT1, the standard process.
The IDOC status is 51 - but the document is still created.
I am not really sure what we are missing at this point of time, when the IDOC is reprocessed how do we know that it is a change to and existing sales order which had one line item failed.
any ideas... my words could be a little incoherrent here... please let me know if you guys need more information...
2007 Jun 19 12:46 PM
Hi,
Here you have two options.
1) First is if even one item is error then simply exit from the sales order creation function module and status 51 and in the status message you can populate the the line no of item in which error occurs by chaning stanard program.
2)If out of 10 line items one is error and sales order is created with 9 items in this case you have to change the code in such a way
if you have reprocess the idoc then program has to check error is in all line items or some line items.if error is some line items then you have to call function module for sales order change.If you can call the sales order change function module then it is possible to create some new item entries for existing sales order.
Thanks and regards,
shyla kumar