PUBLIC
Nicolas Fuchs, SAP SE
December 2018
Integration Framework 2.0 for SAP Business One Example – How to Build a Scenario
2PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ
Scenario Description: HTTP/RESTful Call to SAP Business One
Web Shop
SAP Business
One company
database
Create
Sales Order
Electronic Document
Transmission
Transmit order
details using
RESTful
method
HTTP request with items
to be ordered
Response (status)
3PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ
Definition of Scenario Packages, Scenarios, and Scenario Steps
▪ The scenario package is the software logistics unit.
The package handles a specific business integration case
that belongs to a specific namespace and owner.
▪ Scenarios help to structure the business integration
case, for example, master data synchronization, or order
processing.
▪ A scenario step is the technical unit that performs the
message processing.
At runtime, one step is one transaction. Scenario steps
are processing independent of each other.
4PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ
Integration Framework 2.0 – New Web-Based IDE
Navigation Tree
Design Area
Design Elements
Multiple Tabs
Details Area with ZoomNotification Area
Error Handling
5PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ
Creating a New Package
1
2
Result: sap.MyExample3
Right-Click
6PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ
Creating a New Scenario Step
1 2
Result: sap.CreateB1SalesOrder
4
3 4
Right-Click
Right-Click
7PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ
Change/Adjust the Scenario Package Configuration
▪ Activate “Smart Message Model”
This enables the XML message in the processing flow structured in a smart way:
Structured as in the integration framework version 1, positioning payloads with fixed IDs.
When you apply changes in the processing flow by adding new atoms, all existing mappings
stay the same.
It also allows to reuse existing mappings designed in the integration framework version 1.
▪ Activate “Allow to Trigger Active Instances“
This allows to trigger an active scenario manually, for example, for testing.
Right-Click
8PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ
Adding an Atom for HTTP Inbound – Outbound Call
1. Select atom: IOp / Inbound
Outbound for synchronous call
(request/response).
2. You can change the name of the
atom: for example, “HTTPInbound”.
3. Enlarge “Inbound and Outbound“
screen to add or change the
configuration parameters.
4. Select Adapter Type from the list:
for example, ”HTTP”.
5. Open “Inbound Configuration“
screen and select the required
properties from the “Property List“.
6. Select “bpm.pltype” and enter, for
example, “json” as value, if the
incoming payload format is ‘json’.
7. Outbound Configuration: Check the
value in “pltype”. For example, ’xml’
or ‘json’.
8. Close all configuration screens.
1
2
3
4
5
5
7
6
9PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ
Adding a XSL/JavaScript Transformation Atom for Mappings
1. Select a transformation atom (Xform)
to use XSL/JavaScript for mapping
the sender payload/message handed
over to a valid B1 message.
2. Set Parameters of the XSL/JavaScript
Transformation atom:
Identifier: Name of the Identifier e.g.
‘PrepareB1’
Description: Type in your description
in square brackets for example
‘[PrepareB1]’
Link to Sources: Enter the name of
the XSL or JavaScript file incl. file
format extension (‘xsl’ or ‘js’) which
contains the transformation rule.
This file will be created and is also
accessible via “Sources” in the
navigation menu.
1
2
10PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ
Adding an Adapter Call Atom for SAP Business One
1. Select the " Adapter Call in BizFlow” atom to add
a call atom to the flow.
2. Enlarge the screen “Adapter Call in Bizflow”
settings and enter all relevant information and
parameters:
Identifier: Name of the Identifier, for example,
‘CallB1’
Description: Enter your description in square
brackets, for example, ‘[B1Call]’
XPath Expression: Enter the XPath expression
that points to the payload for the adapter call.
Here, it comes from the previous
XSL/JavaScript transformation atom with the ID
‘PrepareB1’:
‘/vpf:Msg/vpf:Body/vpf:Payload[./@id='Prepare
B1']/Envelope‘
Adapter Type: for example ‘B1DI” for SAP
Business One DI-API Call
pltype is ‘xml’
In the example, we take the B1 system from
SLD, selecting ”sysid”: for example
0010000100
3. Add property “adjustToSmartMSG” from the
“Property List” to support smart messaging:
Value=‘true’
1 2
3
11PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ
Adding a XSL/JavaScript Transformation for the Response Message
1. Select a transformation atom (Xform) to
use XSL/JavaScript to define the http
response message.
2. Set Parameters of the XSL/JavaScript
Transformation atom:
Identifier: Name of the Identifier, for
example, ‘Response’
Description: Enter your description in
square brackets, for example,
‘[Response]’
Link to Sources: Enter the name of the
XSL or JavaScript file incl. file format
extension (‘xsl’ or ‘js’) that contains the
transformation rule.
The file is created and also accessible via
“Sources” in the navigation menu. For
example, ‘Response.xsl’
1
2
12PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ
Closing, Saving, and Checking the Flow
1. Select “Sequence Flow” to close
the flow for Inbound Outbound
for synchronous call.
2. Save the flow design.
3. The response tells you if the flow is
valid and gives you – if available –
also error warnings and information.
4. There is an internal version number
that increases each time when saving
the flow.
1
2 4
3
2
13PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ
Message Example as Payload for the HTTP Call
The JSON example contains a sales order with
header information and an array of 2 lines
containing the order positions
14PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ
Editing the XSL/JavaScript Atom “PrepareB1“
Double-click the „XSL/JavaScript
Transformation“ atom to open
the XML editor
Section to enter the mapping
– XSL or JavaScript
15PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ
Mapping Using XSL for “PrepareB1”
16PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ
Editing the XSL/JavaScript Atom “Response“
Double-click the „XSL/JavaScript
Transformation“ atom to open
the XML editor
Section to enter the mapping
– XSL or JavaScript
17PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ
Example Mapping Using XSL for “Response”
For the response of the HTTP call, you can return any message information.
Define a meaningful return message.
18PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ
Deployment of the Scenario Package
1. Double-click “Deployment Panel” in the Navigation
Tree.
2. Select “ Add Deployment” to create a new
deployment.
3. Check the boxes of the steps you want to activate.
4. Assign the systems from SLD that are part of the
scenarios, for example, SAP Business One system
for the atom “CallB1”.
5. Optional: “Activate with Detailed Logging” if you want
to run the scenario in debugging mode.
6. Activate the package; The icon switches
from to
7. Click URL to display URL of the HTTP call to trigger
this scenario step.
1
2
3 4
5
6
7
19PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ
Testing the Scenario with Advanced REST Client
1
Select, for example, “Advanced REST
Client” – or any other testing tool – as the
tool to test HTTP calls
1. Change the method to ‘POST’.
2. Paste the URL copied from the scenario
deployment.
3. Change the “Body content type” to
‘application/json’.
4. Enter/paste the JSON content
representing the sales order to be
created in SAP Business One.
5. Press “SEND”.
2
3
4
5
20PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ
Monitoring – Check Transaction Monitor
1. Switch to “Monitoring”
2. Select “Transaction Monitor” from
the menu
3. Check the status of the transaction
1
2
3
Thank you.
Nicolas Fuchs
Global SME Integration
SAP SE
Dietmar-Hopp-Allee 16
69190 Walldorf/Baden
Germany
P +49 6227 7 67177
M +49 172 6279281
© 2018 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
warranty 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 document 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 platforms, 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.
www.sap.com/contactsap
Follow us