Integration Framework of SAP Business One Introduction to Creating

39 Slides2.97 MB

Integration Framework of SAP Business One Introduction to Creating Scenarios for SAP Business One 03, 2015 INTE RNA L

Objectives At the end of this course, you will be able to: Describe the general process for designing and creating a new integration scenario package Follow the steps to create a simple scenario package that converts an inbound SAP Business One object to a file outbound 2015 SAP SE or an SAP affiliate company. All rights reserved. 2

Overall Scenario Design Process Step 1: Analyze the Integration Requirement Step 2: Translate the Business Process Model into a Scenario Design Step 3: Define the Scenario Package and Steps Step 4: Write the Data Transformation Statements Step 5: Activate and Test the Scenario Steps Step 6: Transport the Scenario Package to the Production Environment 2015 SAP SE or an SAP affiliate company. All rights reserved. 3

Step 1: Analyze the Integration Requirement

Step 1: Case Analysis The requirement will involve the exchange of data between two systems Before creating the scenario package, analyze and model the business process Based on the model, identify the parts to be implemented in the integration framework – this requires a good knowledge of the functions and capabilities of the integration framework 2015 SAP SE or an SAP affiliate company. All rights reserved. 5

Step 2: Translate the Model to a Scenario Package Design

Step 2: Scenario Design A scenario package can contain one or more steps. A step models a specific interaction between two systems These interactions can be synchronous or asynchronous, and you can have a mix of synchronous or asynchronous steps 2015 SAP SE or an SAP affiliate company. All rights reserved. Asynchronous example: SAP Business One object transformed to an output file Synchronous example: Web service that adds or updates an SAP Business One object using a call atom. The response is returned back to the Web service 7

Step Design Decide how the step will be triggered, which system types communicate with each other, how the integration framework will transform the message, and what other processing will occur, such as calls to external systems Inbound Processing Outbound In this step example: The sales order created in SAP Business One triggers the integration processing The inbound adapter is SAP Business One The processing is a single atom which transforms the retrieved B1 object into the file format The outbound adapter type is a flat file 2015 SAP SE or an SAP affiliate company. All rights reserved. 8

Step 3: Create the Scenario Package and Steps

BizStore Naming Convention Path: http://localhost:8080/B1iXcellerator/exec/webdav All scenario components are stored in the BizStore database of the integration framework Scenario packages are identified with the prefix vPac Scenario steps are identified with the prefix vBIU (Business Integration Unit) Scenario Step Example: Scenario Package vBIU.sapB1PO2B1S O vPac.sap.ICPurchasing Scenario Step vBIU.sapB1SO2B1PO 2015 SAP SE or an SAP affiliate company. All rights reserved. 10

Scenario Package Creation - Process Scenario Package Scenario Step Inbound Processing Outbound Create a new scenario Define scenario step and associate to scenario package For each scenario step: Define the Inbound channel and retrieval mode Define the Processing (flow and transformation atoms, and prepare XSLT statements for the output file format Define the Outbound channel 2015 SAP SE or an SAP affiliate company. All rights reserved. 11

Create Scenario Package Scenario Package Path: Scenarios Package Design 1. 2. Select the icon to create a new package 2 Enter a name for the package 1 2015 SAP SE or an SAP affiliate company. All rights reserved. 12

Scenario Step Define Scenario Step Path: Scenarios Step Design 1. Select the icon to create a new step 2. Select the Package name 3. Enter the step name 4. Proceed to define the Inbound, Processing and Outbound for the step by selecting the buttons 2015 SAP SE or an SAP affiliate company. All rights reserved. 2 3 4 1 13

Step Inbound Definition 1. To define the Inbound for the step, select the Channel button 2. For a B1 to File scenario step, select the Inbound Channel and the Retrieval fields from the dropdown lists, as shown here Inbound 1 2 3 2015 SAP SE or an SAP affiliate company. All rights reserved. 14

Step Outbound Definition Outbound To define the Outbound for the step, select the Outbound button in step setup: 1. For a B1 to File Outbound scenario, select the Outbound Channel fields from the dropdown lists, as shown here 2. Select the Details button then select the Outbound File Formatting fields from the dropdown lists, as shown here 1 2015 SAP SE or an SAP affiliate company. All rights reserved. 2 15

Step Processing Processing To define the Processing for the step, select the Processing button in step setup: The BizFlow diagram for the step opens with a default process flow (atom0) This final atom will transforms the input XML message into a file structure for the outbound phase No other atoms are needed for this scenario 2015 SAP SE or an SAP affiliate company. All rights reserved. At runtime, the input message to the atom contains the sales order object 16

Step 4: Write the Data Transformation Statements

Example Message Structure The XML message that the integration framework processes from one flow atom to the next contains various sections that are transformed along the way Trigger - B1 Event coming from the table SEVT Sender message – object fields Receiver message for handover to the outbound channel 2015 SAP SE or an SAP affiliate company. All rights reserved. 18

Data Transformation For the B1 to File scenario, you need to define transformation statements for the final atom In these statements you define the flat file structure for the outbound phase Since the flat file fields are based on the input object, you can view the object by running a test to generate the payload section “S” of the message After you write the transformation statements the final atom will add section “R” to the message 2015 SAP SE or an SAP affiliate company. All rights reserved. XML Message Payload section “S” with inbound object structure Payload sections “R” with flat file fields for the outbound phase 19

Step 5: Activate and Test

Define Inbound System Path: SLD Before activating the scenario, define the systems for the scenario package inbound and outbound phases Example: For the B1 object to file scenario, select an SAP Business One database from the SLD list Use the Test Connection button to test connectivity 2015 SAP SE or an SAP affiliate company. All rights reserved. 21

Define Outbound System Path: SLD Create System In the SLD, define the systems for the scenario package Example: For the B1 object to file scenario: 1. Create a new system based on system type F.AnySystem 2. Predefine the folders and enter file patterns for the FILI and FILO folders on the receiver system 1 2 3 2015 SAP SE or an SAP affiliate company. All rights reserved. 3. Note: If you include the pattern ? in the file name, the integration framework will increment the value each time, starting from 0000 22

Activate the Scenario for Testing Path: Scenarios Setup There are two ways to activate the scenario: Run the setup wizard, or Manually select the sender and receiver systems, then choose Activate Run the setup wizard 2015 SAP SE or an SAP affiliate company. All rights reserved. 23

Data Transformation Steps For this B1 to File example, you still need to write the data transformation statements to convert the object to a flat file: 1. Trigger the step by creating a sales order 2. Open the XML message from the message log. In the payload “S” section you will see the object structure 3. In the BizFlow diagram, open the XSL file for the final atom and add your XSLT statements 4. Rerun the test. When the final atom runs, the XML message payload “R” sections are completed 2015 SAP SE or an SAP affiliate company. All rights reserved. XML Message Payload section “S” with inbound object structure atom0.xsl Payload sections “R” with flat file fields for the outbound phase 24

Test the Scenario Step and Open the Message Log Path: Monitoring Message Log After you create a sales order, view the message log display In the log, choose the message icon to open the XML 2015 SAP SE or an SAP affiliate company. All rights reserved. 25

View the XML Message from the Message Log In the Payload Role “S” section you can see the DI API field names for the sales order object: BOM/BO/Documents contains the header fields BOM/BO/Document Lines contains the row fields Note: Note: to to view view the the message, message, set set the the Log Level parameter to “Full message” Log Level parameter to “Full message” in in the the Maintenance Maintenance Cfg Cfg MsgLog MsgLog tab tab 2015 SAP SE or an SAP affiliate company. All rights reserved. 26

Preparing the XSLT Statements -1 The basic XSLT for a flat file is to define a Fileout tag and within this tag define the rows and columns that will appear in the delimiter separated file You can find this schema documented in the integration framework help by searching using the keyword “schemas” 2015 SAP SE or an SAP affiliate company. All rights reserved. 27

Preparing the XSLT Statements - 2 In the Fileout tag, add the XSL elements for data transformation: To select each row of the sales order, use the xsl:for-each element To extract the value of a field, use the xsl:value-of element For more information, go to www.w3schools.com/xsl/ Fileout xmlns "" type "file" xsl:for-each select " msg/BOM/BO/Document Lines/*" row col xsl:value-of select " msg/BOM/BO/Documents/row/DocNum" /xsl:value-of /col col xsl:value-of select " msg/BOM/BO/Documents/row/CardCode" /xsl:value-of /col col xsl:value-of select " msg/BOM/BO/Documents/row/CardName" /xsl:value-of /col col xsl:value-of select " msg/BOM/BO/Documents/row/DocDueDate" /xsl:value-of /col col xsl:value-of select "ItemCode" /xsl:value-of /col col xsl:value-of select "Quantity" /xsl:value-of /col col xsl:value-of select "Price" /xsl:value-of /col /row /xsl:for-each /Fileout 2015 SAP SE or an SAP affiliate company. All rights reserved. 28

XSL File for Atom0 Open the BizFlow diagram by selecting the Processing button in the scenario step definition Double-click the final atom to open the predefined XSL file atom0.xsl The xsl: template name “transform section is where you will put the XSLT statements 2015 SAP SE or an SAP affiliate company. All rights reserved. 29

Insert the Transformation Statements Insert the XSLT statements between the transform template tags Follow the object structure to select the values from the object fields Fileout xmlns "" type "file" xsl:for-each select " msg/BOM/BO/Document Lines/*" row col xsl:value-of select " msg/BOM/BO/Documents/row/DocNum" /xsl:value-of /col col xsl:value-of select " msg/BOM/BO/Documents/row/CardCode" /xsl:value-of /col col xsl:value-of select " msg/BOM/BO/Documents/row/CardName" /xsl:value-of /col col xsl:value-of select " msg/BOM/BO/Documents/row/DocDueDate" /xsl:value-of /col col xsl:value-of select "ItemCode" /xsl:value-of /col col xsl:value-of select "Quantity" /xsl:value-of /col col xsl:value-of select "Price" /xsl:value-of /col /row /xsl:for-each /Fileout 2015 SAP SE or an SAP affiliate company. All rights reserved. 30

Rerun the Test and Check the Message Path: Monitoring Message Log From the message log, retry the message 2015 SAP SE or an SAP affiliate company. All rights reserved. 31

View the Final XML Message Open the XML message again from the message log If the transformation has worked you will see the row and column structure for the selected fields in the Payload Role “R” section of the message 2015 SAP SE or an SAP affiliate company. All rights reserved. 32

Outbound File The outbound file is located in the outbound folder defined in the SLD entry for the receiver system 2015 SAP SE or an SAP affiliate company. All rights reserved. 33

Step 6: Export the Scenario Package to the Production Environment

Documentation Path: Tools Control Center Maintenance BizStore Upload To include documentation with the scenario package: Create the document in pdf format with the file name vPac.pdf Save the document to the vPac folder of the scenario in the BizStore Include the document with the final export zip package. 2015 SAP SE or an SAP affiliate company. All rights reserved. 35

Export the Scenario Package Path: Scenarios Export To transport the scenario package, create an export file You can include scenario packages, scenario steps, documentation and test messages in the export file 2015 SAP SE or an SAP affiliate company. All rights reserved. 36

Summary In this course, you learned a basic process for developing a scenario package that involves SAP Business One: Step 1: Analyze the Integration Requirement Step 2: Translate the Business Process Model into a Scenario Design Step 3: Define the Scenario Package and Steps Step 4: Write the Data Transformation Statements Step 5: Activate and Test the Scenario Step 6: Transport the Scenario Package to the Production Environment 2015 SAP SE or an SAP affiliate company. All rights reserved. 37

Thank You! For more information visit SDN at http://sdn.sap.com

2015 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. 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. Please see http://global12.sap.com/corporate-en/legal/copyright/index.epx for additional trademark information and notices. 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 SE or its affiliated companies shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP SE 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 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 forwardlooking 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, which speak only as of their dates, and they should not be relied upon in making purchasing decisions. 2015 SAP SE or an SAP affiliate company. All rights reserved. 39

Back to top button