Upload
tapas-dutta
View
322
Download
13
Embed Size (px)
Citation preview
7/28/2019 Configure SAP PI
1/59
How to configure SAP XI/PI to use thestandard SAP communication APIs(Idoc, Bapi, Rfc, Enterprise Services)
from external systems
How to create the necessary certif iable XIContent with the XI Integration Builder
SAP Integration & Certification Center, [email protected] February 2009Updated version for XI/PI 7.0
Contents
1 Introduction ..................................................................................................................2
2 First steps......................................................................................................................23 Add your system into the System Landscape Directory.................................................4
4 Establish the connection between the SAP systems .......................................................65 Transfer your Software Component into the Integration Repository ..............................7
6 XI Content for asynchronous IDOC Outbound..............................................................8
7 XI Content for asynchronous IDOC Inbound ..............................................................18
8 XI Content for synchronous RFC/BAPI Inbound ........................................................27
9 XI Content for synchronous RFC/BAPI Outbound......................................................37
10 XI Content to invoke Web Services / SAP Enterprise Services.................................... 47
11 How to import/configure your XI Content in a target XI system.................................. 58
12 Files needed for Certification ......................................................................................59
mailto:[email protected]:[email protected]7/28/2019 Configure SAP PI
2/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems____________________________________________________________________________________________
2/59
1 Introduction
Purpose of this document
This document describes how the SAP Exchange Infrastructure (XI/PI) 3.0 or 7.0 can be configured, sothat external systems can communicate with a backend SAP system (e.g. SAP R/3 Enterprise) using the
standard SAP XI adapter HTTP with XML communication. On the other side, the integration of XI withthe backend SAP system is done with IDOCs or RFC modules (BAPIs). You could also integrate with thelatest SAP systems using SAP Enterprise Services (see chapter 10).
Throughout the document we will always use the term XI.
The configuration of XI will lead to certifiable XI Content, that can be extracted and again imported intothe customers XI system.
Related Documents
A lot of help can be found in the Online Help of SAP:http://help.sap.com/ Documentation SAP NetWeaver Process Integration SAP ExchangeInfrastructure. You should at least read the basics of XI provided there (Overview Basics).
You can also find some sample scenarios using XI (Overview Demo Examples).
Certification RequirementsIts possible to certify an integration scenario with an SAP backend system using XI. To do that itsnecessary that the 3rd party system integrates with XI via one of the standard SAP adapters or a certified3rd party adapter.
XI Content Certification
This tutorial lists all the steps that are necessary to get certifiable XI Content. But sure, you should alsocheck the NW-XI-CNT certification test catalog. Please ask your local ICC to get further details about this([email protected] [email protected]) or check the ICC SDN page(http://www.sdn.sap.com/irj/sdn/icc):
2 First steps
This tutorial is designed for the test environment provided by the SAP Integration and Certification Center(ICC). It consists of the SAP XI 7.0 system NX7 and the SAP R/3 enterprise backend system CE8. Toinclude other XI systems or SAP backend systems further configuration might be necessary. You can getaccess to this test environment through our Remote Access Kit (RAC). For more information regardingRAC you should contact your local ICC or check the here:http://www.sdn.sap.com/irj/sdn/saprac
The XI system is hosted on pwdf6425.dmzwdf.sap.corp, the internet address is iccpi7.sap.com.To use the XI system you need to install J ava WebStart on your PC. You can get this as part of the J 2SEplatform provided by SUN. After the installation you should start J ava WebStart manually and configure itcorrectly, so that it can access the internet (also check chapter 2.1). You should be able to execute thesample applications located on http://java.sun.com/products/javawebstart/apps/remoteApps.html.
RFC
IDOC
SAP
Backend
System
3rd party
systemSAP XI
http/
XML
Rfc
Adapter
Idoc
adapter
http
Adapter
http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htmmailto:[email protected]:[email protected]://www.sdn.sap.com/irj/sdn/icchttp://www.sdn.sap.com/irj/sdn/icchttp://www.sdn.sap.com/irj/sdn/saprachttp://java.sun.com/j2se/1.4.2/index.jsphttp://java.sun.com/products/javawebstart/apps/remoteApps.htmlhttp://java.sun.com/products/javawebstart/apps/remoteApps.htmlhttp://java.sun.com/products/javawebstart/apps/remoteApps.htmlhttp://java.sun.com/j2se/1.4.2/index.jsphttp://www.sdn.sap.com/irj/sdn/saprachttp://www.sdn.sap.com/irj/sdn/iccmailto:[email protected]:[email protected]://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm7/28/2019 Configure SAP PI
3/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems____________________________________________________________________________________________
3/59
Now start the XI system NX7 and log on. After the logon, you should activate the user menu (ctrl-F10) tofind all the necessary programs to configure, use and monitor the XI system. As a first check you shouldstart the Integration Builder (Start Integration Builder or choose the following link:http://iccpi7.sap.com/rep/start/index.jsp) that opens in a separate browser window. Please check, if youcan start all the four tools IntegrationRepository, IntegrationDirectory, SystemLandscapeDirectory andRuntimeWorkbench. The two Integration tools are based on J ava WebStart and perhaps you have to startthem several times before all the necessary classes are loaded completely into the WebStart-cache (seefollowing chapter).
2.1 Connecting to NX7 system through a proxy server
The Integration Builder of the NX7 system can be reached directly from a web browser. If you need aproxy server for your internet connection, you should configure your browser accordingly. Also the JavaWeb Start tool must be configured.
You can use the J ava Web Start Preferences panel to view or edit the proxy configuration. Launch theApplication Manager, either by clicking on the icon on the desktop (Microsoft Windows), or type ./javawsin the J ava Web Start installation directory, and then select Edit/Preferences. If you are in an environmentwhere access to the Web is through a proxy server, you are encouraged to use the J ava Web StartPreferences panel to check that these are set-up correctly.
The first time you start the two XI Web Start Applications (Integration Repository or Integration Directory),the necessary classes are loaded from iccxi.sap.com into the Java Web Start Cache. Especially if youhave to connect through a proxy server, this can take quite long.
To avoid any authentication problems, you should also add the following line to your hosts file (onwindows platforms: \windows\system32\drivers\etc\hosts):
155. 56. 49. 19 pwdf 6425 pwdf 6425. dmzwdf . sap. cor p i ccpi 7. sap. com
Now everything should be in place to start all the applications contained in the SAP XI Integration Builder.
2.2 Prerequisites if you want to do IDOC communication
For IDOC communication you also need ALE customizing in the SAP Backend System, and thedescription of this customizing is not part of this tutorial. ALE communication with IDOCs is implementedas communication between Logical Systems.
In the following chapters, we assume that we have the following Logical Systems defined in the SAPBackend System CE8:
Central Logical System of CE8, client 850: CE8CLNT850Logical System created for the external system: CC_CRM
http://iccpi7.sap.com/rep/start/index.jsphttp://iccpi7.sap.com/rep/start/index.jsphttp://iccpi7.sap.com/rep/start/index.jsp7/28/2019 Configure SAP PI
4/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems____________________________________________________________________________________________
4/59
IMPORTANT NOTE: Please neither use the sample objects mentioned below in yourscenario, nor change the sample Integration Scenarios or Configuration Scenarios.Always create your own objects!!
Additionally, most of the sample objects here have the prefix CC. This is just ICCrelated and does not reflect a special naming convention. You dont have to use thesame prefix
3 Add your system into the System Landscape Directory
All our XI configuration objects will be created in the range of the external product that consists of one ormore Software Component Versions. At first we need to add information about this 3rd party product intothe System Landscape Directory (SLD). The name of the external business system will be CC_CRM.
Now open the SLD.
Edit the Software Catalog:
In section Software Catalog, choose Products Click New Product Version Enter the appropriate data into the three fields
Vendor: e.g. ccvendor.com
Name: e.g. ccCRMVersion: e.g. 1.0
Then enter Software Unit name ccCRM. Now add a Software Component
Name: e.g. CCVENDOR_CRMVersion: e.g. 1.0
Click Home to go back
The above information is part of your XI Content and must be named in the same way for all yourcustomers. Therefore you have to export it from the SLD and provide this exported file for your customersto import into their SLD.
To export, go to section Software Catalog / Products again, search your product from the list and
select it, then simply press the Export-button. This exports the Product and all attached SoftwareComponents into one single zip-file.This zip-file is part of the XI content package and is required to submit for the certification.
The information for Product, Product Version, Software Component and Software Component Version arealso important for the PPMS data sheet and will be entered into SAPs internal PPMS system. Please findfurther details about that in the XI Content certification catalog, chapter 4.
7/28/2019 Configure SAP PI
5/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems____________________________________________________________________________________________
5/59
Now create the Technical System and the Business System; these are customer specific and thereforenot part of the static XI Content.
Create Technical System:
Click on Technical Systems, then choose New Technical System Choose Third Party, press Next Enter some sample details
System: e.g. ccCRM_systemHost: your host name, e.g. P105077
Now choose the product created in the step before, e.g. ccCRM and the attached SoftwareComponents, and press Finish.
Click Home to go back
Create Business System CC_CRM:
Click on Business Systems, then choose New Business System Choose Third Party, press Next Choose the technical system created in the step before, e.g. ccCRM_system For IDOC communication, we should enter the Logical System as defined in the SAP Backend
System for the external system, so in our sample its CC_CRM. Enter the name CC_CRM, then press Next two times Choose Integration Server SAP_NX7_800 Click Finish, then Home to go back
Check the available Business Systems:
Click on Business Systems. Now you should be able to find the two Business Systems necessary forour communication scenario:
The SAP backend system SAP_CE8 Your external system CC_CRM
7/28/2019 Configure SAP PI
6/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems____________________________________________________________________________________________
6/59
4 Establish the connection between the SAP systems
In the following chapters we want to send messages from the CE8 to XI and vice versa, so we need aconnection between the two systems:
4.1 Connect the CE8 system with the XI system NX7
Create R/3 destination in CE8: Log on to CE8 system, and with transaction SM59, create a new RFCdestination that points to the XI system:
RFC destination: CC_DEST_NX7 Connection type: 3 Documentation: My Destination Target Host: PWDF6425 (will then be automatically replaced by something) System Number: 10
Change to the Logon Tab and provide your logon details for the XI system. Try the connection and try the
remote logon. Both should be successful.
4.2 Connect the XI system NX7 with the CE8 system
You only need to make changes here, if you want to make IDOC communication.
Then you have to log on to NX7, Integration Server.
Check R/3 destination: With transaction SM59, you can find an ABAP destination CC_DEST_CE8 thatconnects to the CE8 system. Its not necessary to change that or create a new R/3 destination.
Create port: With transaction IDX1, create a port named as the Logical System Name of your ALE
customizing in the CE8 system. In our case, this name is CC_CRM. Port: CC_CRM Client: 850 Description: A valuable Text RFC Destination: CC_DEST_CE8
Check port: NX7 also needs one port to query IDOC metadata from the sending SAP system CE8. Theport name must be SAP. So check that the following port is available.Dont change this port, you also dont need an additional port!
Port: SAPCE8 Client: 850 RFC Destination: CC_DEST_CE8
7/28/2019 Configure SAP PI
7/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems____________________________________________________________________________________________
7/59
5 Transfer your Software Component into the Integration Repository
All the static XI configuration objects (message definitions, mappings etc.) belong to an IntegrationScenario that lies in your Software Component Version created previously in the SLD. This SoftwareComponent must be created first in the Integration Repository, together with a meaningful namespace.So now open the Integration Builder, from there jump into the Integration Repository.
Important: Every change in the Integration Repository must be committed in a second step. So beforeyou leave, you should make sure to jump to the Change Lists-Tab, rightclick on your change list andchoose Activate.
Import your product from SLD: In the Integration Repository Menu, choose Tools Transfer fromSystem Landscape Directory Import Software Component Versions.
Choose your Software Component Version created in 3: CCVENDOR_CRM Click Import, then exit
Add the Namespace:
Open the Software Component, then doubleclick the Software Component VersionCCVENDOR_CRM, 1.0 of ccvendor.com.
Use the first icon to switch into the change-mode. Choose Import of RFC permitted and enter the system details:
o System: CE8o Client: 850
Go into the first line of the Namespaces-section and enter a namespace for your Integration
Scenario:http://ccvendor.com/xi/crm_demo
Save. Now you should find new objects under your Software Component Version.
Now jump to the chapter that is relevant for you (6, 7, 8 or 9) and fin ish the XI ContentDevelopment.
7/28/2019 Configure SAP PI
8/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems____________________________________________________________________________________________
8/59
6 XI Content for asynchronous IDOC Outbound
In the following chapter we will configure the XI system, so that we can send MATMAS01 IDOCs from theCE8 system through XI to the external system CC_CRM using the SAP tRFC communication protocol.We only focus on the XI customizing, not the ALE customizing in the CE8. You can find the complete
configuration in our XI system, so it should be easy to copy it using different external systems and IDOCs.As a prerequisite you should have completed chapters 3-5.
6.1 Check the customizing in the SAP backend system
Prepare ALE customizing: In the CE8 system, prepare the ALE customizing so that MATMAS01-IDOCscan be sent to the logical system CC_CRM. This name must match with the logical system name of theexternal Business System created in chapter 3. You also need to know the central logical system of theclient (the sender system). In our case this is CE8CLNT850.
The scenario is as follows: Outbound MATMAS01: CE8CLNT850 CC_CRM
Into the port of your ALE customizing you have to enter the R/3 destination to the SAP XI system createdin 4.1.
6.2 Create the Reposi tory Content for the IDOC Outbound Scenario
Open the Integration Builder, from there jump into the Integration Repository.
Important: Every change in the Integration Repository must be committed in a second step. So beforeyou leave, you should make sure to jump to the Change Lists-Tab, rightclick on your change list andchoose Activate.
Import MATMAS01 message data:Since the external system already understands the MATMAS01 message format, we only need to importone message type into the XI system. We also dont need any mapping. We can import the message typeinto our Software Component Version.
Open your Software Component Version CCVENDOR_CRM, 1.0 of ccvendor.com ImportedObjects
Rightclick on IDOCs and choose Import Enter data:
Application Server: cpce801System Number: 75your CE8-user and password
Choose the IDOCs you want to import, in our case its MATMAS.MATMAS01, then Continue. Choose Finish, then Close after the successful import.
7/28/2019 Configure SAP PI
9/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems____________________________________________________________________________________________
9/59
Create Communication Channel Templates:The communication channels serve as the technical endpoints to the connected systems. Since wealready know, that the SAP sender is connected via IDOC and the receiving external system is connectedvia http, we can create the templates for these endpoints now. This makes the configuration of theintegration scenario later easier.For IDOC outbound, we only need a receiver communication channel:
Open your namespace Adapter Objects and rightclick on Comm Channel Templates,choose New
Enter a name for the external http receiver: idoc_outbound_HTTPreceiverand enter a meaningfuldescription.
Choose Adapter Type = HTTP by using the F4-Help-icon, save, then choose Receiver-type. Thats it, the details of the connection are usually defined later during the configuration and are
therefore not part of the static XI Content. Save.
Dont forget the descriptions and the documentation!For all objects, you should always add a meaningful text in the field Description and also provide some
further documentation, by clicking on in the menu of the XI Content object:
1. Press here to show 2. Press here to addthe documentation panel documentation
7/28/2019 Configure SAP PI
10/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems____________________________________________________________________________________________
10/59
Create the Integration Scenario:
Open your namespace Integration Scenarios and rightclick on Integration Scenarios,choose New
Enter a name and description:IS_ReceiveMaterialMaster
and choose Create. Create a graphical representation of the SAP system by rightclicking into the first grey column.The text Insert Application Component should appear, choose this one.
o Application Component Type =Product Version,title = SAP R/3 ENTERPRISE 47X110
o Role Name =SAP_Systemo Choose Apply
Create a graphical representation of the external system by rightclicking into the second greycolumn. Choose Insert Application Component.
o Application Component Type =Product Version,
title =ccCRM, 10. of ccvendor.com (our external product, created previously in the SLD)o Role Name =External_CRM_Systemo Choose Apply
Dont forget to enter some documentation of your Integration Scenario. Its no bad idea todescribe the scenario quite detailed here.
Save.
Create action to send the MATMAS01 from the SAP_System
Still in the edit mode of your Integration Scenario, rightclick into the SAP_System column andchoose Create Action
On the next popup we have to choose External, since from the view of our Software ComponentCCVENDOR_CRM SAP is the Partner Software Component.
Enter the name SendMatmas and pressFinish, then Close
You can now find a window with the details of theaction, switch to the change mode here.
From the SAP_System we want to send theMATMAS message, so we need to add a line tothe Outbound Interfaces.
In the outbound-table, click on the +-icon andchoose ObjectType =IDOC
Click on the 7th icon of the table (Display inputhelp) and choose the MATMAS01 from yourSoftware Component CCVENDOR_CRM.
Enter a meaningful description anddocumentation
7/28/2019 Configure SAP PI
11/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems____________________________________________________________________________________________
11/59
Save and close the created action
Create action to receive the MATMAS01 in the External_CRM_System
Still in the edit mode of your Integration Scenario, rightclick into the External_CRM_Systemcolumn and choose Create Action
On the next popup we have to choose Internal, since the External_CRM_System contains ourown Software Component CCVENDOR_CRM.
Enter the name ReceiveMatmas and pressFinish, then Close
You can now find a window with the details ofthe action, switch to the change mode here.
Since we want to receive a message, we needto add a line to the Inbound Interfaces.
In the inbound-table, click on the +-icon andchoose ObjectType =IDOC
Click on the 7th icon of the table (Displayinput help) and choose the MATMAS01 from
your Software Component CCVENDOR_CRM. Enter a meaningful description and
documentation Save and close the created action
Create connection for message flow between the previously created actions
Still in the edit mode of your Integration Scenario, check the location ofthe two created actions. To get an asynchronous IDOC-connection, its
necessary that the receiving action is below the sending action. Makesure to move the ReceiveMatmas-box accordingly:
Rightclick the action SendMatmas and choose Define as Start Action.
Rightclick the action ReceiveMatmas and choose Define as EndAction
Mark both actions by holding the shift-key, rightclick and choose Create Connection . In the followingpopup, make sure that both checkboxes MATMAS.MATMAS01 are marked. You can also see that thecommunication is asynchronous:
7/28/2019 Configure SAP PI
12/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems____________________________________________________________________________________________
12/59
Go to the Assign Comm Channel Template tab and assign the previously created templateidoc_outbound_receiver in the receiver part. You can use the F4-help-icon in the Name-field to find thechannel template in our Software Component CCVENDOR_CRM.Leave the sender part empty, as we dont need to create a communication channel there:
Choose apply then save the Integration Scenario
Check the consistency of the scenario by choosing Component View Check Configurability. Youshould only receive warning messages like:Check Result for Object IS_ReceiveMaterialMaster Component View IS_ReceiveMaterialMaster:Connection from Action to send Material Master from SAP to Action to receive Material Master from SAPhas no mapping
Activate all your changes (check chapter 5 about how to activate).
Thats it. With these simple steps you have created the certifiable content for the IDOC outbound scenariocompletely. If there are further communication steps involved in your scenario (other IDOCs or RFCs), you
should add them directly into the already defined Integration Scenario. For a better overview, in our tutorial wewill generate a separate Integration Scenario for each communication method.
7/28/2019 Configure SAP PI
13/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems____________________________________________________________________________________________
13/59
Export the Repository Content:
After you have finished the creation of all the XI Content Objects, you can export the content so that it canbe easily implemented at your customers site. J ust choose Tools Export Design Objects, select theSoftware Component Version CCVENDOR_CRM, 1.0 and export the objects that belong to your contentthat should be certified (usually all objects of your Software Component Version).
Note: When you are ready for a certification test drive, pleaseprovide us the export path with the name of your XI content andthe exported SLD content zip file (see chapter 3).
6.3 Create the Configuration Scenario in the XI Integration Directory
In the next step, we want to configure our Integration Scenario in the XI Integration Directory, so that it fitsinto our existing landscape with an external HTTP server and the CE8 SAP system. After that, we want totest the communication. Since the system landscape is different for each customer, its not necessary toexport the Integration Directory Content.For certifiable XI Content it must be possible, to configure it automatically with the Integration ScenarioConfigurator. So we will also check, if this works as expected.
Open the Integration Builder, from there jump into the Integration Directory.
Important: Every change in the Integration Directory must be committed in a second step. So before youleave, you should make sure to jump to the Change Lists-Tab, rightclick on your change list and chooseActivate.
Clear SLD cache:To have a consistent start, you should clear the SLD cache with Environment Clear SLD DataCache.
Import the Integration Scenario:In the first step, we copy the Integration Scenario created in the XI Integration Repository into a Confi-guration Scenario.
Choose Tools Transfer Integration Scenario from the Integration Repository and use theF4-help-icon to find your Integration Scenario IS_ReceiveMaterialMaster in your SoftwareComponent Version. Click Continue
The scenario is copied into a Configuration Scenario and you should change the name, e.g. intoCS_ccReceiveMaterialMaster(CS is ConfiguationScenario). You can also add your companyname or initials as a prefix, so that you can find it later easily.
Click Finish and Close. This automatically starts the:
Integration Scenario Configurator:In this step we have to assign Services to our two Application Components SAP_System and External
_CRM_System of our Integration Scenario. These services are the physically existent Business SystemsCC_CRM and SAP_CE8 that we have created in the System Landscape Directory in chapter 3.
7/28/2019 Configure SAP PI
14/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems____________________________________________________________________________________________
14/59
We can start directly with step 2:
2. Assign Services: This is where we have to assign the Business Systems:
o In the popup, use the arrow icons on the top to choose Role =SAP_System.o Click on the +-icon of the table below and choose the F4-Help to find the Business
SystemSAP_CE8.
o Now use the arrow icons on the top to choose Role =External_CRM_System.o Click on the Create-icon of the table below (4th icon) and choose 2 times Continueo Look for your Business System CC_CRM. If its not available here, then it has been
already created, click Cancel. If its available, then choose it, deselect the CreateCommunication Channels Automatically (Important!) and choose Finish, then Close
o If not yet assigned, click on the +-icon of the table below and choose the F4-Help to findthe Business System CC_CRM.
o Click on Assign.
3. Configure Connections: This is where we have to assign the Communication Channels:
o In the popup, use the arrow icons on the top to choose the Communication Step you wantto configure. Since we only have one step in our Integration Scenario, this is chosenautomatically.
o In the table below, click into the field Communication Channel for the Receiver BusinessSystem on the very right.
o Then click the Create-icon (3rd icon) to start the Communication Channel Wizard.
7/28/2019 Configure SAP PI
15/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems____________________________________________________________________________________________
15/59
o Press continue, then make sure that our template idoc_outbound_receiveris chosen, andthen press continue. Now give the Communication Channel a new unique name, so thatit does not collide with other configuration objects, after that click finish and then close.
o Finish the configuration of the connections by pressing Apply.
4. Generate: Generate all the needed agreements automatically and finish the wizard:
o Change the general settings to Generation (no simulation), press Start.o Quickly check the log, if there are any errors.o Close the log without saving,o Close the Integration Scenario Configurator and choose Apply.
If you have later changed the Integration Scenario in the XI Integration Repository and you want toupdate the existing Configuration Scenario, then you can also start the Integration Scenario Configuratormanually:
Open your Configuration Scenario with a double click Switch to the Edit Mode Choose Configuration Scenario Integration Scenario Configurator To update the scenario, choose Settings Integration Scenario from the Integration
Repository Update. Go on with the configuration steps and generate the new configuration.
6.4 Finish the configuration manually
With the wizard we have already created all the needed XI objects, now we need to configure theconnection between the external http IDOC receiver and XI.
Finish Configuration in XI Integration Directory:
Add the connection details into the previously created Receiver Communication Channel:Open CS_ccReceiveMaterialMaster Service Without Party Business System CC_CRM CommChannel idoc_outbound_receiver. Switch into the edit mode and enter the following data:
o Target host: Host of http servero Service number: Port of http server
o Path: Path of http serviceTo access the internet:o Proxy Host: 155.56.68.229o Proxy Port: 8080o Authentication data if necessary
7/28/2019 Configure SAP PI
16/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems____________________________________________________________________________________________
16/59
To finish the configuration in XI Integration Directory, save and activate all the changes done before.
6.5 Check the IDOC communication
Thats it! Now you should be able to send MATMAS01 IDOCs from the SAP backend system to theexternal IDOC server via http.
Send MATMAS01 IDOC:
In the CE8 system, choose transaction BD10 Enter Material (e.g. T-22212) and your logical system (e.g. CC_CRM) Execute with F8
7/28/2019 Configure SAP PI
17/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems____________________________________________________________________________________________
17/59
Check message in Integration Server Monitoring
In NX7 system, open Monitoring Integration Engine Monitoring Open the Monitor for processed XML Messages Enter appropriate selection criteria, e.g. Receiver-Service =CC_CRM and execute with F8 Check the status of your message. With a doubleclick on the line you can inspect the details.
Sample Request from SAP:
POST / ?msggui d=F0D38FDC18C5BA4E977FC5DEE169F3EE&ser vi ce=SAP_CE8&namespace=ur n%3asap-com%3adocument %3asap%3ai doc%3amessages&i nt er f ace=MATMAS%2eMATMAS01&qos=EO HTTP/ 1. 0cont ent - t ype: t ext / xmlcont ent - l ength: 25524connect i on: cl oseaccept : */ *user- agent : SAP Web Appl i cat i on Ser ver ( 1. 0; 640)host : P105077: 123accept - encodi ng: gzi p
[ ]
The unique message ID (GUID) can be found in the http header:msgguid=F0D38FDC18C5BA4E977FC5DEE169F3EE
Sample Response:
HTTP/ 1. 1 200 OkCont ent - Type: t ext/ xml ; char set =ut f - 8Cont ent - Length: 0
Congratulations! You have successfully created certifiable content and tested the communication. Nowall you have to do is fill out the Technical Profile questionnaire and complete the Configuration Guide
document. Then you are ready for a certification test drive. Please make sure to read more information onthe configuration in chapters 11 and 12.
7/28/2019 Configure SAP PI
18/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems____________________________________________________________________________________________
18/59
7 XI Content for asynchronous IDOC Inbound
In the following chapter we will configure the XI system, so that we can send MATFET messages from theexternal system CC_CRM to the CE8 system through XI using the SAP IDOC and HTTP Adapter. Thesemessages are sent to SAP using the IDOC type ALEREQ01. We only focus on the XI customizing, not
the ALE customizing in the CE8. You can find the complete configuration in our XI system, so it should beeasy to copy it using different external systems and IDOCs.As a prerequisite you should have completed chapters 3-5.
7.1 Check the customizing in the SAP backend system
Prepare ALE customizing: In the CE8 system, prepare the ALE customizing so that ALEREQ01-IDOCscan be received from the logical system CC_CRM. This name must match with the logical system nameof the external Business System created in chapter 3. You also need to know the central logical system ofthe server (the receiving SAP system). In our case this is CE8CLNT850.
The scenario is as follows: Inbound ALEREQ01: CC_CRM CE8CLNT850
7.2 Create the Repository Objects for the IDOC Inbound Scenario
Open the Integration Builder, from there jump into the Integration Repository.
Important: Every change in the Integration Repository must be committed in a second step. So beforeyou leave, you should make sure to jump to the Change Lists-Tab, rightclick on your change list andchoose Activate.
Import ALEREQ01 message data:
Since the external system already understands the ALEREQ01 message format, we only need to importone message type into the XI system. We also dont need any mapping. We import the message type intoour Software Component Version.
Open your Software Component Version CCVENDOR_CRM, 1.0 of ccvendor.com ImportedObjects
Rightclick on IDOCs and choose Import Enter data:
Application Server: cpce801System Number: 75your CE8-user and password
Choose the IDOCs you want to import, in our case its MATFET.ALEREQ01, then Continue. Choose Finish, then Close after the successful import.
Create Communication Channel Templates:
The communication channels serve as the technical endpoints to the connected systems. Since wealready know, that the SAP receiver is connected via IDOC and the sending external system is connectedvia http, we can create the templates for these endpoints now. This makes the configuration of theintegration scenario later easier.For IDOC inbound, we only need a receiver communication channel:
Open your namespace Adapter Objects and rightclick on Comm Channel Templates,choose New
Enter a name for the IDOC receiver: idoc_inbound_receiverand enter a meaningful description. Choose Adapter Type = Idoc, save, then choose Receiver-type. Thats it, the details of the connection are usually defined later during the configuration and are
therefore not part of the static XI Content. Save.
7/28/2019 Configure SAP PI
19/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems____________________________________________________________________________________________
19/59
Dont forget the descriptions and the documentation!For all objects, you should always add a meaningful text in the field Description and also provide some
further documentation, by clicking on in the menu of the XI Content object:
1. Press here to show 2. Press here to addthe documentation panel documentation
Create the Integration Scenario:
Open your namespace Integration Scenarios and rightclick on Integration Scenarios,
choose New Enter a name and description: IS_SendMaterialRequest and choose Create. Create a graphical representation of the SAP system by rightclicking into the first grey column.
The text Insert Application Component should appear, choose this one.
o Application Component Type =Product Version,title = SAP R/3 ENTERPRISE 47X110
o Role Name =SAP_Systemo Choose Apply
7/28/2019 Configure SAP PI
20/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems____________________________________________________________________________________________
20/59
Create a graphical representation of the external system by rightclicking into the second greycolumn. Choose Insert Application Component.
o Application Component Type =Product Version,title =ccCRM, 10. of ccvendor.com (our external product, created previously in the SLD)
o Role Name =External_CRM_Systemo Choose Apply
Dont forget to enter some documentation of your Integration Scenario. Its no bad idea todescribe the scenario quite detailed here.
Save.
Create action to send the MATFET message from the External_CRM_System
Still in the edit mode of your Integration Scenario, rightclick into the External_CRM_System
column and choose Create Action On the next popup we have to choose Internal, since the External_CRM_System contains our
own Software Component CCVENDOR_CRM.
Enter the name SendMatfet and pressFinish, then Close
You can now find a window with the details ofthe action, switch to the change mode here.
Since we want to send a message, we need toadd a line to the Outbound Interfaces.
In the outbound-table, click on the +-icon andchoose ObjectType =IDOC
Click on the 7th icon of the table (Display
input help) and choose the ALEREQ01 fromyour Software Component CCVENDOR_CRM.
Enter a meaningful description anddocumentation
Save and close the created action
7/28/2019 Configure SAP PI
21/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems____________________________________________________________________________________________
21/59
Create action to receive the MATFET message in the SAP_System
Still in the edit mode of your Integration Scenario, rightclick into the SAP_System column andchoose Create Action
On the next popup we have to choose External, since from the view of our Software ComponentCCVENDOR_CRM SAP is the Partner Software Component.
Enter the name ReceiveMatfet and pressFinish, then Close You can now find a window with the details
of the action, switch to the change modehere.
In the SAP_System, we want to receive theMATFET message, so we need to add a lineto the Inbound Interfaces.
In the inbound-table, click on the +-icon andchoose ObjectType =IDOC
Click on the 7th icon (Display input help)and choose the ALEREQ01 from yourSoftware Component CCVENDOR_CRM.
Enter a meaningful description anddocumentation
Save and close the created action
Create connection for message flow between the previously created actions
Still in the edit mode of your Integration Scenario, check the location ofthe two created actions. To get an asynchronous IDOC-connection, its
necessary that the receiving action is below the sending action. Makesure to move the ReceiveMatfet-box accordingly:
Rightclick the action SendMatfet and choose Define as Start Action.
Rightclick the action ReceiveMatfet and choose Def. as End Action
Mark both actions by holding the shift-key, rightclick and choose Create Connection . In thefollowing popup, make sure that both checkboxes MATFET.ALEREQ01 are marked. You canalso see that the communication is asynchronous:
7/28/2019 Configure SAP PI
22/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems____________________________________________________________________________________________
22/59
Go to the Assign Comm Channel Template tab and assign the previously created templateidoc_inbound_receiverin the receiver part. You can use the F4-help-icon in the Name-field to find thechannel template in our Software Component CCVENDOR_CRM.Leave the sender part empty, as we dont need to create a communication channel there:
Choose apply then save the Integration Scenario
Check the consistency of the scenario by choosing Component View Check Configurability. Youshould only receive warning messages like:
Check Result for Object IS_SendMaterialRequest Component View IS_SendMaterialRequest:Connection from Action to request Material Master Data from SAP to Action to receive the MaterialMaster Request has no mapping
Activate all your changes (check chapter 5 about how to activate).
Thats it. With these simple steps you have created the certifiable content for the IDOC inbound scenariocompletely. If there are further communication steps involved in your scenario (other IDOCs or RFCs), youshould add them directly into the already defined Integration Scenario. For a better overview, in our tutorial wewill generate a separate Integration Scenario for each communication method.
7/28/2019 Configure SAP PI
23/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems____________________________________________________________________________________________
23/59
Export the Repository Content:After you have finished the creation of all the XI Content Objects, you can export the content so that it canbe easily implemented at your customers site. J ust choose Tools Export Design Objects, select theSoftware Component Version CCVENDOR_CRM, 1.0 and export the objects that belong to your contentthat should be certified (usually all objects of your Software Component Version).
Note: When you are ready for a certification test drive, pleaseprovide us the export path with the name of your XI content andthe exported SLD content zip file (see chapter 3).
7.3 Create the Configuration Scenario in XI Integration Directory
In the next step, we want to configure our Integration Scenario in the XI Integration Directory, so that it fitsinto our existing landscape with an external IDOC client and the CE8 SAP system. After that, we want to
test the communication. Since the system landscape is different for each customer, its not necessary toexport the Integration Directory Content.For certifiable XI Content it must be possible, to configure it automatically with the Integration ScenarioConfigurator. So we will also check, if this works as expected.
Open the Integration Builder, from there jump into the Integration Directory.
Important: Every change in the Integration Directory must be committed in a second step. So before youleave, you should make sure to jump to the Change Lists-Tab, rightclick on your change list and chooseActivate.
Clear SLD cache:
To have a consistent start, you should clear the SLD cache with Environment Clear SLD Data
Cache.
Import the Integration Scenario:
In the first step, we copy the Integration Scenario created in the XI Integration Repository into a Confi-guration Scenario.
Choose Tools Transfer Integration Scenario from the Integration Repository and use theF4-help-icon to find your Integration Scenario IS_SendMaterialRequest in your SoftwareComponent Version. Click Continue
The scenario is copied into a Configuration Scenario and you should change the name, e.g. intoCS_ccSendMaterialRequest (CS is ConfiguationScenario). You can also add your companyname or initials as a prefix, so that you can find it later easily.
Click Finish and Close. This automatically starts the:
Integration Scenario Configurator:In this step we have to assign Services to our two Application Components SAP_System and External
_CRM_System of our Integration Scenario. These services are the physically existent Business SystemsCC_CRM and SAP_CE8 that we have created in the System Landscape Directory in chapter 3.
We can start directly with step 2:
2. Assign Services: This is where we have to assign the Business Systems:
o In the popup, use the arrow icons on the top to choose Role =SAP_System.o Click on the +-icon of the table below and choose the F4-Help to find the Business
SystemSAP_CE8.
7/28/2019 Configure SAP PI
24/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems____________________________________________________________________________________________
24/59
o Now use the arrow icons on the top to choose Role =External_CRM_System.o Click on the Create-icon of the table below (4th icon) and choose 2 times Continueo Look for your Business System CC_CRM. If its not available here, then it has been
already created, click Cancel. If its available, then choose it, deselect the CreateCommunication Channels Automatically (Important!) and choose Finish, then Close
o If not yet assigned, click on the +-icon of the table below and choose the F4-Help to findthe Business System CC_CRM.
o Click on Assign.
3. Configure Connections: This is where we have to assign the Communication Channels:
o In the popup, use the arrow icons on the top to choose the Communication Step you wantto configure. Since we only have one step in our Integration Scenario, this is chosenautomatically.
o In the table below, click into the field Communication Channel for the Receiver BusinessSystem on the very right.
o Then click the Create-icon (3rd icon) to start the Communication Channel Wizard.o Press continue, then make sure that our template idoc_inbound_receiveris chosen, and
then press continue. Now give the Communication Channel a new unique name, so thatit does not collide with other configuration objects, after that click finish and then close.
o Finish the configuration of the connections by pressing Apply.
7/28/2019 Configure SAP PI
25/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems____________________________________________________________________________________________
25/59
4. Generate: Generate all the needed agreements automatically and finish the wizard:
o Change the general settings to Generation (no simulation), press Start.o Quickly check the log, if there are any errors.o Close the log without saving,o Close the Integration Scenario Configurator and choose Apply.
If you have later changed the Integration Scenario in the XI Integration Repository and you want toupdate the existing Configuration Scenario, then you can also start the Integration Scenario Configuratormanually:
Open your Configuration Scenario with a double click Switch to the Edit Mode Choose Configuration Scenario Integration Scenario Configurator To update the scenario, choose Settings Integration Scenario from the Integration
Repository Update. Go on with the configuration steps and generate the new configuration.
7.4 Finish the configuration manually
With the wizard we have already created all the needed XI objects, now we need to configure theconnection between XI and the SAP Backend System CE8 in the communication channel. After that, theexternal http IDOC client can be started and send messages to XI.
Finish Configuration in XI Integration Directory:
Add the connection details into the previously created Receiver Communication Channel:Open CS_ccSendMaterialRequest Service Without Party Business System SAP_CE8 CommChannel idoc_inbound_receiver. Switch into the edit mode and enter the following data:
RFC Destination: We already have an RFC Destination pointing to CE8 system (check chapter 4),so we can enter this name: CC_DEST_CE8.
Interface Version: Release 4.0 or Higher (CE8 is Enterprise 4.7) SAP Release: 470. Port: Here you have to enter your own created port according chapter 4.2, i.e. CC_CRM.
To finish the configuration in XI Integration Directory, save and activate all the changes done before.
7/28/2019 Configure SAP PI
26/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems____________________________________________________________________________________________
26/59
7.5 Check the IDOC communication
Thats it! Now you should be able to send MATFET messages from an external HTTP client to the SAPbackend system. If you have also implemented chapter 6, then the SAP system will process the MATFETmessage, and if the requested material can be found, it generates a MATMAS message and sends thatback through the XI system to your external HTTP server.
Get the port number for http-requests
In the NX7 system, go to the ICM Monitor (transaction SMICM) In the menu, choose Goto Services Find the http port number, for NX7 system this is 80.
Post the request to iccpi7.sap.com
Check message in Integration Server Monitoring
In NX7 system, open Monitoring Integration Engine Monitoring Open the Monitor for processed XML Messages Enter appropriate selection criteria and execute with F8 Check the status of your message. With a doubleclick on the flag you can inspect the details.
Sample Request:
Below you can see the path to post the request to. Theinformation about service, namespace and interface canbe taken from the matching Interface Determination,Sender part:
Its not necessary to fill the IDOC Control Record EDI_DC40. This is done by XI according to the confi-guration in the Integration Directory.
POST / sap/ xi / adapt er _pl ai n?ser vi ce=CC_CRM&namespace=urn%3asap-com%3adocument %3asap%3ai doc%3amessages&i nt er f ace=MATFET%2eALEREQ01&qos=EO HTTP/ 1. 0Cont ent - t ype: t ext/ xml ; char set =ut f - 8Host : l ocal hostAuthor i zat i on: Basi c Accept : */ *
MATMAS
MATMAS
MATNRI EQP- 101
7/28/2019 Configure SAP PI
27/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems____________________________________________________________________________________________
27/59
8 XI Content for synchronous RFC/BAPI Inbound
In the following chapter we will configure the XI system, so that we can query customer details from theSAP system using the RFC module (BAPI) BAPI_CUSTOMER_GETDETAIL . To send the message to XI,we will use the SAP HTTP Adapter. You can find the complete configuration in our XI system, so it should
be easy to copy it using different external systems and modules.As a prerequisite you should have completed chapters 3-5.
8.1 Create the Reposi tory Objects for the RFC Inbound Scenario
Open the Integration Builder, from there jump into the Integration Repository.
Important: Every change in the Integration Repository must be committed in a second step. So beforeyou leave, you should make sure to jump to the Change Lists-Tab, rightclick on your change list andchoose Activate.
Import BAPI_CUSTOMER_GETDETAIL metadata:
Since the external system already understands the BAPI_CUSTOMER_GETDETAIL message format, weonly need to import one message into the XI system. We also dont need any mapping. We import themessage into our Software Component Version.
Open your Software Component Version CCVENDOR_CRM, 1.0 of ccvendor.com ImportedObjects
Rightclick on RFCs and choose Import Enter data:
Application Server: cpce801System Number: 75your CE8-user and password
Choose the RFCs you want to import, in our case its BAPI_CUSTOMER_GETDETAIL, thenContinue.
Choose Finish, then Close after the successful import.
Create Communication Channel Templates:
The communication channels serve as the technical endpoints to the connected systems. We can createcommunication channel templates now, this makes the configuration of the integration scenario latereasier. We only need the receiver channel.
Receiver communication channel, type RFC:
Open your namespace Adapter Objects and rightclick on Comm Channel Templates,choose New
Enter a name for the RFC receiver: rfc_inbound_receiverand enter a meaningful description. Choose Adapter Type = RFC, save, then choose Receiver-type. Thats it, the details of the connection are usually defined later during the configuration and are
therefore not part of the static XI Content. Save.
7/28/2019 Configure SAP PI
28/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems____________________________________________________________________________________________
28/59
Dont forget the descriptions and the documentation!For all objects, you should always add a meaningful text in the field Description and also provide some
further documentation, by clicking on in the menu of the XI Content object:
1. Press here to show 2. Press here to addthe documentation panel documentation
7/28/2019 Configure SAP PI
29/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems____________________________________________________________________________________________
29/59
Create the Integration Scenario:
Open your namespace Integration Scenarios and rightclick on Integration Scenarios,choose New
Enter a name and description: IS_GetCustomerDetail and choose Create. Create a graphical representation of the SAP system by rightclicking into the first grey column.
The text Insert Application Component should appear, choose this one.
o Application Component Type =Product Version,title = SAP R/3 ENTERPRISE 47X110
o Role Name =SAP_Systemo Choose Apply
Create a graphical representation of the external system by rightclicking into the second greycolumn. Choose Insert Application Component.
o Application Component Type =Product Version,title =ccCRM, 10. of ccvendor.com (our external product, created previously in the SLD)
o Role Name =External_CRM_System
o Choose Apply
Dont forget to enter some documentation of your Integration Scenario. Its no bad idea todescribe the scenario quite detailed here.
Save.
Create action to send the BAPI message from the External_CRM_System
Still in the edit mode of your Integration Scenario, rightclick into the External_CRM_Systemcolumn and choose Create Action
On the next popup we have to choose Internal, since the External_CRM_System contains ourown Software Component CCVENDOR_CRM.
Enter the name SendCustDetailRequest andpress Finish, then Close
You can now find a window with the details ofthe action, switch to the change mode here.
Since we want to send a message, we need toadd a line to the Outbound Interfaces.
In the outbound-table, click on the +-icon andchoose ObjectType =Function Module
Click on the 7th icon of the table (Displayinput help) and choose the BAPI_CUST
_GETDETAIL from CCVENDOR_CRM. Enter a meaningful description and
documentation Save and close the created action
7/28/2019 Configure SAP PI
30/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems____________________________________________________________________________________________
30/59
Create action to receive the BAPI message in the SAP_System
Still in the edit mode of your Integration Scenario, rightclick into the SAP_System column andchoose Create Action
On the next popup we have to choose External, since from the view of our Software ComponentCCVENDOR_CRM SAP is the Partner Software Component.
Enter the name RecvCustDetailRequestand press Finish, then Close
You can now find a window with the detailsof the action, switch to the change modehere.
In the SAP_System, we want to receive theBAPI message, so we need to add a line tothe Inbound Interfaces.
In the inbound-table, click on the +-icon andchoose ObjectType =Function Module
Click on the 7th icon (Display input help)and choose the BAPI_CUST_GETDETAILfrom CCVENDOR_CRM.
Enter a meaningful description anddocumentation
Save and close the created action
Create connection for message flow between the previously created actions
Still in the edit mode of your Integration Scenario, check the location ofthe two created actions. To get a synchronous RFC/BAPI-connection, itsnecessary that both actions are on the same level. Make sure to movethe boxes accordingly:
Rightclick the Send-action and choose Define as Start Action.
Rightclick the Receive-action and choose Define as End Action
7/28/2019 Configure SAP PI
31/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems____________________________________________________________________________________________
31/59
Mark both actions by holding the shift-key, rightclick and choose Create Connection . In thefollowing popup, make sure that both checkboxes BAPI_CUSTOMER_GETDETAIL are marked.If you cannot see the checkboxes, then press the top middle button to switch the actions.
You can also see that the communication is synchronous:
Go to the Assign Comm Channel Template tab and assign the previously created templatesrfc_inbound_receiver in the receiver part. You can use the F4-help-icon in the Name-field to find thechannel template in our Software Component CCVENDOR_CRM.
Choose apply then save the Integration Scenario
7/28/2019 Configure SAP PI
32/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems____________________________________________________________________________________________
32/59
Check the consistency of the scenario by choosing Component View Check Configurability. Youshould only receive warning messages like:Check Result for Object IS_GetCustomerDetail Component View IS_GetCustomerDetail: Connectionfrom Action to send the Customer Detail Request to SAP to Action to receive the Customer DetailRequest in SAP has no mapping
Activate all your changes (check chapter 5 about how to activate).
Thats it. With these simple steps you have created the certifiable content for the RFC inbound scenariocompletely. If there are further communication steps involved in your scenario (other IDOCs or RFCs), youshould add them directly into the already defined Integration Scenario. For a better overview, in our tutorial wewill generate a separate Integration Scenario for each communication method.
Export the Repository Content:After you have finished the creation of all the XI Content Objects, you can export the content so that it canbe easily implemented at your customers site. J ust choose Tools Export Design Objects, select the
Software Component Version CCVENDOR_CRM, 1.0 and export the objects that belong to your contentthat should be certified (usually all objects of your Software Component Version).
Note: When you are ready for a certification test drive, pleaseprovide us the export path with the name of your XI content andthe exported SLD content zip file (see chapter 3).
8.2 Create the Configuration Scenario in XI Integration Directory
In the next step, we want to configure our Integration Scenario in the XI Integration Directory, so that it fitsinto our existing landscape with an external RFC client and the CE8 SAP system. After that, we want totest the communication. Since the system landscape is different for each customer, its not necessary toexport the Integration Directory Content.For certifiable XI Content it must be possible, to configure it automatically with the Integration ScenarioConfigurator. So we will also check, if this works as expected.
Open the Integration Builder, from there jump into the Integration Directory.
Important: Every change in the Integration Directory must be committed in a second step. So before youleave, you should make sure to jump to the Change Lists-Tab, rightclick on your change list and choose
Activate.
Clear SLD cache:
To have a consistent start, you should clear the SLD cache with Environment Clear SLD DataCache.
Import the Integration Scenario:
In the first step, we copy the Integration Scenario created in the XI Integration Repository into a Confi-guration Scenario.
Choose Tools Transfer Integration Scenario from the Integration Repository and use theF4-help-icon to find your Integration Scenario IS_GetCustomerDetail in your SoftwareComponent Version. Click Continue.
The scenario is copied into a Configuration Scenario and you should change the name, e.g. intoCS_ccGetCustomerDetail (CS is ConfiguationScenario). You can also add your company nameor initials as a prefix, so that you can find it later easily.
Click Finish and Close. This automatically starts the:
7/28/2019 Configure SAP PI
33/59
7/28/2019 Configure SAP PI
34/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems____________________________________________________________________________________________
34/59
o Finish the configuration of the connections by pressing Apply.
4. Generate: Generate all the needed agreements automatically and finish the wizard:
o Change the general settings to Generation (no simulation), press Start.o Quickly check the log, if there are any errors.o Close the log without saving,o Close the Integration Scenario Configurator and choose Apply.
If you have later changed the Integration Scenario in the XI Integration Repository and you want toupdate the existing Configuration Scenario, then you can also start the Integration Scenario Configuratormanually:
Open your Configuration Scenario with a double click Switch to the Edit Mode Choose Configuration Scenario Integration Scenario Configurator To update the scenario, choose Settings Integration Scenario from the Integration
Repository Update. Go on with the configuration steps and generate the new configuration.
8.3 Finish the configuration manually
With the wizard we have already created all the needed XI objects, now we need to configure the RFC
connection between XI and the SAP Backend System CE8 in the receiver communication channel.
7/28/2019 Configure SAP PI
35/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems____________________________________________________________________________________________
35/59
Finish Configuration in XI Integration Directory:Add the connection details to SAP into the previously createdReceiver Communication Channel:Open CS_ccGetCustomerDetail Service Without Party Business System SAP_CE8 CommChannel rfc_inbound_receiver. Switch into the edit mode and enter thefollowing data:
RFC Server Type: SAP System Application Server: cpce801.dmzwdf.sap.corp System Number: 75 Logon Language: EN Logon Client: 850 Your user and password for CE8.
If you want to make a BAPI call that needs a closing BAPI_TRANSACTION_COMMIT to commit the database change, thenyou also need to set the following parameter in the channel:
Open the Advanced Mode and select Commit Handling forSingle BAPI Calls.
To finish the configuration in XI Integration Directory, save and activate all the changes done before.
8.4 Check the RFC communication
Thats it!
Now you should be able to call the BAPI_CUSTOMER_GETDETAIL from the external client via http.
Get the port number for http-requests
In the NX7 system, go to the ICM Monitor (transaction SMICM) In the menu, choose Goto Services Find the http port number, for NX7 system this is 80.
Post the request to iccpi7.sap.com
Check message in Integration Server Monitoring
In NX7 system, open Monitoring Integration Engine Monitoring Open the Monitor for processed XML Messages Enter appropriate selection criteria, e.g. Sender-Service =CC_CRM and execute with F8.
Check the status of your message. With a doubleclick on the flag you can inspect the details.
Check message in Runtime Workbench
Open the Integration Builder, jump into the Runtime Workbench Open the Message-Monitoring and choose the Adapter Engine Enter appropriate selection criteria and click on Start Check the status and if necessary the details.
The synchronous messages are not persisted in the Integration Server by default, so they can only befound in the Runtime Workbench trace.
7/28/2019 Configure SAP PI
36/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems____________________________________________________________________________________________
36/59
Sample Request:
Below you can see the path to post the request to. Theinformation about service, namespace and interface canbe taken from the matching Interface Determination,Sender part:
POST / sap/ xi / adapt er _pl ai n?ser vi ce=CC_CRM&namespace=urn%3asap-com%3adocument %3asap%3ar f c%3af unct i ons&i nt er f ace=BAPI _CUSTOMER_GETDETAI L HTTP/ 1. 0Cont ent - t ype: t ext/ xml ; char set =ut f - 8Host : l ocal hostAuthor i zat i on: Basi c Accept : */ *
00000010000001
Sample Response:
HTTP/ 1. 0 200 OKcont ent - t ype: appl i cat i on/ xmlcont ent - l engt h: 263msggui d: 8BE65800476811D995B100300546F7E9
server: SAP Web Appl i cati on Server ( 1. 0; 640)
Company
Becker Ber l i n[ . . . ]
Check message in Integration Server Monitoring In NX7 system, open Monitoring Integration Engine Monitoring Open the Monitor for processed XML Messages Enter appropriate selection criteria, e.g. Sender-Service =CC_CRM and execute with F8 Check the status of your message. With a doubleclick on the flag you can inspect the details.
Congratulations! You have successfully created certifiable content and tested the communication. Nowall you have to do is fill out the Technical Profile questionnaire and complete the Configuration Guidedocument. Then you are ready for a certification test drive. Please make sure to read more information onthe configuration in chapters 11 and 12.
7/28/2019 Configure SAP PI
37/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems____________________________________________________________________________________________
37/59
9 XI Content for synchronous RFC/BAPI Outbound
In the following chapter we will configure the XI system, so that we can call a function module that isimplemented in the external system via http. As a sample, we will use the function module QIRF_SEND_CATALOG_ DATA, with which you can transfer catalog data. The module is defined in an external server
sample that will be called from XI. You can find the complete configuration in our XI system, so it shouldbe easy to copy it using different external systems and modules.As a prerequisite you should have completed chapters 3-5.
9.1 Create the Reposi tory Objects for the RFC Outbound Scenario
Open the Integration Builder, from there jump into the Integration Repository.
Important: Every change in the Integration Repository must be committed in a second step. So beforeyou leave, you should make sure to jump to the Change Lists-Tab, rightclick on your change list and
choose Activate.
Import QIRF_SEND_CATALOG_DATA metadata:
Since the external system already understands the QIRF_SEND_CATALOG_DATA message format, weonly need to import one message into the XI system. We also dont need any mapping. We import themessage into our Software Component Version.
Open your Software Component Version CCVENDOR_CRM, 1.0 of ccvendor.com ImportedObjects
Rightclick on RFCs and choose Import Enter data:
Application Server: cpce801
System Number: 75your CE8-user and password
Choose the RFCs you want to import, in our case its QIRF_SEND_CATALOG_DATA, thenContinue.
Choose Finish, then Close after the successful import.
Create Communication Channel Templates:
The communication channels serve as the technical endpoints to the connected systems. We can createcommunication channel templates now, this makes the configuration of the integration scenario latereasier.
Receiver communication channel, type HTTP:
Open your namespace Adapter Objects and rightclick on Comm Channel Templates,choose New
Enter a name for the RFC receiver: rfc_outbound_receiverand enter a meaningful description. Choose Adapter Type = HTTP by using the F4-Help-icon, save, then choose Receiver-type. Thats it, the details of the connection are usually defined later during the configuration and are
therefore not part of the static XI Content. Save.
7/28/2019 Configure SAP PI
38/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems____________________________________________________________________________________________
38/59
Sender communication channel, type RFC:
Open your namespace Adapter Objects and rightclick on Comm Channel Templates,choose New
Enter a name for the RFC sender: rfc_outbound_senderand enter a meaningful description. Choose Adapter Type = RFC by using the F4-Help-icon.
Thats it, the details of the connection are usually defined later during the configuration and aretherefore not part of the static XI Content. Save.
Dont forget the descriptions and the documentation!For all objects, you should always add a meaningful text in the field Description and also provide some
further documentation, by clicking on in the menu of the XI Content object:
1. Press here to show 2. Press here to addthe documentation panel documentation
Create the Integration Scenario:
Open your namespace Integration Scenarios and rightclick on Integration Scenarios,choose New
Enter a name and description: IS_ReceiveCatalogData and choose Create. Create a graphical representation of the SAP system by rightclicking into the first grey column.
The text Insert Application Component should appear, choose this one.
7/28/2019 Configure SAP PI
39/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems____________________________________________________________________________________________
39/59
o Application Component Type =Product Version,title = SAP R/3 ENTERPRISE 47X110
o Role Name =SAP_Systemo Choose Apply
Create a graphical representation of the external system by rightclicking into the second greycolumn. Choose Insert Application Component.
o Application Component Type =Product Version,title =ccCRM, 10. of ccvendor.com (our external product, created previously in the SLD)
o Role Name =External_CRM_Systemo Choose Apply
Dont forget to enter some documentation of your Integration Scenario. Its no bad idea todescribe the scenario quite detailed here.
Save.
Create action to send the RFC message from the SAP_System
Still in the edit mode of your Integration Scenario, rightclick into the SAP_System column andchoose Create Action
On the next popup we have to choose External, since from the view of our Software ComponentCCVENDOR_CRM SAP is the Partner Software Component.
Enter the name SendCatalogDataQuery andpress Finish, then Close
You can now find a window with the details of
the action, switch to the change mode here. Since we want to send a message, we need to
add a line to the Outbound Interfaces. In the outbound-table, click on the +-icon and
choose ObjectType =Function Module Click on the 7th icon of the table (Display input
help) and choose theQIRF_SEND_CATALOG_DATA fromCCVENDOR_CRM.
Enter a meaningful description anddocumentation
Save and close the created action
7/28/2019 Configure SAP PI
40/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems____________________________________________________________________________________________
40/59
Create action to receive the RFC message in the External_CRM_System
Still in the edit mode of your Integration Scenario, rightclick into the External_CRM_Systemcolumn and choose Create Action
On the next popup we have to choose Internal, since the External_CRM_System contains ourown Software Component CCVENDOR_CRM.
Enter the name RecvCatalogDataQueryand press Finish, then Close You can now find a window with the details
of the action, switch to the change modehere.
In the External_System, we want to receivethe RFC message, so we need to add a lineto the Inbound Interfaces.
In the inbound-table, click on the +-icon andchoose ObjectType =Function Module
Click on the 7th icon (Display input help)and choose theQIRF_SEND_CATALOG_DATA from
CCVENDOR_CRM. Enter a meaningful description and
documentation Save and close the created action
Create connection for message flow between the previously created actions
Still in the edit mode of your Integration Scenario, check the location ofthe two created actions. To get a synchronous RFC/BAPI-connection, its
necessary that both actions are on the same level. Make sure to movethe boxes accordingly:
Rightclick the Send-action and choose Define as Start Action.
Rightclick the Receive-action and choose Define as End Action
Mark both actions by holding the shift-key, rightclick and choose Create Connection . In thefollowing popup, make sure that both checkboxes QIRF_SEND_CATALOG_DATA are marked.If you cannot see the checkboxes, then press the top middle button to switch the actions.
You can also see that the communication is synchronous:
7/28/2019 Configure SAP PI
41/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems____________________________________________________________________________________________
41/59
Go to the Assign Comm Channel Template tab and assign the previously created templatesrfc_outbound_senderin the sender part and rfc_outbound_receiverin the receiver part. You can use theF4-help-icon in the Name-field to find the channel template in our Software ComponentCCVENDOR_CRM.
Choose apply then save the Integration Scenario
Check the consistency of the scenario by choosing Component View Check Configurability. Youshould only receive warning messages like:Check Result for Object IS_ReceiveCatalogData Component View IS_RecvCatalogData: Connectionfrom Action to send the Catalog Data Query from SAP to Action to receive the Catalog Data Query from
SAP has no mapping
Activate all your changes (check chapter 5 about how to activate).
Thats it. With these simple steps you have created the certifiable content for the RFC inbound scenariocompletely. If there are further communication steps involved in your scenario (other IDOCs or RFCs), youshould add them directly into the already defined Integration Scenario. For a better overview, in our tutorial wewill generate a separate Integration Scenario for each communication method.
Export the Repository Content:
After you have finished the creation of all the XI Content Objects, you can export the content so that it can
be easily implemented at your customers site. J ust choose Tools Export Design Objects, select theSoftware Component Version CCVENDOR_CRM, 1.0 and export the objects that belong to your contentthat should be certified (usually all objects of your Software Component Version).
7/28/2019 Configure SAP PI
42/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems____________________________________________________________________________________________
42/59
Note: When you are ready for a certification test drive, pleaseprovide us the export path with the name of your XI content andthe exported SLD content zip file (see chapter 3).
9.2 Create the Configuration Scenario in XIIntegration Directory
In the next step, we want to configure our Integration Scenario in the XI Integration Directory, so that it fitsinto our existing landscape with an external RFC server and the CE8 SAP system. After that, we want totest the communication. Since the system landscape is different for each customer, its not necessary toexport the Integration Directory Content.For certifiable XI Content it must be possible, to configure it automatically with the Integration ScenarioConfigurator. So we will also check, if this works as expected.
Open the Integration Builder, from there jump into the Integration Directory.
Important: Every change in the Integration Directory must be committed in a second step. So before youleave, you should make sure to jump to the Change Lists-Tab, rightclick on your change list and chooseActivate.
Clear SLD cache:To have a consistent start, you should clear the SLD cache with Environment Clear SLD DataCache.
Import the Integration Scenario:In the first step, we copy the Integration Scenario created in the XI Integration Repository into a Confi-guration Scenario.
Choose Tools Transfer Integration Scenario from the Integration Repository and use theF4-help-icon to find your Integration Scenario IS_ReceiveCatalogData in your SoftwareComponent Version. Click Continue.
The scenario is copied into a Configuration Scenario and you should change the name, e.g. intoCS_ccReceiveCatalogData (CS is ConfiguationScenario). You can also add your companyname or initials as a prefix, so that you can find it later easily.
Click Finish and Close. This automatically starts the:
Integration Scenario Configurator:In this step we have to assign Services to our two Application Components SAP_System and External
_CRM_System of our Integration Scenario. These services are the physically existent Business Systems
CC_CRM and SAP_CE8 that we have created in the System Landscape Directory in chapter 3.We can start directly with step 2:
2. Assign Services: This is where we have to assign the Business Systems:
o In the popup, use the arrow icons on the top to choose Role =SAP_System.o Click on the +-icon of the table below and choose the F4-Help to find the Business
SystemSAP_CE8.
7/28/2019 Configure SAP PI
43/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems____________________________________________________________________________________________
43/59
o Now use the arrow icons on the top to choose Role =External_CRM_System.o Click on the Create-icon of the table below (4th icon) and choose 2 times Continueo Look for your Business System CC_CRM. If its not available here, then it has been
already created, click Cancel. If its available, then choose it, deselect the CreateCommunication Channels Automatically (Important!) and choose Finish, then Close
o If not yet assigned, click on the +-icon of the table below and choose the F4-Help to findthe Business System CC_CRM.
o Click on Assign.
3. Configure Connections: This is where we have to assign the Communication Channels:
o In the popup, use the arrow icons on the top to choose the Communication Step you wantto configure. Since we only have one step in our Integration Scenario, this is chosenautomatically.
o In the table below, click into the field Communication Channel for the Sender BusinessSystem.
o Then click the Create-icon (3rd icon) to start the Communication Channel Wizard.
o Press continue, then make sure that our template rfc_outbound_senderis chosen, andthen press continue. Now give the Communication Channel a new unique name, so thatit does not collide with other configuration objects, after that click finish and then close.
o Now click into the field Communication Channel for the Receiver Business System on thevery right.
o Then click the Create-icon (3rd icon) to start the Communication Channel Wizard.o Press continue, then make sure that our template rfc_outbound_receiveris chosen, and
then press continue. Now give the Communication Channel a new unique name, so thatit does not collide with other configuration objects, after that click finish and then close.
o Finish the configuration of the connections by pressing Apply.
7/28/2019 Configure SAP PI
44/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems____________________________________________________________________________________________
44/59
4. Generate: Generate all the needed agreements automatically and finish the wizard:
o Change the general settings to Generation (no simulation), press Start.o Quickly check the log, if there are any errors.o Close the log without saving,o Close the Integration Scenario Configurator and choose Apply.
If you have later changed the Integration Scenario in the XI Integration Repository and you want toupdate the existing Configuration Scenario, then you can also start the Integration Scenario Configuratormanually:
Open your Configuration Scenario with a double click Switch to the Edit Mode Choose Configuration Scenario Integration Scenario Configurator To update the scenario, choose Settings Integration Scenario from the Integration
Repository Update. Go on with the configuration steps and generate the new configuration.
9.3 Finish the configuration manually
With the wizard we have already created all the needed XI objects, now we need to configure the RFCconnection between XI and the SAP Backend System CE8 in the sender communication channel. Thischannel registers on the gateway of the backend using a Program ID.We also have to configure the connection to the external http server in the receiver communicationchannel.
Finish Configuration in XI Integration Directory:
Add the connection details to SAP into the previously createdSender Communication Channel:Open CS_ccReceiveCatalogData Service Without Party Business System SAP_CE8 CommChannel rfc_outbound_sender. Switch into the edit mode and enter thefollowing data:
RFC Server Parmeter:
This specifies the Gateway of the SAP Backend System CE8: Appl Server: cpce801.dmzwdf.sap.corp Appl Server Service: sapgw75 Program ID: CC_GET_CAT_REQUEST
Select Unicode appropriately, if SAP Backend is
Unicode enabled. Open the Advanced Mode and deselect the Verify
Sender System(important!)
RFC Metadata Repository Parameter:Since the metadata of the RFC modules (structures, tables etc.)cannot be read from the external http Server, its necessary tospecify our SAP Application Server here:
Application Server: cpce801.dmzwdf.sap.corp System Number: 75 Logon Language: EN Logon Client: 850 Your user and password for CE8.
7/28/2019 Configure SAP PI
45/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems____________________________________________________________________________________________
45/59
Now add the connection details to the external http Server into the previously created Receiver Commu-nication Channel:Open CS_ccReceiveCatalogData Service Without Party Business System CC_CRM CommChannel rfc_outbound_receiver. Switch into the edit mode and enter the following data:
o Target host: Host of http servero Service number: Port of http servero Path: Path of http service
To access the internet:o Proxy Host: 155.56.68.229o Proxy Port: 8080o Authentication data if necessary
To finish the configuration in XI Integration Directory, save andactivate all the changes done before.
Finish Configuration in SAP Backend System CE8:Create a TCP/IP destination in the CE8 system that connects with the Sender Communication Channelcreated above:
Enter SM59, press Create RFC Destination: CC_GET_CAT_REQUEST Connection Type: T
Description: Now press return key Activation Type: Registered Server Program Program ID: Use the one from the SenderCommChannel: CC_GET_CAT_REQUEST Save, then test the connection.
9.4 Check the RFC communication
Thats it! Now you should be able to call the QIRF_SEND_CATALOG_DATA in the external http Server.
Configuration considerations:Uniqueness of the receiver: The receiver of a certain synchronous call from a certain Backend systemmust be unique, e.g. in the NX7 Integration Directory you can only have one configured receiver for thecall QIRF_SEND_CATALOG_DATA from CE8. If someone configures a second receiver, then any callfails with BE multiple receives defined.
Therefore its difficult to configure outbound RFC integration scenarios on NX7, because this is a sharedsystem that is used by many ISVs.
Unicode: If the RFC Metadata Repository System specified in the Re