Question

  Asked: Jan 23 2008   2:03 PM GMT
  Asked by: Claypj


Change IDOC for ORDCHG behavior


ORDCHG, SAP, iDoc

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.

Subscribe to Alerts! Get questions and answers delivered to your Inbox.


E-mail me updates on this question



   SUBSCRIBE

hidden modal window

Answer Wiki (Improve, edit or add to this answer)


 RATE THIS ANSWER
+1
Click to Vote:
  •   1
  •  0



Yes you are observing standard SAP behaviour. It is unclear from your question as to whether you are using standard SAP code or have employed your own code and/or user exits.

I don't recommend you use POSEX to identify the line item in the order. Better to use the Customer Part Number (KDMAT). We have similar problems when matching Sales Orders (although in our case we use Schedules - standard practice in the Automotive Manufacturing Supplier Industry).

We successfully match many Customers -> Many Schedules -> Many Order Lines but have gone away from standard SAP, mainly due to the limitations you are experiencing.

Good Luck - Ed.
  • AddThis Social Bookmark Button

Browse more Questions and Answers on SAP and DataManagement.

Looking for relevant SAP Whitepapers? Visit the SearchSAP.com Research Library.


Discuss This Answer


You must be logged-in to discuss a question. Log-in/Register