Skip to Content
Welcome back!!!

This is the second installment of a How to Support Industry Standards in XI (Part I of III) – Interfaces on supporting B2B using a specific Industry Standard in the SAP Exchange Infrastructure.

The initial business scenario we will support will be the receipt of an Open Applications Group (OAG) Purchase Order. The OAG PO will be converted to an SAP IDOC via XI mapping and ultimately posted in R/3.

Creating an XI Message Mapping

The purpose of this exercise is to demonstrate the process of creating an XI Message Mapping with the use of an Industry Standard message and an SAP interface in the SAP XI system.

  1. Navigate to the Message Mappings under the namespace (http://xyz.com/xi/OAG/80/R3/46C).
    (Mapping Objects -> Message Mappings)

    image

  2. Highlight the Message Mappings object. Right-click to display the context menu. Select New from the context menu.
  3. Enter the name ProcessPurchaseOrder_OrdersOrders05. Click Create. The object is displayed on the right pane in the Edit mode.
    image
  4. Under “Enter a source message” click the imageSelect Message icon. The Choose Message window should appear.
  5. Navigate to your SWC: OAG_EXAMPLE of xyz.com
  6. Expand the External Definitions node
  7. Expand ProcessPurchaseOrder
  8. Select ProcessPurchaseOrder (The child not the parent node.)
  9. Click Apply.
  10. Next under “Enter a target message” click the imageSelect Message icon. The Choose Message window should appear.
  11. Navigate to SAP APPL Software Component.
  12. Expand SAP APPL 4.6C.
  13. Click Imported Objects –> IDocs.
  14. Select the ORDERS.ORDERS05 interface. Click Apply.
    NOTE: For some readers, this interface might be already available elsewhere in your Integration Repository.
    However, the absolute path for this specific interface (ORDERS.ORDERS05) for all standard SAP customers will be the path I described above.

    image

    Ready to Map???

    We’re gonna do the quick and dirty mapping of the OAG BOD to the SAP IDoc. Both are rich and robust interfaces with lots of place holders for interesting data. We’ll only focus on the mandatory elements for this exercise, so we can get to the more fun stuff like configuring XI then seeing results in the backend.

  15. Notice the highlighted red elements in the ORDERS.ORDERS05 interface. These are the mandatory nodes or fields of the Target Interface. Unfortunately, these red highlights don’t tell the entire story of what is mandatory from the application processing perspective. We only get an overview of how the message must be constructed syntactically for processing in the ALE/EDI layer of ERP.

    Thus we’ll do the mapping exercise in two steps. First, we will only map the mandatory fields of the IDOC interface, so that we can get to a minimum point where can save the entire mapping and continue with the configuration of XI and some full end-to-end testing. Second, some of our readers might be interested in seeing results in the backend. I can show you what needed to be mapped for this ERP system to post the OAG order to SAP SD (Sales and Distribution).

    The first set of mappings will be fairly easy, as they will be constant values…

  16. In the target interface ORDERS.ORDERS05, navigate and double-click :

    /ORDERS05/IDOC/BEGIN

    The field @BEGIN will show up in the data editor portion of the screen.

    image

  17. From the Functions drop down box, select Constants .
  18. Click on the Constant function.
  19. Double click the Constant funtion in the data area.

    image

  20. Enter the value “1” (no quotes necessary). Click OK.

    image

  21. Connect the Constant Function (value 1) to the field @BEGIN.

    image

  22. Click imageto Pretty-print your mapping.

    image

  23. Congratulations!

    You are now on your way to becoming an XI graphical mapping expert (GMT)!!! image No need to learn JAVA or XSLT. Just use the GMT. Now, check out the target interface section of the screen. You will notice that the BEGIN node is now set to green. We only need to do this 11 more times to complete the mapping (syntactically).

    image

    The EDI_DC40 Segment
  24. Navigate to /ORDERS05/IDOC/EDI_DC40/@SEGMENT and double-click
  25. Create a Constant with the value “1”

    image
    Map the Constant “1” to the @SEGMENT field.

  26. Navigate to /ORDERS05/IDOC/EDI_DC40/TABNAM and double-click
  27. Create a Constant with the value “EDI_DC40”

    image
    Map the Constant “EDI_DC40” to the TABNAME field.

  28. Navigate to /ORDERS05/IDOC/EDI_DC40/DIRECT and double-click
  29. Create a Constant with the value “2”

    image
    Map the Constant “2” to the DIRECT field.

  30. Navigate to /ORDERS05/IDOC/EDI_DC40/IDOCTYP and double-click
  31. Create a Constant with the value “Orders05”

    image
    Map the Constant “Orders05” to the IDOCTYP field.

  32. Navigate to /ORDERS05/IDOC/EDI_DC40/MESTYP and double-click
  33. Create a Constant with the value “Orders”

    image
    Map the Constant “Orders” to the MESTYP field.

  34. Navigate to /ORDERS05/IDOC/EDI_DC40/SNDPOR and double-click
  35. Create a Constant with the value “NA”.

    image
    Map the Constant “NA” to the SNDPOR field.

  36. Navigate to /ORDERS05/IDOC/EDI_DC40/SNDPRT and double-click
  37. Create a Constant with the value “NA”. Alternatively, you can copy the Constant object from the previous /ORDERS05/IDOC/EDI_DC40/SNDPOR mapping.

    image
    Map the Constant “NA” to the SNDPRT field.

  38. Navigate to /ORDERS05/IDOC/EDI_DC40/SNDPRN and double-click
  39. Navigate to: /ns0:ProcessPurchaseOrder/ns0:ApplicationArea/ns0:Sender/ns0:AuthorizationId in the SOURCE interface

    image
    Map the AuthorizationId to the SNDPRN field.

  40. Navigate to /ORDERS05/IDOC/EDI_DC40/RCVPOR and double-click
  41. Create a Constant with the value “NA”. Alternatively, you can copy the Constant object from the previous /ORDERS05/IDOC/EDI_DC40/SNDPOR mapping.

    image
    Map the Constant “NA” to the RECVPOR field.

  42. Navigate to /ORDERS05/IDOC/EDI_DC40/RCVPRN and double-click
  43. Create a Constant with the value “NA”. Alternatively, you can copy the Constant object from the previous /ORDERS05/IDOC/EDI_DC40/SNDPOR mapping.

    image
    Map the Constant “NA” to the RCVPRN field.

    The E1EDK01 Segment
  44. Navigate to /ORDERS05/IDOC/E1EDK01/@SEGMENT and double-click
  45. Create a Constant with the value “1”. Alternatively, you can copy the Constant object from the first /ORDERS05/IDOC/EDI_DC40/@SEGMENT mapping.

    image
    Map the Constant “1” to the @SEGMENT field.

    And Finally…
  46. Save and Activate your Changelist.

    For now, don’t worry about the other fields that need to be mapped for the SAP ERP backend. We’ll cover that at the end of this exercise. Let’s assume we have all the technical requirements of the Message Mapping in place, as we now have all the “Mandatory” fields mapped (i.e. all the Red warnings from the Target interface are gone). We’ll continue this exercise with the creation of an Interface Mapping. With the creation of the Interface Mapping, we can then leave the Integration Repository (i.e. Design time) and move on to the Integration Directory (i.e. Configuration time). In the last blog of this series, we’ll configure XI, run a test with the HTTP Client or Quick Test Tool, and monitor the SAP ERP backend. Hopefully, this gives you a good idea of the basics of supporting Industry Standards in XI.

Create an Interface Mapping

Next we create an Interface Mapping. This object will be used during the configuration of XI in the Integration Directory.

  1. Navigate to the Interface Mappings under the namespace (http://xyz.com/xi/OAG/80/R3/46C).
    (Mapping Objects -> Interface Mappings)

    image

  2. Highlight the Interface Mappings object. Right-click to display the context menu. Select New from the context menu.
  3. Enter the name ProcessPurchaseOrder_OrdersOrders05. Click Create. The object is displayed on the right pane in the Edit mode.
    image
  4. On the Design Tab, under the Source Interface, click imageDisply List of Permitted Values F4 icon.

    image

  5. The Choose Interface window should appear. Navigate to your SWC: OAG_EXAMPLE of xyz.com
  6. Expand your SWC Version and Namespace http://xyz.com/xi/OAG/80/R3/46C
  7. Expand the node Message Interfaces.

    image

  8. Select ProcessPurchaseOrder. Click Apply.

    image

  9. On the Design Tab, under the Target Interface, click imageDisply List of Permitted Values F4 icon.
  10. The Choose Interface window should appear. Navigate to SAP APPL Software Component.
  11. Expand SAP APPL 4.6C.
  12. Expand Imported Objects.
  13. Expand IDocs.
  14. Select ORDERS.ORDERS05. Click Apply.

    image

  15. Now click the image Read Interfaces icon.

    Notice that the Source Message textbox has the ProcessPurchaseOrder interface and that the Target Message textbox has the ORDERS.ORDERS05 interface.

  16. Under Mapping Program, click imageDisply List of Permitted Values F4 icon.

    image

  17. The system will display all the Message Mappings that utilize the interface pairs selected earlier.
  18. Select the Message Mapping ProcessPurchaseOrder_OrdersOrders05. Click ok.

    image

  19. Save and Activate your changelist.

    image

    Notice the activated object under the Interface Mapping node.

So far we have the bare minimum number of objects necessary to support an Industry Standard inside XI. To recap we need:

  • External Definitions (XSDs)
  • IDocs
  • Message Interfaces
  • Message Mappings
  • Interface Mappings

In order to get the PBNW Certification, you’re missing one thing : the Integration Scenario.

As the scope of this document is supporting an Industry Standard, contact your friendly neighborhood ICC for more info on the certification process. =P

We can now go on to Part 3 [forthcoming] for configuration and testing or we can revisit the remaining mappings. Remember earlier, we only mapped all of the technically mandatory fields. We continue on with what is mandatory to post to SAP ERP.

Specific OAG to IDOC Mappings for Posting to SAP ERP

Note:The following mappings are intended to demonstrate the necessary logic to post to “my” SAP R/3 4.6C SD backend system. No warranty or support, express or implied, is made for what is necessary for integration to “your” SAP ERP implementation. In addition, the mapping logic presented is arbitrary, meaning that the mappings do not represent an official SAP solution to support integration to or from an OAG BOD.

A summary of the necessary mappings is available in a table at the end of the exercise.

  1. Navigate to the Message Mappings under the namespace (http://xyz.com/xi/OAG/80/R3/46C).
    (Mapping Objects -> Message Mappings)
  2. Select your Message Mapping: ProcessPurchaseOrder_OrdersOrders05. The object is displayed on the right pane in the Display mode.

    image

  3. Click image to put the Message Mapping into EDIT mode.

    Segment E1EDK01: Document header general data
  4. Validate that the /ORDERS05/IDOC/E1EDK01/@SEGMENT field is mapped to the Constant = “1”.
  5. Navigate to /ORDERS05/IDOC/E1EDK01/BSART and double-click.
  6. Create a Constant with the value “OR”.

    image
    Map the Constant “OR” to the BSART field.

  7. Navigate to /ORDERS05/IDOC/E1EDK01/BELNR and double-click.

    image

  8. Map the field /ns0:ProcessPurchaseOrder/ns0:ApplicationArea/ns0:Sender/ns0:ReferenceId to BELNR.
    Segment E1EDK03: Document header date segment
  9. Navigate to /ORDERS05/IDOC/E1EDK03/@SEGMENT and double-click.
  10. Create a Constant with the value “1”. Map the Constant “1” to the @SEGMENT field.
  11. Navigate to /ORDERS05/IDOC/E1EDK03/IDDAT and double-click.
  12. Create a Constant with the value “002”. Map the Constant “002” to the IDDAT field.
  13. Navigate to /ORDERS05/IDOC/E1EDK03/DATUM and double-click.
  14. In the Source Interface double-click on the field /ns0:ProcessPurchaseOrder/ns0:DataArea/ns0:PurchaseOrder/ns0:Header/ns0:PromisedDeliveryDate.
  15. Select Date from the Functions drop-down box.
  16. Select the DateTrans function
  17. Map “PromisedDeliveryDate” to the TransformDate function.
  18. Double-click on the TransformDate function, enter yyyy-MM-dd in the Format of Source Date drop-down box.
  19. Ensure that the Target Format drop-down box has yyyyMMdd selected. Click OK.
    Note: Format edited on 23MAR06 jg.
  20. Map the TransformDate function to the DATUM field.

    image

    Segment E1EDKA1: Document Header Partner Information
  21. Navigate to /ORDERS05/IDOC/E1EDKA1 and double-click.
  22. Navigate to /ns0:ProcessPurchaseOrder/ns0:ApplicationArea/ns0:Sender/ns0:AuthorizationId and double-click.

    image
    Map the “AuthorizationId” to the E1EDKA1 Segment.

  23. Navigate to /ORDERS05/IDOC/E1EDKA1/@SEGMENT and double-click
  24. Create a Constant with the value “1”

    image
    Map the Constant “1” to the @SEGMENT field.

  25. Navigate to /ORDERS05/IDOC/E1EDKA1/PARVW
  26. Create a Constant with the value “AG”

    image
    Map the Constant “AG” to the PARVW field.

  27. Navigate to /ORDERS05/IDOC/E1EDKA1/PARTN
  28. Navigate to /ns0:ProcessPurchaseOrder/ns0:ApplicationArea/ns0:Sender/ns0:AuthorizationId and double-click.

    image
    Map “AuthorizationId” to PARTN.

    Segment E1EDK02: Document header reference data
  29. Navigate to /ORDERS05/IDOC/E1EDK02 and double-click.
  30. Navigate to /ns0:ProcessPurchaseOrder/ns0:ApplicationArea/ns0:Sender/ns0:ReferenceId

    image
    Map the “ReferenceId” field to the E1EDK02 Segment. This creates the optional node called E1EDK02 in the target structure. Without this mapping, the parent structure cannot be created. Thus any subsequent child mappings will be ignored.

  31. Navigate to /ORDERS05/IDOC/E1EDK02/@SEGMENT and double-click
  32. Create a Constant with the value “1”

    image
    Map the Constant “1” to the @SEGMENT field.

  33. Navigate to /ORDERS05/IDOC/E1EDK02/QUALF and double-click
  34. Create a Constant with the value “001”

    image
    Map the Constant “001” to the QUALF field.

  35. Navigate to /ORDERS05/IDOC/E1EDK02/BELNR
  36. Navigate to /ns0:ProcessPurchaseOrder/ns0:ApplicationArea/ns0:Sender/ns0:ReferenceId

    image
    Note: Nice to have if you want to see the purchase order (PO) reference data in the SAP ERP Sales Order.

  37. Navigate to /ORDERS05/IDOC/E1EDK02/DATUM
  38. Select Date from the Functions drop-down box.
  39. Select the DateTrans function
  40. Navigate to /ns0:ProcessPurchaseOrder/ns0:DataArea/ns0:PurchaseOrder/ns0:Header/ns0:DocumentDateTime
  41. Map “DocumentDateTime” to the TransformDate function.
  42. Double-click on the TransformDate function, enter yyyy-MM-dd in the Format of Source Date drop-down box.
  43. Ensure that the Target Format drop-down box has yyyyMMdd selected. Click OK.
    Note: Format edited on 23MAR06 jg.
  44. Map the TransformDate function to the DATUM field.

    image

    Segment E1EDP01: Document Item General Data
  45. Navigate to /ORDERS05/IDOC/E1EDP01
  46. Navigate to /ns0:ProcessPurchaseOrder/ns0:DataArea/ns0:PurchaseOrder/ns0:Line

    image
    Map the “Line” field to the E1EDP01 Segment.

  47. Navigate to /ORDERS05/IDOC/E1EDP01/@SEGMENT and double-click
  48. Create a Constant with the value “1”

    image
    Map the Constant “1” to the @SEGMENT field.

  49. Navigate to /ORDERS05/IDOC/E1EDP01/POSEX
  50. Navigate to /ns0:ProcessPurchaseOrder/ns0:DataArea/ns0:PurchaseOrder/ns0:Line/ns0:LineNumber

    image
    Map the “LineNumber” field to POSEX

  51. Navigate to /ORDERS05/IDOC/E1EDP01/ACTION
  52. Navigate to /ns0:ProcessPurchaseOrder/ns0:DataArea/ns0:PurchaseOrder/ns0:Line/ns0:OrderItem/ns0:ItemStatus/ns0:Code

    image
    Map the “ItemStatus” field to the ACTION field.

  53. Navigate to /ORDERS05/IDOC/E1EDP01/MENGE
  54. Navigate to /ns0:ProcessPurchaseOrder/ns0:DataArea/ns0:PurchaseOrder/ns0:Line/ns0:OrderQuantity

    image
    Map the “OrderQuantity” field to MENGE

  55. Navigate to /ORDERS05/IDOC/E1EDP01/MENEE
  56. Navigate to /ns0:ProcessPurchaseOrder/ns0:DataArea/ns0:PurchaseOrder/ns0:Line/ns0:OrderQuantity/@uom

    image
    Map the “@uom” attribute to the MENEE field

    Segment E1EDP19: Document Item Object Identification
  57. Navigate to /ORDERS05/IDOC/E1EDP01/E1EDP19
  58. Navigate to /ns0:ProcessPurchaseOrder/ns0:DataArea/ns0:PurchaseOrder/ns0:Line/ns0:OrderItem/ns0:ItemIds/ns0:ItemId/ns0:Id

    image
    Map “Id” field to the E1EDP19 Segment.

  59. Navigate to /ORDERS05/IDOC/E1EDP01/E1EDP19/@SEGMENT and double-click
  60. Create a Constant with the value “1”

    image
    Map the Constant “1” to the @SEGMENT field.

  61. Navigate to /ORDERS05/IDOC/E1EDP01/E1EDP19/QUALF
  62. Create a Constant with the value “002”

    image
    Map the Constant “002” to the QUALF field.

  63. Navigate to /ORDERS05/IDOC/E1EDP01/E1EDP19/IDTNR
  64. Navigate to /ns0:ProcessPurchaseOrder/ns0:DataArea/ns0:PurchaseOrder/ns0:Line/ns0:OrderItem/ns0:ItemIds/ns0:ItemId/ns0:Id

    image
    Map “Id” to the IDTNR field.

  65. Congratulations, again!!!
    Thanks for staying with me this far. You may have noticed that mapping from OAG to IDOC is generally quite simple. The other direction (IDOC to OAG) is not necessarily so easy as there are many fields that the OAG BOD can support. It would be interesting to see how many OAG customers utilize everything that this complicated structure provides.
Summary Table

image
image
image
image
image
image
image

At some point you might be asking yourself, so how does James know all this stuff??? Well it’s easy, we at SAP have already created out-of-the-box integration solutions for RosettaNet, CIDX, and STAR. We have mappings for both directions – inbound and outbound (ie both roles). This significantly speeds up implmentation time for SAP consultants and ultimately customers, because SAP ensures that Industry Standard message can somehow integrate with the backend. So supporting another Industry Standard like OAG becomes fairly easy once you’ve done the hard part: the Business Mappings.

Business Mappings typically involve quite a few resources to determine the semantical meaning of all of the fields. Please do not take this exercise lightly as the technical implementation is actually the easiest part of supporting Industry Standards like OAG, RosettaNet, CIDX, STAR, etc. In this particular exercise, I ran into a small obstacle in determining the E1EDKA1 segment’s sources in the OAG document.

Until next time…

Please see my final installment, How to Support Industry Standards in XI (Part III of III) – Config & Test of this series for configuring XI and how to test.

To report this post you need to login first.

9 Comments

You must be Logged on to comment or reply to a post.

  1. John Varughese
    During the migration process problems have been reported for this blog. The blog content may look corrupt due to not supported HTML code on this platform. Please adjust the blog content manually before moving it to an official community.
    (0) 
    1. Anonymous
      Must read article for XI NewBies.

      Especially for those who are getting into the integration world and wonder how to get around with things in XI.

      -NP

      (0) 
    2. Bhaven Shah
      James,

      Kudos of writing such excellent blog

      I could not find Part III of the blog ? Have you posted it and if not, when are you planning to post it ?

      -Bhaven

      (0) 
  2. Anonymous
    Hi James,

    well this is a very good blog written in a way everybody should be able to understand. Maybe some others should take this as a sample 😉

    Anyway, one question? Why do you map “NA” to some of the fields in the IDoc control record? The Mapping offers the functionality to disable mandatory fields so you don’t have to map them at all. Given the fact how the IDoc Adapter works, this would be a better solution as in your case configuration in the Directory (apply control records from paload) could lead to errors.

    Regards
    Christine

    (0) 
  3. Bob Patel
    James,

    Excellent Excellent blog. Really …

    When are you planning to post the last part of the blog ? I am eagerly waiting ..

    Most of us are confused in ID config of such a scenario where I believe Party config will have to be done…So Plz post the last post as soon as possible ..

    Regards,
    -Bob

    (0) 

Leave a Reply