Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

openSAP Simplify Integration with SAP Cloud

platform Integration Suite

Additional Exercise: Week 3 Unit 2:


Send Purchase Orders from SAP S/4HANA to
Business Partners
PUBLIC
Business scenario

Send SOA message from SAP S/4HANA Cloud to a trading partner as ASC X12 message

As shown in the demo of Week 3 Unit 2, the scenario is to send a Purchase Order Request from an S/4 HANA system
which reaches the SAP Cloud Platform Integration via a SOAP adapter. This message is then processed and
converted into ASC X12 format and sent out to a trading partner via an AS2 adapter. The interfaces and mappings are
generated using the Integration Advisor and imported into the CPI integration flow. The end-to-end scenario is
showcased in the image below.

But the scope of this exercise is to give you hands-on experience in creating MIGs and MAGs using Integration
Advisor. The optional part of the exercise where you consume the artifacts from Integration Advisor in an CPI
integration flow is completely up to you to try it by your own.

Exercise Goals

1. Create a customized interface for the SOA based purchase message structure in form of a Message
Implementation Guideline (MIG)

2. Create a mapping from this customized SOA message structure to the corresponding target message structure,
which is based on ASC X12 850.

3. Generate the runtime artifacts, which are used in SAP Cloud Platform Integration flow

Prerequisites

• SAP Cloud Platform Integration Advisor tenant (refer to System Information page in openSAP)

2
Exercise Steps:

Part 1: Integration Advisor – Create Message Implementation Guidelines

Explanation Screenshot
1. Open Google Chrome (or IE10
Browser)

2. Log in into the Integration


Advisor tenant using the URL,
you got while booking the
tenant from the System
Information page.


3. To create your customized
interfaces, you need to go to the
Message Implementation
Guideline section
a. Click on "Message
Implementation Guidelines
(MIGs)"

4. Here you will find two already


prepared Message
Implementation Guidelines as
samples:
a. Prep-01 - Source - SOA
Purchase Order Out
b. Prep-02 - Source - SOA
Purchase Order Out

5. Now create your own SOA


message "OrderRequest_Out",
which will be the source
message in outbound direction

6. Click on "Add" for creating a


new "Message Implementation
Guideline"

3
7. In the pop-up window, the first
step is to select the "Type
System"

8. Click on "SAP S/4HANA Cloud


SOAP – SAP S4HANA Cloud
SOAP Messages"

9. Then for Versions of this Type


System, select "1802"

10. Select the message type


"OrderRequest_Out"

a. Enter in search box:


"Order"
b. Click on row
"OrderRequest_Out –
Order Request Out"

11. Enter the overview information


of the new Message
Implementation Guideline

12. Enter the name: "XX - Source -


SOAP: Purchase Order Out",
where XX is your S/P/I/D/C
User ID

13. Select direction "Out"

14. Enter some summary text such


as:
Product Classification:
Consumer Electronics
Industry: Consumer
Products
Geo Political: United States
Business Role: Buyer

15. Click on button "+"

4
16. Set the business context
categories of your Message
Implementation Guideline

17. Select business context


category "Product
Classification"

18. In the Product Classification


field, enter string "Con" to start
searching.

19. Select "Consumer electronics"


from the drop list

20. Click on button "+" in Own


Business Context section for
adding further business context
categories and add these
values:

Industry Classification:
Consumer Products
Geo Political: United States
Business Process Role: Buyer

21. Click on button "Create" on the


right lower corner.

22. You'll now see the overview of


the new Message
Implementation Guideline.

23. Next step would be to


customize the structure
a. Click on button "Edit" (if not
already in edit mode)

b. Click on tab “Structure",


where you will see the
structure of the SOA
message

5
24. You'll see the structure of the
Message Implementation
Guideline in "Edit" mode in
where you can select required
elements/codes or deselect the
unrequired elements/codes.

25. You can also do a further


precision of the properties such
as cardinalities and refining as
well as adding names,
definitions and notes.

26. Move with the mouse cursor to


root node "OrderRequest"
a. Click the right mouse button
for opening the context
menu
b. And click on menu item
"Expand All"

27. You'll see the completely


expanded structure with just the
selected elements, which are
mandatory. Now, it is necessary
to select the relevant elements.
But which one, are not clear.
The proposal service becomes
very helpful in this case.

28. Click on button "Get


Proposals"

29. You'll see all the proposals for


the fields coming from the
system based on the given
business context with a
"Proposal Indicator".

30. Select all elements that have a


high probability (with a
confidence of > 50%) by
clicking on the check boxes
( ) until "Party"

Note: Element "Party" has a


specific behavior

6
31. The group element "Party" is
very generic and must be
semantically precised. This is
possible by qualifier values
coming from the child element
"PartyType". It is now
necessary to select the
appropriate qualifiers.

32. The arrow marker shows that


the "PartyType" element
qualifies the group element
"Party"
a. Click on icon for
showing the proposed
qualifier values
b. Select the proposed
qualifier values "ShipTo"
and "SoldTo"
c. Click on button "Apply"

33. Now the view of the structure


shows two different variants of
the qualified element group
"Party" for “Party - Ship To”
and “Party - Sold To”". Both
variations do have different
proposals of their child
elements.

34. Just select these ones with a


high confidence (> 50%) by
clicking on the check boxes

35. The Message Implementation


Guideline editor also provides
proposals for further properties
such as cardinality.

36. Therefore, Select all elements


with high probability until
"OrderItem"
a. Double click on the row of
the element "OrderItem"
b. You'll see the details panel
of the element “OrderItem”
c. Click on the icon for
showing the proposed max
occurrences

7
37. You'll see the proposed max
occurrences.
a. Select the max occurrence
"9999"

38. Finalize the customization of


the interface
a. Select all remaining
elements with high
probability until the end
b. Deselect the element group
"Party" inside of the
element group "OrderItem"
c. Click on "Save" button so
that your Message
Implementation Guideline
will get saved.

39. Click on “Message


Implementation Guideline”
link in the navigation above to
go back to the list of MIG’s.

Congratulations, you have now


successfully created a source
Message Implementation
Guideline (also known as an
interface) using a type system,
its specific version and
leveraging the machine learning
based proposal service.

Similarly, you can create a


target Message
Implementation Guideline or
use the already prepared target
MIG for the next part of this
exercise.

8
Part 2: Integration Advisor – Create Mapping Guideline

Explanation Screenshot
1. From the main menu, select the
option Mapping Guidelines
(MAGs) to navigate to the area
where we will create a new
mapping

2. Click on "Add" button


a.

b.
3. Select the source MIG that you
created in the first part of this
exercise "XX – Source - SOA:
Purchase Order Out" or you
can also use the already
prepared source and target
MIG’s.

4. Click on button "Next"

5. Next select the target MIG that


you created or use one of the
already prepared target MIG
"Prep-01 - Target - ASC X12
004010 Purchase Order"

6. Click on “Create”

c.

9
7. In the "Mapping Guidelines"d.
editor, you'll see the overview
page of the new mapping
guideline.

a. Click on "Edit" (if it is not


already in the edit mode)

b. Select tab "Mapping"

e.
8. The mapping view shows thea.
customized source and target
structures provided by the
selected source and target
MIGs including the already set
constants at the target side.

9. No mapping elements are


shown at this point of time. You
can expand both structures by
clicking the root node element
with right mouse click and
selecting “Expand All” or select
the “>” button beside the nodes

10. To get a mapping proposal, b.


a. Click on button
"Proposal" and select “Get
Proposal” from the menu

10
11. Scroll down at the lower viewc.to
see the proposed mapping
elements with a
confidence indicator

d.
12. For getting the best fit mapping
e.
elements into the Mapping
Guideline

a. Click on “Proposal” and


select the action item
"Select Best Proposal"

b. You'll see the mapping


elements with the highest
proposals selected in your
Mapping Guideline (These
can be added or changed)

c. Click on button "Save"

f.
13. Simulate the mapping with test
data by the following steps:
a. Click on button "Simulate"

14. Now you'll see at source MIG a


column "Data" with the
predefined or calculated source
payload data at leaf
elements and similarly at target
MIG also a column "Data" with
the mapped/transformed target
payload data

g.

11
15. Now let us select a mapping
between source element
“PurchaseOrderCreationDate”
and target element “Date
(373)”

16. Select the “Function” tab in the


view below to see the XSLT
code snippet available to
convert the format of the source
date to appropriate target date
format.

17. Click on “Save”

h.
i.
18. Now you can click on the
“Mapping Guidelines”
navigation link on the top to go
back to the list of all MAG’s

Congratulations, you have now


successfully created a Mapping
Guideline using the source and
j.
target MIG and also leveraged
the machine learning based
proposal service.

Part 3: Integration Advisor – Export of Interface (MIG) and Mapping (MAG) Artifacts

Explanation Screenshot
The last section in this exercise will
conclude with the export of the
Mapping artifacts to be consumed
either in SAP Cloud Platform
Integration or SAP Process
Integration.

1. Select the Mapping Guideline


that you created in the previous
part of the exercise from the
Mapping Guidelines (MAGs)
section

12
2. Now click on the “…” (three
dots) icon on the right top
corner of the Mapping
Guidelines view.

3. Then select the


"Export" button, and choose
“Cloud Platform Integration
Runtime Artifacts”

4. You'll get a zip file and will be


opened automatically. This zip
file has following parts:
a. The mapping in form of
XSLT
b. The sub-folders include
automatically generated
pre- and postprocessing
steps, validation for precise
payload validation
according to the final
customization and
conversion rules for syntax
conversion.

5. An export of the mapping


guideline for documentation
purpose is also provided as
PDF

Congratulations, you have


completed the last part of the
exercise where you learned
how to export runtime artifacts
and documentation for your
interfaces and mappings from
Integration Advisor.

Optional Step:

Now to consume the exported runtime artifacts in related Integration Flow steps for e.g. validation, mapping and
syntax conversion, please refer to the documentation described in detail with predefined templates at:
https://api.sap.com/package/ICAPrepackagedContent?section=Overview

Additional Resources

A detailed product and feature description of Integration Content Advisor can be found in following blog:
https://blogs.sap.com/2019/03/12/integration-content-advisor-overview-of-components-and-further-reading/

13
Coding Samples
Any software coding or code lines/strings (“Code”) provided in this documentation are only examples and are not intended for use in a production system environment. The Code is only intended to better
explain and visualize the syntax and phrasing rules for certain SAP coding. SAP does not warrant the correctness or completeness of the Code provided herein and SAP shall not be liable for errors or
damages cause by use of the Code, except where such damages were caused by SAP with intent or with gross negligence.

www.sap.com/contactsap

© 2019 SAP SE or an SAP affiliate company. All rights reserved.


No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP SE or an SAP affiliate company.

The information contained herein may be changed without prior notice. Some software products marketed by SAP SE and its distributors contain proprietary software components of other software vendors.
National product specifications may vary.

These materials are provided by SAP SE or an SAP affiliate company for informational purposes only, without representation or wa rranty of any kind, and SAP or its affiliated companies shall not be liable
for errors or omissions with respect to the materials. The only warranties for SAP or SAP affiliate company products and services are those that are set forth in the express warranty statements
accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.

In particular, SAP SE or its affiliated companies have no obligation to pursue any course of business outlined in this docume nt or any related presentation, or to develop or release any functionality
mentioned therein. This document, or any related presentation, and SAP SE’s or its affiliated companies’ strategy and possible future developments, products, and/or platform directions and functionality are
all subject to change and may be changed by SAP SE or its affiliated companies at any time for any reason without notice. The information in this document is not a commitment, promise, or legal obligation
to deliver any material, code, or functionality. All forward-looking statements are subject to various risks and uncertainties that could cause actual results to differ materially from expectations. Readers are
cautioned not to place undue reliance on these forward-looking statements, and they should not be relied upon in making purchasing decisions.

SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP SE (or an SAP affiliate company) in Germany and other
countries. All other product and service names mentioned are the trademarks of their respective companies. See www.sap.com/copyright for additional trademark information and notices.

You might also like