We are receiving EDI documents from a trading partner that we wish to process as order changes. To that end we are using the Basic Type ORDERS01 and a Logical Message Type of ORDCHG. The partner relationships have been defined to support this relationship and ORDCHG transactions are being successfully processed, though not as expected. We are attempting to use the header (E2EDK01) ACTION field (described in idoc documentation as Action code for entire message) and the line level (E2EDP01) ACTION field (described in idoc documentation as Action code for the item) to control the behavior of inbound order change transactions.
The E2EDK01 ACTION values include:
000 No particular action required
001 Reverse entire document
002 Changes in document header
003 Changes in one or more items
004 Changes in header and items
The E2EDP01 ACTION values include:
001 Item added
002 Item changed
003 Item cancelled
004 Item not changed
005 Item locked
We’ve attempted to process order line change with a 003 header ACTION value and a 002 detail ACTION value. The behavior we observe is that the ORDCHG transaction is always applied to only the very first order in the SD database that matches the PO Number in the ORDCHG transaction. And the change at line level is applied by matching the transaction order line number (POSEX) to the PO line number on the sales order. If the transaction carries line 1 and the order has a line with a PO line reference of 1, the change is applied even if the part numbers do not match. Further, if the POSEX value in the transaction is not found in the sales order a new line is added to the order. Finally, if the POSEX value in the transaction matches a line in the sales order, not all values within the line are changed (for example, the vendor’s item number).
We’ve also attempted to process order line cancellations. We used a 003 header ACTION value and a 003 detail ACTION value. The results were similar in terms of which sales order was affected (only the very first order in the SD database that matches the PO Number in the ORDCHG transaction). And again, the line level match was based exclusively on POSEX.
We attempted to process an order deletion with an 001 header ACTION value and a 003 detail ACTION value and the transaction did cancel the order line but the order header remains sans order lines but not cancelled.
We attempted to process an order line deletion with a 003 header ACTION value and a 003 detail ACTION value where more than one line on the SD order shared the PO line value with the transaction. Only one of the order lines was cancelled.
Are we observing standard SAP behavior? Is there a way to cancel an order entirely? Is there any means of matching more discriminately that we have observed?
Any inputs would be appreciated.