sap-XI.pdf

June 11, 2018 | Author: Garima Ajmani | Category: Web Service, Soap, Technology, World Wide Web, Proxy Server
Report this link


Description

SAP XI End to End Scenario ImplementationSubmitted to By Mukeshlal Parida & Kannan Kailas Version 1.12 Copyright Infosys Page 1 of 36 SAP XI End to End Scenario DOCUMENT INFO Created by Created On Current ownership Reviewed by Contributions from Project Purpose Mukeshlal Parida, Kannan Kailas 09/Nov/2005 Mukeshlal Parida, Kannan Kailas Manish Agrawal Mukeshlal Parida, Kannan Kailas BPNAEAIE BoK DOCUMENT HISTORY Ver 1.0 DD/MM/YYYY 10/11/2005 1.1 11/11/2005 Author Mukeshlal Parida Kannan Kailas Mukeshlal Parida Reviewer Manish Agarwal Aditya Pratap Singh Manish Agrawal Description Version 1.12 INFOSYS Technologies Ltd Page 2 of 36 SAP XI End to End Scenario TABLE OF CONTENTS 1 2 DECLARATION ...................................................................................................................................... 4 INTRODUCTION .................................................................................................................................... 5 2.1 2.2 3 OVERVIEW .......................................................................................................................................... 5 INTENDED READERS ............................................................................................................................ 5 SAP XI LANDSCAPE ............................................................................................................................. 6 3.1.1 3.1.2 Introduction ............................................................................................................................... 6 SAP XI Architecture ................................................................................................................. 6 4 WEB SERVICE TO RFC SCENARIO .................................................................................................. 9 4.1 INTERFACE LANDSCAPE ...................................................................................................................... 9 4.2 STEP BY STEP APPROACH FOR WEB SERVICE TO RFC SCENARIO...................................................... 10 4.2.1 System Landscape Directory .................................................................................................... 10 4.2.2 Integration Repository .............................................................................................................. 10 4.2.3 Integration Directory................................................................................................................ 13 4.2.4 Sender System ........................................................................................................................... 15 4.2.5 Receiver system......................................................................................................................... 15 4.2.6 Unit Testing .............................................................................................................................. 15 5 HTML TO WEB SERVICE SCENARIO ............................................................................................ 16 5.1 INTERFACE LANDSCAPE .................................................................................................................... 16 5.2 STEP BY STEP APPROACH FOR HTML TO WEB SERVICE SCENARIO .................................................. 16 5.2.1 System Landscape Directory .................................................................................................... 16 5.2.2 Integration Repository .............................................................................................................. 16 5.2.3 Integration Directory................................................................................................................ 19 5.2.4 Sender Service .......................................................................................................................... 21 5.2.5 Receiver Service........................................................................................................................ 22 5.2.6 Unit Testing .............................................................................................................................. 22 6 FILE TO DATABASE USING BPM .................................................................................................... 23 6.1 INTERFACE LANDSCAPE .................................................................................................................... 23 6.2 STEP BY STEP APPROACH FOR FILE TO DATABASE SCENARIO USING BPM ....................................... 23 6.2.1 System Landscape Directory .................................................................................................... 23 6.2.2 Integration Repository .............................................................................................................. 24 6.2.3 Integration Directory................................................................................................................ 25 6.2.4 Unit Testing .............................................................................................................................. 25 Version 1.12 INFOSYS Technologies Ltd Page 3 of 36 this document does not contain any material that infringes upon the copyrights of any other individual or organization including the customers of Infosys. Project Details Project Code Description Client Architect : : : : SYNGENTA XI POC This was the SAP XI PoC that was demonstarted to the Client SYNGENTA – Switzerland Manish Agarwal & Paparao K V Project Code Description Client Project Manager Architect : : : : : BPNAEAIE BPNGL (Natural Gas Liquids) British Pertoleum – USA Aditya Pratap Singh Manish Agarwal Version 1.12 INFOSYS Technologies Ltd Page 4 of 36 . details of which have been mentioned below. To the best of our knowledge.SAP XI End to End Scenario 1 DECLARATION It is hereby declared that this document is based on the development done for the project. 2 Intended Readers This is intended for all those who are familiar with the basics of “SAP XI” and wants to learn and configure complex scenarios. 2. In this BOK we have given details of how to configure scenarios.1 Overview For the first time we did a PoC in SAP XI for client SYNGENTA. Version 1. which integrates the core SAP system to a number of third party legacy systems spread across different networks. In this we have successfully demonstrated five complex scenarios along with maturity assessment and product capabilities.12 INFOSYS Technologies Ltd Page 5 of 36 .SAP XI End to End Scenario 2 INTRODUCTION 2. The OneNGL (British Petroleum) USA. happened to be the first middleware implementation project in “SAP XI”. WSDL. 3.12 INFOSYS Technologies Ltd Page 6 of 36 . SAP XI is open and flexible and is based on open standards like XML (XSD).1 Introduction SAP is the core system and it interacts with a host of external systems via the Middleware layer SAP Exchange Infrastructure (SAP XI). for asynchronous and synchronous communication and cross component business process management. SAP XI is much more than a simple Integration tool.2 SAP XI Architecture Development Time Component Runtime Component Integration Builder Central Monitoring Tool (RWB) Integration Server Business Process Engine Integration Repository (IR) Integration Directory (ID) SAP System 3 Party System rd Integration Engine 3 Party Middleware component rd Adapter Engine System Landscape Directory (SLD) The main components of SAP XI are > Integration Builder > Integration Repository (Designer for development) > Integration Directory (Configuration) > Integration Server (Runtime Component) Version 1. It is used for integrating SAP and non-SAP applications. BPEL and SOAP messaging for describing objects and communicating with other systems. for A2A and B2B integration.1.SAP XI End to End Scenario 3 SAP XI LANDSCAPE 3. It can execute business processes across business applications.1. XI will instantiate a new message for each receiver. Request Message Mapping: Call the mapping program to transform the message structure to the receiver format. Interface Determination: For each receiver system determine which interfaces should receive a message. IDOC or RFC is considered as inbound message. The different pipeline steps are. Receiver Identification: Determine which systems should participate in an exchange with the incoming message.SAP XI End to End Scenario > Integration Engine > Business Process Engine > Adapter Engine > Central Monitoring Tool > System Landscape Directory Message Flow: XI connects various applications via XML messaging using SOAP protocol. Messages received at the IS are processed through a defined series of steps called Pipeline Services.12 INFOSYS Technologies Ltd Page 7 of 36 . Call Adapter: Send the transformed message to the adapter or proxy. Version 1. Technical Routing: Bind a specific destination and protocol to the message. Inbound: Message going out of SAP XI system to external systems in the form of files. Interfaces are classified based on Direction with respect to the SAP XI system. Outbound: All interfaces for which data in the form of files or IDOC or RFC messages is received by the middleware from the external systems are considered to be “outbound” interfaces. Message Branch: If multiple receivers are found. Also establishes connectivity with XI Integration server. So proxies are adapter less communication with XI. In the Integration Server the message is converted into the target structure after applying the necessary business logic. Version 1. The receiver adapter will convert the XML message into application specific message format. A proxy is a fragment of code in ABAP or Java which converts incoming message into XML and vice versa. Adapters after receiving message converts it into XML format and send it to IS. PCK is deployed at the client side and natively communicates with SAP XI using XI message protocol.20 or above can directly communicate with XI using proxies.SAP XI End to End Scenario Messages coming into XI are called as inbound message and going out of XI is called as outbound message.12 INFOSYS Technologies Ltd Page 8 of 36 . SAP applications based on WAS 6. Partner Connectivity Kit: Enabling smaller companies and subsidiaries to exchange XML documents with their business partner’s/ headquarters’ SAP XI infrastructure. Adapter Engine: SAP XI adapters are based on Java connector architecture (JCA). SAP XI End to End Scenario 4 WEB SERVICE TO RFC SCENARIO 4. TIBCO makes a Web service call to the XI service provider. SAP R/3 system sends a response back to XI which in turn is sent back to TIBCO web service client. After processing the data TIBCO sends the data to SAP R/3 system using XI. Version 1.12 INFOSYS Technologies Ltd Page 9 of 36 . So XI exposes an interface as a Web service which becomes a service provider.1 Interface Landscape TIBCO Web Service client SAP R/3 XI EPSILON system is sending data to TIBCO. The communication between TIBCO and XI is though Web Service call. After processing the message XI makes an RFC call to R/3 system. It has the below structure.1 System Landscape Directory In the SLD create the following components in order. Step2 After importing it select it from the navigation bar and right click on it to create a namespace http://infosys.2 Step by Step Approach for Web Service to RFC Scenario To configure the Web Service to RFC (SAP R/3) scenario follow the following steps 4.12 INFOSYS Technologies Ltd Page 10 of 36 .2.2. EPSILON IDESDEV_600 4. Step 1 Under Software Catalog create software component and Product Step 2 Under Technical Landscape create technical systems Step 3 Under Business Landscape create two business systems.com/demo/webservice_scenario for EPSILON business system and http://infosys.SAP XI End to End Scenario 4. FinancialRequest_dt Structure Header OrderID DateofCreation Company BodyItem Type Quantity Price DeliveryDate Element Element Element Element Element String String String String String Category Element Element Element Type String Occurrence 1:1 1:1 1:1 1:1 1:N 0:1 0:1 0:1 0:1 Version 1. Step3 Under the above namespace -> Interface Objects-> Data Types right click and create ‘FinancialRequest_dt’ and ‘FinancialResponse_dt’.com/demo/IDESDEV_600 for IDESDEV_600 and save it. Step1 From the menu bar. Tools -> Transfer from SLD-> Import software component versions Select the software component ‘INFOSYS_EPSILON’ and import it.2 Integration Repository In the Integration Repository (Designer) create the following objects. ”.Response Structure I_RETURN Item TYPE ID NUMBER MESSAGE LOG_NO LOG_MSG_NO Category Element Element Element Element Element Element Element Element Type Occurrence 0:1 0:N String String String String String String 0:1 0:1 0:1 0:1 0:1 0:1 Version 1. In this select category as Outbound and Mode as Synchronous. Right click on it which will lunch a wizard in which provide the details to connect to the R/3 system and import the RFC “ZBAPI_EPSILON_Finance”.SAP XI End to End Scenario FinancialResponse_dt Structure Return item OrderID Status Category Element Element Element Element Type String String String String Occurrence 1:1 0:N 0:1 0:1 Step4 Under Message Types right click and create ‘FinancialRequest_mt’ and select the data type as ‘FinancialRequest_dt’ and ‘FinancialResponse_mt’ and select the data type as ‘FinancialResponse_dt’. Under this software component and under Imported Objects RFCs and IDocs can be imported.12 INFOSYS Technologies Ltd Page 11 of 36 . Step5 Under Message Interfaces right click and create ‘Financial_SYNC_OB’. In this select Output message as ‘FinancialRequest_mt’ and Input message as ‘FinancialResponse_mt’. Step6 While downloading the software component from SLD select the option “Import of RFC and IDoc Interfaces from SAP Systems Permitted. It has the below structure. ZBAPI_EPSILON_Finance Structure S_EPHDR SAPTDID DSTDAT COMCOD Category Element Element Element Element Element TYPE QUANTITY PRICE MODDAT Element Element Element Element Type String String Date String String String String String Date Occurrence 1:1 1:1 1:1 1:1 1:N 0:1 0:1 0:1 0:1 I_EPITM ZBAPI_EPSILON_Finance. Save it. Select ‘ZBAPI_EPSILON_Finance. MM_ZBAPI_EPSILON_FinanceResponse_To_FinancialResponse_mt Source Message Type Element Target Message Type Element Functions to be used FinancialRequest_mt Return item OrderID Status ZBAPI_EPSILON_Finance I_RETURN Item ID MESSAGE Step8 Under Interface Mappings create “IM_Financial_SYNC_OB_TO_ZBAPI_EPSILON_Finance” and select Source Interface as Financial_SYNC_OB and target interface as ZBAPI_EPSILON_Finance and request mapping as MM_FinancialRequest_mt_To_ZBAPI_EPSILON_Finance and response mapping as MM_ZBAPI_EPSILON_FinanceResponse_To_FinancialResponse_mt Version 1.Response’ as the source message and ‘FinancialResponse_mt’ as the target message. Select the messages tab and select ‘FinancialRequest_mt’ under Source Messages and ‘ZBAPI_EPSILON_Finance’ Under Target Messages.SAP XI End to End Scenario Step7 Under Mapping Objects-> Message Mappings right click and create “MM_FinancialRequest_mt_To_ ZBAPI_EPSILON_Finance”. MM_FinancialRequest_mt_To_ ZBAPI_EPSILON_Finance Source Message Type Element Target Message Type Element Functions to be used FinancialRequest_mt Header OrderID DateofCreation Company BodyItem Type Quantity Price DeliveryDate ZBAPI_EPSILON_Finance S_EPHDR SAPTDID DSTDAT COMCOD I_EPITM TYPE QUANTITY PRICE MODDAT Create another message mapping “MM_ZBAPI_EPSILON_FinanceResponse_To_ FinancialResponse_mt”.12 INFOSYS Technologies Ltd Page 12 of 36 . Under the Design tab do the following mapping. Step2 Under business system EPSILON create a communication channel called “SOAP_SND_EPSILON_Financial_001” and under IDESDEV_600 create “RFC_RCV_SAP_001”. Step1 Select Service Without Party-> Business System.SAP XI End to End Scenario 4. Step3 Configure SOAP_SND_EPSILON_Financial_001 as below.3 Integration Directory In the Integration Directory from the menu bar select Object-> New and create a scenario called “INFY_WebService_TO_BAPI” and save it. Right click and select business systems EPSILON and IDESDEV_600.2.12 INFOSYS Technologies Ltd Page 13 of 36 . Version 1. Sender Service: EPSILON Receiver Service: IDESDEV_600 Version 1. Step5 Create sender agreement with following parameters.SAP XI End to End Scenario Step4 Configure RFC_RCV_SAP_001 as below.com/demo/webservice_scenario Receiver Service: IDESDEV_600 Sender Communication Channel: SOAP_SND_EPSILON_Financial_001 Create receiver agreement with following parameters. Sender Service: EPSILON Interface: Financial_SYNC_OB Namespace: http://infosys.12 INFOSYS Technologies Ltd Page 14 of 36 . Sender Service: EPSILON Interface: Financial_SYNC_OB Namespace: http://infosys. This will give http://blrkecsaptst2:8000/sap/xi/engine?type=entry. Click send.com/ . Install this in your machine and import the WSDL file.2. Then you will get the response back from the SAP R/3 system. This WSDL will have both request and response structure.2. We have to create the RFC ZBAPI_EPSILON_Finance in SAP system which will be downloaded within the Integration Repository. From the menu bar of the SOAP Scope select Invoke.6 Unit Testing For testing we need to have TIBCO system acting as Sender and SAP R/3 as receiver. This will show you the input parameters.com/demo/webservice_scenario Receiver Party: * Service: * and in Configured Receivers select service as IDESDEV_600.com/demo/webservice_scenario Receiver Service: IDESDEV_600 and select Inbound Interface ZBAPI_EPSILON_Finance and Interface Mapping as IM_Financial_SYNC_OB_TO_ZBAPI_EPSILON_Finance. Step8 From the menu bar select Tools-> Define Web Service >Under specify URL select propose URL. Basically this the URL of the XI server. 4. Save it. Step7 Create Receiver Determination and use the below objects. 4. Otherwise we can use another Web Service client called SOAP Scope which can be downloaded from http://www.4 Sender System Import the WSDL file created in the above step in the TIBCO which will act as web service client.2.5 Receiver system Here the SAP R/3 system is the receiver system. >Specify the sender Service: EPSILON Interface: Financial_SYNC_OB Namespace: http://infosys. Version 1.mindreef.SAP XI End to End Scenario Interface: ZBAPI_EPSILON_Finance Namespace: http://infosys. 4.com/demo/IDESDEV_600 Receiver Communication Channel: RFC_RCV_SAP_001 Step6 Create Interface Determination and use the below objects. >Select the interface Financial_SYNC_OB.12 INFOSYS Technologies Ltd Page 15 of 36 . Fill the input prams and give authentication details (username and password to connect to SAP XI server). Sender Service: EPSILON Interface: Financial_SYNC_OB Namespace: http://infosys.com/demo/webservice_scenario Save it and it will generate the WSDL file. 2.1 Interface Landscape HTML Request Web Service Request Web Service HTML Client HTML Response XI Web Service Response This scenario can be modified in a number of ways using complex BPM to meet the real life requirements like alerting support issues by SMS.2. Here HTML client sends data through XI to make a Web Service call. Web service will also send a response back to HTML client about the status of the call. Step1 From the menu bar. But for learning prospective we will configure it to see how data can be sent from HTML to web service and get the response back and send SMS from the web service. Create a generic software component in SLD called “Infosys_HTML_WebService”.com/demo/HTML for HTML_BS business service and Version 1. 5.1 System Landscape Directory No need to configure any business systems in the SLD as we will use Business service for both HTML and Web Service. Here we will call a SMS web service which will send SMS to the concerned people depending on some business logic.SAP XI End to End Scenario 5 HTML TO WEB SERVICE SCENARIO This scenario involves calling a web service from HTML client using SAP XI as middleware.2 Step by Step Approach for HTML to Web Service scenario To configure the HTML to Web Service scenario follow the following steps 5. Tools -> Transfer from SLD-> Import software component versions Select the software component ‘Infosys_HTML_WebService’ and import it.2 Integration Repository In the Integration Repository (Designer) create the following objects. Step2 After importing it select it from the navigation bar and right click on it to create a namespace http://infosys.12 INFOSYS Technologies Ltd Page 16 of 36 . 5. This web service will send a SMS based on some condition/business logic to the concerned people. 5. So XI acts as a web service client on behalf of HTML client and makes the web service call. Step3 Under namespace ‘http://infosys.net/SendSMS.com/demo/SMSWebService for SMSWebService_BS and save it. In this select Output message as ‘SupportRequest_mt’ and Input message as ‘SupportResponse_mt’. PFA of the file here of you can download it from “http://www. Save it. In this select category as Inbound and Mode as Synchronous. Step5 Under Message Interfaces right click and create ‘SupportMessage_SYNC_OB’. browse and select the WSDL file.webservicex.12 INFOSYS Technologies Ltd Page 17 of 36 . Version 1. Interface Objects-> External Definitions right click and create an object called SMSWebService. SupportRequest_dt Structure Header ReceiptantMobileNumber FromEmailAddress BodyItem Message DeliveryDate Category Element Element Element Element Element Element Type String String Occurrence 1:1 1:1 1:1 1:N String String 0:1 0:1 SupportResponse_dt Structure MessageStatus FromEmailAddress ReceiptantMobileNumber Element Element Element Element Element String String String String String 0:1 0:1 0:1 0:1 0:1 Category Type Occurrence Provider State Status Step4 Under the namespace ‘http://infosys. In this select Input message as ‘SendSMSToIndiaSoapIn’ and Output message as ‘SendSMSToIndiaSoapOut’. Step6 Under namespace http://infosys.SAP XI End to End Scenario http://infosys. right click on Message Types and create ‘SupportRequest_mt’ and select the data type as ‘SupportRequest_dt’ and ‘SupportResponse_mt’ and select the data type as ‘SupportResponse_dt’. In the File.com/demo/HTML’ Interface Objects-> Data Types right click and create ‘SupportRequest_dt’ and ‘SupportResponse_dt’.com/demo/SMSWebService. In this select category as Outbound and Mode as Synchronous. It has the below structure.asmx Step7 Create Message Interface called “SendSMSToIndia_SYNC_IB”.asmx?WSDL” SendSMS.com/demo/HTML’. MM_SendSMSToIndiaSoapOut_To_SupportResponse_mt Source Message Type Element Target Message Type Element Functions to be used SendSMSToIndiaReponse SendSMSToIndiaResult FromEmailAddress MobileNumber Provider State Status SupportResponse_mt MessageStatus FromEmailAddress ReceiptantMobileNumber Provider State Status Step8 Under Interface Mappings create “IM_SupportMessage_SYNC_OB_To_SendSMSToIndia_SYNC_IB” and select Source Interface as SupportMessage_SYNC_OB and target interface as SendSMSToIndia_SYNC_IB and request mapping as MM_SupportRequest_mt_To_ SendSMSToIndiaSoapIn and response mapping as MM_SendSMSToIndiaSoapOut_To_SupportResponse_mt Version 1. Mapping Objects-> Message Mappings right click and create “MM_SupportRequest_mt_To_ SendSMSToIndiaSoapIn”.com/demo/HTML. Under the Design tab do the following mapping. MM_SupportRequest_mt_To_ SendSMSToIndiaSoapIn Source Message Type Element Target Message Type Element Functions to be used SupportRequest_mt Header ReceiptantMobileNumber FromEmailAddress BodyItem Message SendSMSToIndia MobileNumber FromEmailAddress Message Use concat with delimiter as “ on: “ For concating Message and DeliveryDate and map it to Message on the target side. DeliveryDate Create another message mapping “MM_SendSMSToIndiaSoapOut_To_SupportResponse_mt”.12 INFOSYS Technologies Ltd Page 18 of 36 . Select ‘SendSMSToIndiaSoapOut’ as the source message and ‘SupportResponse_mt’ as the target message. Select the messages tab and select ‘SupportRequest_mt’ under Source Messages and ‘SendSMSToIndiaSoapIn’ Under Target Messages.SAP XI End to End Scenario Step8 Under namespace http://infosys. Under SMS_Service configure SOAP_RCV_SendSMS_001 communication channel. They reside directly on SAP ABAP engine and part of ICF service. P. So no need to configure sender communication channel for these adapters.3 Integration Directory In the Integration Directory from the menu bar select Object-> New and create a scenario called “INFY_HTML_TO_WebService” and save it.SAP XI End to End Scenario 5.2.S: This is because HTTP and IDOC adapters are not part of SAP J2EE engine. Step2 Configure the business services HTML_Service and SMS_Service with Receiver as SendSMSToIndia_SYNC_IB and Sender as SupportMessage_SYNC_OB and save it. No need to configure sender communication channel for HTTP adapter. Right click create business services HTML_Service and SMS_Service. Also we don’t have to define any sender agreement for these adapters. Version 1. Step1 Select Service Without Party-> Business Service.12 INFOSYS Technologies Ltd Page 19 of 36 . Sender Service: HTML_Service Receiver Version 1. In the configure proxy option give proper host and port.SAP XI End to End Scenario Step3 Configure SOAP_RCV_SendSMS_001 communication channel as below. In the example I have given Bangalore DC host and port.12 INFOSYS Technologies Ltd Page 20 of 36 . Step4 Create receiver agreement with following parameters. Give your Infosys login username and password. Sender Service: HTML_Service Interface: SupportMessage_SYNC_OB Namespace: http://infosys. Sender Interface and Sender Namespace. Save it.4 Sender Service The HTML client is XI_httpClient.html . ----------------------------------------------------------------------------------------------------<?xml version="1.Restart it. 5. Please solve the issue.com/demo/HTML"> <Header> <ReceiptantMobileNumber>9845469318</ReceiptantMobileNumber> <FromEmailAddress>[email protected] INFOSYS Technologies Ltd Page 21 of 36 . And XI username and password to connect to XI server.0" encoding="UTF-8"?> <ns:SupportRequest_mt xmlns:ns="http://infosys.2. The server is down. In the payload put this structure.com</FromEmailAddress> </Header> <BodyItem> <Message>Hi.com/demo/HTML Receiver Service: SMS_Service and select Inbound Interface SendSMSToIndia_SYNC_IB and Interface Mapping as IM_SupportMessage_SYNC_OB_To_SendSMSToIndia_SYNC_IB. Sender Service: HTML_Service Interface: SupportMessage_SYNC_OB Namespace: http://infosys. Step6 Create Receiver Determination and use the below objects.com/demo/HTML Receiver Party: * Service: * and in Configured Receivers select service as SMS_Service.com/demo/SMSWebService Receiver Communication Channel: SOAP_RCV_SendSMS_001 Step5 Create Interface Determination and use the below objects.</Message> <DeliveryDate>25/10/2005</DeliveryDate> </BodyItem> </ns:SupportRequest_mt> Version 1.SAP XI End to End Scenario Service: SMS_Service Interface: SendSMSToIndia_SYNC_IB Namespace: http://infosys. Give correct Sender Service. If there is any error that can be resolved using the monitoring tool.webservicex.2. The web service is already available in the Internet.net/SendSMS.2. The message flow can be monitored using transaction SXMB_MONI. 5. provided and a response message will be displayed in the HTML client.5 Receiver Service Here the http://www. Version 1.12 INFOSYS Technologies Ltd Page 22 of 36 .6 Unit Testing For testing use the attached HTML client. This will send SMS and will send the status response back to the sender service.asmx?op=SendSMSToIndia is the receiver business service. SMS will be sent to the mobile no.SAP XI End to End Scenario 5. In the HTML client give proper information and click send. 12 INFOSYS Technologies Ltd Page 23 of 36 . Step 1 Under Software Catalog create software component FILE_WORKSHOP and DB_WORKSHOP and corresponding Products.2. XI polls that particular directory every 15 min.2 Step by Step Approach for File to Database Scenario using BPM To configure the File to Database scenario using BPM for the above requirement follow the following steps 6. FILE_DEV DB_DEV Version 1. After uploading the stored proc will return back the status of the execution like the number of records update or inserted in the table. This is basically a Async-Sync communication.SAP XI End to End Scenario 6 FILE TO DATABASE USING BPM 6. After uploading or inserting data into table stored proc returns the status to XI. This status data will be written in a file. Data is sent from XI to database using JDBC adapter where the Proc is executed. So we have to use BPM here to capture the data coming back from stored proc to XI and writing it to a file. Step 3 Under Business Landscape create two business systems.1 System Landscape Directory In the SLD create the following components in order. 6.1 Interface Landscape Async Communication FILE System Business Data Dir A Status Report XI Call stored Proc Or Insert/update Database Status Report Dir B In this scenario we will receive business data in flat files which needs to be uploaded into database using stored procedure. This status is converted back to flat file structure and written in a particular directory called Status. Step 2 Under Technical Landscape create technical systems FILE_DEV_TS and DB_DEV_TS based on the above software component and products. Message Flow: Flat File containing business data will be received in a particular directory. Flat file structure is converted into database stored procedure structure. 2. CustomerDetails_dt Structure CustomerDetails CustomerID Name Address HouseNo Street City PhoneNo QueryDetails Category Complex Type Element Element Element Element Element Element Element Element Type String String String String String String String String Occurrence 1:N 1:1 1:1 1:1 1:1 1:1 1:1 1:1 1:1 DBCustomer_dt Structure Statement dbStmt action table CustomerID isInput isOutput type Name isInput isOutput type HouseNo isInput Category Element Element Attribute Element Element Attribute Attribute Attribute Element Attribute Attribute Attribute Element Attribute Type String String String String String String String String String String String String String String Occurrence 1:1 1:N optional 1:1 1:1 optional optional optional 1:1 optional optional optional 1:1 optional Version 1.com/demo/FILE_scenario . Step3 Under http://infosys.com/demo/DB_scenario namespace create DBCustomer_dt.2 Integration Repository In the Integration Repository (Designer) create the following objects. Step1 From the menu bar.12 INFOSYS Technologies Ltd Page 24 of 36 .SAP XI End to End Scenario 6.com/demo/DB_scenario and under SC ‘DB_WORKSHOP’ create http://infosys. DBStatus_dt Under http://infosys. DBCustomer_dt_response.com/demo/FILE_scenario namespace -> Interface Objects-> Data Types right click and create CustomerDetails_dt. Tools -> Transfer from SLD-> Import software component versions Select the software component ‘FILE_WORKSHOP’ and ‘DB_WORKSHOP’ and import it. Step2 Under SC ‘FILE_WORKSHOP’ create namespace http://infosys. DBCustomer_dt_response and DBStatus_dt respectively. DBCustomer_mt_response and DBStatus_mt selecting the data types CustomerDetails_dt. DBCustomer_mt.12 INFOSYS Technologies Ltd Page 25 of 36 .SAP XI End to End Scenario isOutput type Street isInput isOutput type City isInput isOutput type PhoneNo isInput isOutput type QueryDetails isInput isOutput type NoRowsInserted isInput isOutput type NoRowsUpdated isInput isOutput type Attribute Attribute Element Attribute Attribute Attribute Element Attribute Attribute Attribute Element Attribute Attribute Attribute Element Attribute Attribute Attribute Element Attribute Attribute Attribute Element Attribute Attribute Attribute String String String String String String String String String String String String String String String String String String String String String String String String String String optional optional 1:1 optional optional optional 1:1 optional optional optional 1:1 optional optional optional 1:1 optional optional optional 0:1 optional optional optional 0:1 optional optional optional DBCustomer_dt_response Structure Statement_response NoRowsInserted NoOfRowsUpdated Category Element Element Element Type Integer Integer Occurrence 1:1 0:1 0:1 DBStatus_dt Structure NumberOfRowsInserted NumberOfRowsUpdated Category Element Element Type Integer Integer Occurrence 0:1 0:1 Step4 Under Message Types right click and create message type CustomerDetails_mt. DBCustomer_dt. Version 1. Abstract Async. DBCustomer_mt_response DBCustomer_mt DBCustomer_mt_response DBStatus_mt DBStatus_mt Attributes Async. Abstract Async. Inbound Sync. DBCustomer_mt_response DBCustomer_mt. Abstract Sync. Message Types CustomerDetails_mt CustomerDetails_mt DBCustomer_mt. Abstract Async. Abstract MM_CustomerDetails_mt_To_DBCustomer_mt Source Message Type Element Target Message Type Element Functions to be used Statement CustomerDetails dbStmt action table CustomerID CustomerID isInput isOutput type Name Name isInput isOutput type HouseNo HouseNo isInput isOutput type Constant=CHAR Constant=TRUE Constant=CHAR Constant=TRUE Constant=CHAR Constant=TRUE Constant=EXECUTE Constant = Give Stored Procedure Name Version 1. Message Interface CustomerDetails_Async_OB CustomerDetails_Async_ABS DBCustomer_Sync_IB DBCustomer_Sync_ABS DBCustomerProc_req_ABS DBCustomerProc_res_ABS DBStatus_Async_IB DBStatus_Async_ABS Step6 Under Mapping Objects-> Message Mappings right click and create “MM_CustomerDetails_mt_To_DBCustomer_mt” (source as CustomerDetails_mt and target as DBCustomer_mt) and “MM_DBCustomer_mt_response_To_DBStatus_mt” (source as DBCustomer_mt_response and target as DBStatus_mt).12 INFOSYS Technologies Ltd Page 26 of 36 .SAP XI End to End Scenario Step5 Under Message Interfaces right click and create message interfaces of following types. Inbound Async. Outbound Async. 12 INFOSYS Technologies Ltd Page 27 of 36 .SAP XI End to End Scenario Street Street isInput isOutput type Constant=CHAR Constant=TRUE City City isInput isOutput type Constant=CHAR Constant=TRUE PhoneNo PhoneNo isInput isOutput type Constant=CHAR Constant=TRUE QueryDetails QueryDetails isInput isOutput type NoRowsInserted isInput isOutput type NoRowsUpdated isInput isOutput type Constant=TRUE Constant=NUMERIC Constant=TRUE Constant=NUMERIC Constant=UpdateCount Constant=CHAR Constant=InsertCount Constant=TRUE MM_DBCustomer_mt_response_To_DBStatus_mt Source Message Type Element Statement_response NoRowsInserted NoOfRowsUpdated NumberOfRowsInserted NumberOfRowsUpdated Target Message Type Element Functions to be used Count Count Version 1. Step8 Under namespace http://infosys. Transform. In the container area define variables as Name CustomerDetails Category Abstract Type CustomerDetails_Async_ABS Version 1.com/demo/FILE_scenario create Integration Process “FILE_TO_STOREDPROC_BPM”.SAP XI End to End Scenario Step7 Under Interface Mappings create “IM_CustomerDetails_Async_ABS_TO_DBCustomerProc_req_ABS” and select Source Interface as CustomerDetails_Async_ABS and target interface as DBCustomerProc_req_ABS and request mapping as MM_CustomerDetails_mt_To_DBCustomer_mt.12 INFOSYS Technologies Ltd Page 28 of 36 . “IM_DBCustomerProc_res_ABS_TO_DBStatus_Async_ABS” and select Source Interface as DBCustomerProc_res_ABS and target interface as DBStatus_Async_ABS and request mapping as MM_DBCustomer_mt_response_To_DBStatus_mt. Send. The steps in the above BPM are Receive. The BPM looks like First of all define the BPM flow and then configure it. Transform and Send. In the Send1 step select mode as Synchronous. 6.2.SAP XI End to End Scenario ProcReq ProcRes Status Abstract Abstract Abstract DBCustomerProc_req_ABS DBCustomerProc_res_ABS DBStatus_Async_ABS Select the Receive step to configure it. Version 1. In the Transform2 step for Interface mapping select IM_DBCustomerProc_res_ABS_TO_DBStatus_Async_ABS and Source Message as ProcRes and Target Message as Status. In the Transform1 step for Interface mapping select IM_CustomerDetails_Async_ABS_TO_DBCustomerProc_req_ABS and Source Message as CustomerDetails and Target Message as ProcReq. Step3 Under business system FILE_DEV create a communication called “FILE_SND_CRM_001” and “FILE_RCV_STATUS_CRM_001” and under DB_DEV create “JDBC_RCV_CRM_001”.3 Integration Directory In the Integration Directory from the menu bar select Object-> New and create a scenario called “INFY_FILE_TO_JDBC” and save it. Tick the start process and Message as CustomerDetails. This will launch a wizard in which select the BPM FILE_TO_STOREDPROC_BPM. Give the name FILE_TO_STOREDPROC_BPM and click finish. Right click and select business systems FILE_DEV and DB_DEV. In synchronous select DBCustomer_Sync_IB. Response Message as DBCustomerProc_res_ABS. In its properties area select Mode as Asynchronous. Step1 Select Service Without Party-> Business System.12 INFOSYS Technologies Ltd Page 29 of 36 . Step2 Under Integration Process right click. In the Send2 step select mode as Asynchronous and message as Status. Request message as DBCustomerProc_req_ABS. 12 INFOSYS Technologies Ltd Page 30 of 36 .SAP XI End to End Scenario Step4 Configure FILE_SND_CRM_001 as below. Version 1. 12 INFOSYS Technologies Ltd Page 31 of 36 .SAP XI End to End Scenario FILE_RCV_STATUS_CRM_001 Version 1. 12 INFOSYS Technologies Ltd Page 32 of 36 . Sender Service: FILE_DEV Interface: CustomerDetails_Async_OB Namespace: http://infosys.com/demo/FILE_scenario Receiver Service: FILE_TO_STOREDPROC_BPM Sender Communication Channel: FILE_SND_CRM_001 Version 1.SAP XI End to End Scenario Step5 Configure JDBC_RCV_CRM_001 as below. Step6 Create sender agreement with following parameters. Sender Service: FILE_TO_STOREDPROC_BPM Receiver Service: FILE_DEV Interface: DBStatus_Async_IB Namespace: http://infosys.com/demo/FILE_scenario Receiver Service: FILE_DEV Select Inbound Interface as DBStatus_Async_IB and there will be no Interface Mapping.12 INFOSYS Technologies Ltd Page 33 of 36 .com/demo/FILE_scenario Receiver Communication Channel: FILE_RCV_STATUS_CRM_001 Step7 In this case we will have three interface determinations. One for JDBC adapter and other for FILE adapter used for creating status file.com/demo/DB_scenario Receiver Communication Channel: JDBC_RCV_CRM_001 Create receiver agreement with following parameters. Sender Service: FILE_TO_STOREDPROC_BPM Interface: DBStatus_Async_ABS Namespace: http://infosys. Create receiver agreement with following parameters.SAP XI End to End Scenario We have to create two receiver agreements.com/demo/FILE_scenario Receiver Service: DB_DEV Select Inbound as Interface CustomerDetails_Async_ABS and there will be no Interface Mapping. >Create Interface Determination and use the below objects. Sender Service: FILE_DEV Interface: CustomerDetails_Async_OB Namespace: http://infosys. Version 1. > Create Interface Determination and use the below objects.com/demo/FILE_scenario Receiver Service: DB_DEV Select Inbound Interface as DBCustomer_Sync_IB and there will be no Interface Mapping. Sender Service: FILE_TO_STOREDPROC_BPM Interface: DBCustomer_Sync_ABS Namespace: http://infosys. >Create Interface Determination and use the below objects. Sender Service: FILE_TO_STOREDPROC_BPM Receiver Service: DB_DEV Interface: DBCustomer_Sync_IB Namespace: http://infosys. [char](10). >Create Receiver Determination and use the below objects. PhoneNo. [char](30).com/demo/FILE_scenario Receiver Party: * Service: * Select service as FILE_TO_STOREDPROC_BPM in Configured Receivers. City. [char](30).SAP XI End to End Scenario Step8 We have to create three Receiver Determinations. We have to create a table having columns “CustomerID. QueryDetails”. Street. Save it. Sender Service: FILE_TO_STOREDPROC_BPM Interface: DBCustomer_Sync_ABS Namespace: http://infosys. Save it. Sample Stored Procedure: SET QUOTED_IDENTIFIER ON GO SET ANSI_NULLS ON GO ALTER ( @CustomerID @Name @HouseNo @Street @City @PhoneNo @QueryDetails @NoRowsInserted Version 1. [char](30).12 INFOSYS Technologies Ltd Page 34 of 36 PROCEDURE [CustomerProc] [char](30). . Sender Service: FILE_TO_STOREDPROC_BPM Interface: DBStatus_Async_ABS Namespace: http://infosys. HouseNo. 6.com/demo/FILE_scenario Receiver Party: * Service: * Select service as FILE_DEV in Configured Receivers.2. >Create Receiver Determination and use the below objects. [char](30). Also in the shared file system the processed files will be archived and the status file will be created. Name. Save it. [char](100) [numeric](4) OUTPUT . Also have to create a stored procedure which will insert or update into this able and will return the count of number of records inserted and updated. Sender Service: FILE_DEV Interface: CustomerDetails_Async_OB Namespace: http://infosys.4 Unit Testing For testing we need to have access to a shared directory where we will receive input files. >Create Receiver Determination and use the below objects.com/demo/FILE_scenario Receiver Party: * Service: * Select service as DB_DEV in Configured Receivers. @Street. [Name]. @HouseNo.[dbo]. [QueryDetails]=@ QueryDetails WHERE [CustomerID]=@CustomerID Select @ NoRowsUpdated = @@ROWCOUNT END GO SET QUOTED_IDENTIFIER OFF GO SET ANSI_NULLS ON GO Version 1. [Street]=@Street. @PhoneNo @QueryDetails) Select @ NoRowsInserted = @@ROWCOUNT END ELSE BEGIN UPDATE [Northwind].[CustomerDetails] ( [CustomerID].SAP XI End to End Scenario @NoRowsUpdated ) [numeric](4) OUTPUT AS If (Select CustomerID from CustomerDetails where CustomerID=@CustomerID) IS NULL BEGIN INSERT INTO [Northwind]. [City].12 INFOSYS Technologies Ltd Page 35 of 36 . [PhoneNo] [QueryDetails]) VALUES (@CustomerID. [Name]=@CustomerName. [HouseNo]=@HouseNo. @Name. [City]=@City. [Street]. [HouseNo]. @City.[CustomerDetails] SET [CustomerID]=@CustomerID.[dbo]. com.com and Kannan_Kailas@infosys. In response we will get the number of records inserted or updated which we will map to the status file structure. in table give the table name. So in the above scenario use the below mentioned target request and response structure. Version 1.12 INFOSYS Technologies Ltd Page 36 of 36 . DBCustomer_dt Structure root Statement dbTable action table access CustomerID Name HouseNo Street City PhoneNo QueryDetails Key CustomerID Category Element Element Element Attribute Element Element Element Element Element Element Element Element Element Element Element Type Occurrence 1:1 1:1 String String required 1:1 1:N String String String String String String String 1:1 1:1 1:1 1:1 1:1 1:1 1:1 1:N String 1:1 During mapping in action use constant=UPDATE_INSERT. In this case we don’t have to use stored procedure. The response from the database will look like DBCustomer_dt_response Structure root_response update_count insert_count Category Element Element Element Type Integer Integer Occurrence 1:1 0:1 0:1 P.SAP XI End to End Scenario NOTE:The above scenario can be modified a little bit using action as “UPDATE_INSERT”. Everything else will remain as usual and we don’t have to use stored proc. If the records are present in the table then this will be updated or it will be inserted.S: If any difficulties are being faced while configuring the above scenarios please contact me Mukeshlal_parida@infosys.


Comments

Copyright © 2024 UPDOCS Inc.