Bush & Sons (Customer) wants to send an ORDERS05 Idoc to Reagan Inc. Problem is that they want to send some additional data to be saved in a custom table which is not present in the aforementioned Idoc. Reagan Inc. decides to go for a custom Idoc based on segments of ORDERS05. Bill is the developer and he follows the standard method –

  1. Create a custom segment using TCode WE31. Add the custom fields in the segment and release the segment.
  2. Create a custom Idoc type using TCode WE30. Ideally, a custom Idoc should be named carefully either to reflect the original Idoc type or the process in concern. Bill chose ZORDERS05.
  3. Maintain the attributes of ZORDERS05 and attach all required segments including the one created in step 1.
  4. Create a logical message type using TCode WE81 and then map it with IDoc type ZORDERS05 using WE82.
  5. Based on how the Idoc is being processed, set up the ALE/Idoc settings. In this case, it is an inbound Idoc and hence Idoc Partner Profile needs to be set up accordingly using WE20.

Another approach could have been to add an extension but some architects avoid using it if the data incoming is not standard SAP. This cautious approach helps in segregating different processes without any accident.

So, what happens next? Bush & Sons send an Idoc via XI and the inbound Idoc created a PO in Reagan Inc. system. While the PO was getting created, ZTable was updated with the data populated in the custom segment.