2008 Apr 24 1:07 PM
Hi Experts
I need to update existing sales order though inbound idoc. First I need to compare IDOC with sales order, if sales order has 3 line items but IDOC have 2 line items. In that case I have to delete third line item from sales order. For that I m thinking is, at the time of IDOC processing; add new data segment for this line item with action 003. So that it will delete that. But I dont know how to add segment dynamically.
I am using basic order type ORDERS05 with message type ORDCHG and the FM which will process this IDOC is IDOC_INPUT_ORDCHG. Please suggest me how to achieve this?
2008 Apr 24 9:03 PM
Technically you shouldn't have to do any of this. The IDoc must have the correct information in it - there is an 'action' qualifier for each line item and it must say whether the line has to be deleted, changed or added. All the determination should be done before the IDoc creation IMHO...
Hi Experts
I need to update existing sales order though inbound idoc. First I need to compare IDOC with sales order, if sales order has 3 line items but IDOC have 2 line items. In that case I have to delete third line item from sales order. For that I m thinking is, at the time of IDOC processing; add new data segment for this line item with action 003. So that it will delete that. But I dont know how to add segment dynamically.
I am using basic order type ORDERS05 with message type ORDCHG and the FM which will process this IDOC is IDOC_INPUT_ORDCHG. Please suggest me how to achieve this?
2008 Apr 24 9:03 PM
Technically you shouldn't have to do any of this. The IDoc must have the correct information in it - there is an 'action' qualifier for each line item and it must say whether the line has to be deleted, changed or added. All the determination should be done before the IDoc creation IMHO...
2008 Apr 25 7:53 AM
Thanks Jelena for your response. But in this scenario business require changing the IDOC after creation but before processing because IDOC is coming from outside
Is there any way to change IDOC before creating in SAP?
In general is it advisable to change IDOC at runtime (While processing) ?