SAP NetWeaver Process Integration Performance Check - Analyzing Performance Issues and Possible Solution Strategies
SAP PI GuideFull description
SAP PI tutorial
SAP-PI-Monitoring-Activities.pdf
Full description
SAP-PI-XI-Full description
manual pi
Full description
Sap pi Adapters FaqFull description
SAP PIFull description
SAP PI InstallationFull description
Document Describes JDBS Drivers deployment procedure in SAP XI/PIFull description
JDBC Adapter in SAP PI
JDBC Adapter in SAP PI
Basics About SAP PI 7.1Full description
Full description
SAP PI SALESFORCE BULK APIFull description
Full description
Configure Quota Arrangement in SAP MMFull description
How to configure SAP XI/PI to use the standard SAP communication APIs (Idoc, Bapi, Rfc, Enterprise Services) from external systems How to create the necessary certifiable XI Content with the XI Integration Builder SAP Integration & Certification Center, [email protected] Updated version for XI/PI 7.0
February 2009
Contents 1 2 3 4 5 6 7 8 9 10 11 12
Introduction ..................................................................................................................2 First steps......................................................................................................................2 Add your system into the System Landscape Directory .................................................4 Establish the connection between the SAP systems .......................................................6 Transfer your Software Component into the Integration Repository ..............................7 XI Content for asynchronous IDOC Outbound..............................................................8 XI Content for asynchronous IDOC Inbound .............................................................. 18 XI Content for synchronous RFC/BAPI Inbound ........................................................ 27 XI Content for synchronous RFC/BAPI Outbound...................................................... 37 XI Content to invoke Web Services / SAP Enterprise Services.................................... 47 How to import/configure your XI Content in a target XI system.................................. 58 Files needed for Certification ...................................................................................... 59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems ____________________________________________________________________________________________
1 Introduction Purpose of this document This document describes how the SAP Exchange Infrastructure (XI/PI) 3.0 or 7.0 can be configured, so that 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 with the backend SAP system is done with IDOCs or RFC modules (BAPIs). You could also integrate with the latest SAP systems using SAP Enterprise Services (see chapter 10). Throughout the document we will always use the term “XI”.
SAP Backend System
RFC
Rfc Adapter
SAP XI http Adapter
IDOC
http/ XML
3rd party system
Idoc adapter
The configuration of XI will lead to certifiable XI Content, that can be extracted and again imported into the 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 Exchange Infrastructure. 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 Requirements It’s possible to certify an integration scenario with an SAP backend system using XI. To do that it’s necessary that the 3rd party system integrates with XI via one of the standard SAP adapters or a certified 3rd party adapter. XI Content Certification This tutorial lists all the steps that are necessary to get certifiable XI Content. But sure, you should also check the NW-XI-CNT certification test catalog. Please ask your local ICC to get further details about this ([email protected] or [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. To include other XI systems or SAP backend systems further configuration might be necessary. You can get access to this test environment through our Remote Access Kit (RAC). For more information regarding RAC 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 Java WebStart on your PC. You can get this as part of the J2SE platform provided by SUN. After the installation you should start Java WebStart manually and configure it correctly, so that it can access the internet (also check chapter 2.1). You should be able to execute the sample applications located on http://java.sun.com/products/javawebstart/apps/remoteApps.html.
2/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems ____________________________________________________________________________________________
Now start the XI system NX7 and log on. After the logon, you should activate the user menu (ctrl-F10) to find all the necessary programs to configure, use and monitor the XI system. As a first check you should start 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 you can start all the four tools IntegrationRepository, IntegrationDirectory, SystemLandscapeDirectory and RuntimeWorkbench. The two Integration tools are based on Java WebStart and perhaps you have to start them several times before all the necessary classes are loaded completely into the WebStart-cache (see following 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 a proxy server for your internet connection, you should configure your browser accordingly. Also the Java Web Start tool must be configured. You can use the Java Web Start Preferences panel to view or edit the proxy configuration. Launch the Application Manager, either by clicking on the icon on the desktop (Microsoft Windows), or type ./javaws in the Java Web Start installation directory, and then select Edit/Preferences. If you are in an environment where access to the Web is through a proxy server, you are encouraged to use the Java Web Start Preferences 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 you have 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 (on windows platforms: \windows\system32\drivers\etc\hosts): 155.56.49.19
pwdf6425
pwdf6425.dmzwdf.sap.corp
iccpi7.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 the description of this customizing is not part of this tutorial. ALE communication with IDOCs is implemented as communication between Logical Systems. In the following chapters, we assume that we have the following Logical Systems defined in the SAP Backend System “CE8”: Central Logical System of CE8, client 850: CE8CLNT850 Logical System created for the external system: CC_CRM
3/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems ____________________________________________________________________________________________
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 or more Software Component Versions. At first we need to add information about this 3rd party product into the System Landscape Directory (SLD). The name of the external business system will be CC_CRM.
IMPORTANT NOTE: Please neither use the sample objects mentioned below in your scenario, 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 ICC related and does not reflect a special naming convention. You don’t have to use the same prefix
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. ccCRM Version: e.g. 1.0 Then enter Software Unit name ccCRM. Now add a Software Component Name: e.g. CCVENDOR_CRM Version: 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 your customers. Therefore you have to export it from the SLD and provide this exported file for your customers to 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 Software Components 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 are also important for the PPMS data sheet and will be entered into SAP’s internal PPMS system. Please find further details about that in the XI Content certification catalog, chapter 4.
4/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems ____________________________________________________________________________________________
Now create the “Technical System” and the “Business System”; these are customer specific and therefore not 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_system Host: your host name, e.g. P105077 Now choose the product created in the step before, e.g. ccCRM and the attached Software Components, 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 it’s 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 for our communication scenario: The SAP backend system SAP_CE8 Your external system CC_CRM
5/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems ____________________________________________________________________________________________
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 a connection 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 RFC destination that points to the XI system: RFC destination: Connection type: Documentation: Target Host: System Number:
CC_DEST_NX7 3 My Destination PWDF6425 (will then be automatically replaced by something) 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 that connects to the CE8 system. It’s 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. The port name must be SAP. So check that the following port is available. Don’t change this port, you also don’t need an additional port! Port: SAPCE8 Client: 850 RFC Destination: CC_DEST_CE8
6/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems ____________________________________________________________________________________________
5 Transfer your Software Component into the Integration Repository All the static XI configuration objects (message definitions, mappings etc.) belong to an Integration Scenario that lies in your Software Component Version created previously in the SLD. This Software Component 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 before you leave, you should make sure to jump to the “Change Lists”-Tab, rightclick on your change list and choose “Activate”.
Import your product from SLD: In the Integration Repository Menu, choose “Tools” System Landscape Directory” “Import Software Component Versions”. Choose your Software Component Version created in 3: CCVENDOR_CRM Click “Import”, then exit
“Transfer from
Add the Namespace: Open the Software Component, then doubleclick the Software Component Version CCVENDOR_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 o
System: Client:
CE8 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 finish the XI Content Development.
7/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems ____________________________________________________________________________________________
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 the CE8 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-IDOCs can be sent to the logical system CC_CRM. This name must match with the logical system name of the external Business System created in chapter 3. You also need to know the central logical system of the client (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 created in 4.1.
6.2
Create the Repository 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 before you leave, you should make sure to jump to the “Change Lists”-Tab, rightclick on your change list and choose “Activate”. Import MATMAS01 message data: Since the external system already understands the MATMAS01 message format, we only need to import one message type into the XI system. We also don’t need any mapping. We can import the message type into our Software Component Version. Open your Software Component Version CCVENDOR_CRM, 1.0 of ccvendor.com “Imported Objects” Rightclick on “IDOCs” and choose “Import” Enter data: Application Server: cpce801 System Number: 75 your CE8-user and password Choose the IDOCs you want to import, in our case it’s MATMAS.MATMAS01, then “Continue”. Choose “Finish”, then “Close” after the successful import.
8/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems ____________________________________________________________________________________________
Create Communication Channel Templates: The communication channels serve as the technical endpoints to the connected systems. Since we already know, that the SAP sender is connected via IDOC and the receiving external system is connected via http, we can create the templates for these endpoints now. This makes the configuration of the integration 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_HTTPreceiver and enter a meaningful description. Choose “Adapter Type” = “HTTP” by using the F4-Help-icon, save, then choose “Receiver”-type. That’s it, the details of the connection are usually defined later during the configuration and are therefore not part of the static XI Content. Save. Don’t 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 the documentation panel
2. Press here to add documentation
9/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems ____________________________________________________________________________________________
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 o o
Application Component Type = Product Version, title = SAP R/3 ENTERPRISE 47X110 Role – Name = SAP_System Choose “Apply”
Create a graphical representation of the external system by rightclicking into the second grey column. Choose “Insert Application Component”. o o o
Application Component Type = Product Version, title = ccCRM, 10. of ccvendor.com (our external product, created previously in the SLD) Role – Name = External_CRM_System Choose “Apply”
Don’t forget to enter some documentation of your Integration Scenario. It’s no bad idea to describe 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 and choose “Create Action” On the next popup we have to choose “External”, since from the view of our Software Component “CCVENDOR_CRM” SAP is the Partner Software Component. Enter the name “SendMatmas” and press “Finish”, then “Close” You can now find a window with the details of the action, switch to the change mode here. From the SAP_System we want to send the MATMAS message, so we need to add a line to the “Outbound Interfaces”. In the outbound-table, click on the +-icon and choose ObjectType = IDOC Click on the 7th icon of the table (“Display input help”) and choose the MATMAS01 from your Software Component CCVENDOR_CRM. Enter a meaningful description and documentation 10/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems ____________________________________________________________________________________________
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_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 “ReceiveMatmas” and press “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 receive a message, we need to add a line to the “Inbound Interfaces”. In the inbound-table, click on the +-icon and choose ObjectType = IDOC Click on the 7th icon of the table (“Display input 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 of the two created actions. To get an asynchronous IDOC-connection, it’s necessary that the receiving action is “below” the sending action. Make sure to move the “ReceiveMatmas”-box accordingly:
Rightclick the action “SendMatmas” and choose “Define as Start Action”. Rightclick the action “ReceiveMatmas” and choose “Define as End Action”
Mark both actions by holding the shift-key, rightclick and choose “Create Connection …”. In the following popup, make sure that both checkboxes “MATMAS.MATMAS01” are marked. You can also see that the communication is asynchronous:
11/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems ____________________________________________________________________________________________
Go to the “Assign Comm Channel Template” tab and assign the previously created template idoc_outbound_receiver in the receiver part. You can use the F4-help-icon in the “Name”-field to find the channel template in our Software Component CCVENDOR_CRM. Leave the sender part empty, as we don’t 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”. You should 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 SAP has no mapping”
Activate all your changes (check chapter 5 about how to activate).
That’s it. With these simple steps you have created the certifiable content for the IDOC outbound scenario completely. 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 we will generate a separate Integration Scenario for each communication method.
12/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems ____________________________________________________________________________________________
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. Just choose “Tools Export Design Objects”, select the Software Component Version “CCVENDOR_CRM, 1.0” and export the objects that belong to your content that should be certified (usually “all objects of your Software Component Version”).
Note: When you are ready for a certification test drive, please provide us the export path with the name of your XI content and the 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 fits into our existing landscape with an external HTTP server and the CE8 SAP system. After that, we want to test the communication. Since the system landscape is different for each customer, it’s not necessary to export the Integration Directory Content. For certifiable XI Content it must be possible, to configure it automatically with the Integration Scenario Configurator. 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 you leave, 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” Cache”.
“Clear SLD Data
Import the Integration Scenario: In the first step, we copy the Integration Scenario created in the XI Integration Repository into a Configuration Scenario. Choose “Tools” “Transfer Integration Scenario from the Integration Repository” and use the F4-help-icon to find your Integration Scenario IS_ReceiveMaterialMaster in your Software Component Version. Click “Continue” The scenario is copied into a Configuration Scenario and you should change the name, e.g. into CS_ccReceiveMaterialMaster (“CS” is ConfiguationScenario). You can also add your company name 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.
13/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems ____________________________________________________________________________________________
We can start directly with step 2: 2. Assign Services: This is where we have to assign the Business Systems: o o
In the popup, use the arrow icons on the top to choose Role = SAP_System. Click on the “+”-icon of the table below and choose the F4-Help to find the Business System SAP_CE8.
o o o
Now use the arrow icons on the top to choose Role = External_CRM_System. Click on the “Create”-icon of the table below (4th icon) and choose 2 times “Continue” Look for your Business System CC_CRM. If it’s not available here, then it has been already created, click “Cancel”. If it’s available, then choose it, deselect the “Create Communication Channels Automatically” (Important!) and choose “Finish”, then “Close” If not yet assigned, click on the “+”-icon of the table below and choose the F4-Help to find the Business System CC_CRM.
o
o
Click on “Assign”.
3. Configure Connections: This is where we have to assign the Communication Channels: o
o o
In the popup, use the arrow icons on the top to choose the Communication Step you want to configure. Since we only have one step in our Integration Scenario, this is chosen automatically. In the table below, click into the field “Communication Channel” for the Receiver Business System on the very right. Then click the “Create”-icon (3rd icon) to start the Communication Channel Wizard.
14/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems ____________________________________________________________________________________________
o
Press “continue”, then make sure that our template idoc_outbound_receiver is chosen, and then press “continue”. Now give the Communication Channel a new unique name, so that it 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 o o o
Change the general settings to “Generation” (no simulation), press “Start”. Quickly check the log, if there are any errors. Close the log without saving, Close the Integration Scenario Configurator and choose “Apply”.
If you have later changed the Integration Scenario in the XI Integration Repository and you want to update the existing Configuration Scenario, then you can also start the Integration Scenario Configurator manually: 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 the connection 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 server o Service number: Port of http server o Path: Path of http service To access the internet: o Proxy Host: 155.56.68.229 o Proxy Port: 8080 o Authentication data if necessary 15/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems ____________________________________________________________________________________________
To finish the configuration in XI Integration Directory, save and activate all the changes done before.
6.5
Check the IDOC communication
That’s it! Now you should be able to send MATMAS01 IDOCs from the SAP backend system to the external 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
16/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems ____________________________________________________________________________________________
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 /?msgguid=F0D38FDC18C5BA4E977FC5DEE169F3EE&service=SAP_CE8&namespace=urn%3asapcom%3adocument%3asap%3aidoc%3amessages&interface=MATMAS%2eMATMAS01&qos=EO HTTP/1.0 content-type: text/xml content-length: 25524 connection: close accept: */* user-agent: SAP Web Application Server (1.0;640) host: P105077:123 accept-encoding: gzip
[…]
The unique message ID (GUID) can be found in the http header: msgguid=F0D38FDC18C5BA4E977FC5DEE169F3EE
Sample Response:
HTTP/1.1 200 Ok Content-Type: text/xml; charset=utf-8 Content-Length: 0
Congratulations! You have successfully created certifiable content and tested the communication. Now all 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 on the configuration in chapters 11 and 12.
17/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems ____________________________________________________________________________________________
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 the external system CC_CRM to the CE8 system through XI using the SAP IDOC and HTTP Adapter. These messages 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 be easy 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-IDOCs can be received from the logical system CC_CRM. This name must match with the logical system name of the external Business System created in chapter 3. You also need to know the central logical system of the 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 before you leave, you should make sure to jump to the “Change Lists”-Tab, rightclick on your change list and choose “Activate”. Import ALEREQ01 message data: Since the external system already understands the ALEREQ01 message format, we only need to import one message type into the XI system. We also don’t need any mapping. We import the message type into our Software Component Version. Open your Software Component Version CCVENDOR_CRM, 1.0 of ccvendor.com “Imported Objects” Rightclick on “IDOCs” and choose “Import” Enter data: Application Server: cpce801 System Number: 75 your CE8-user and password Choose the IDOCs you want to import, in our case it’s 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 we already know, that the SAP receiver is connected via IDOC and the sending external system is connected via http, we can create the templates for these endpoints now. This makes the configuration of the integration 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_receiver and enter a meaningful description. Choose “Adapter Type” = “Idoc”, save, then choose “Receiver”-type. That’s it, the details of the connection are usually defined later during the configuration and are therefore not part of the static XI Content. Save. 18/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems ____________________________________________________________________________________________
Don’t 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 the documentation panel
2. Press here to add 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 o o
Application Component Type = Product Version, title = SAP R/3 ENTERPRISE 47X110 Role – Name = SAP_System Choose “Apply”
19/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems ____________________________________________________________________________________________
Create a graphical representation of the external system by rightclicking into the second grey column. Choose “Insert Application Component”. o o o
Application Component Type = Product Version, title = ccCRM, 10. of ccvendor.com (our external product, created previously in the SLD) Role – Name = External_CRM_System Choose “Apply”
Don’t forget to enter some documentation of your Integration Scenario. It’s no bad idea to describe 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 press “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 = IDOC Click on the 7th icon of the table (“Display input help”) and choose the ALEREQ01 from your Software Component CCVENDOR_CRM. Enter a meaningful description and documentation Save and close the created action
20/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems ____________________________________________________________________________________________
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 and choose “Create Action” On the next popup we have to choose “External”, since from the view of our Software Component “CCVENDOR_CRM” SAP is the Partner Software Component. Enter the name “ReceiveMatfet” and press “Finish”, then “Close” You can now find a window with the details of the action, switch to the change mode here. In the SAP_System, we want to receive the MATFET message, so we need to add a line to the “Inbound Interfaces”. In the inbound-table, click on the +-icon and choose ObjectType = IDOC Click on the 7th icon (“Display input help”) and choose the ALEREQ01 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 of the two created actions. To get an asynchronous IDOC-connection, it’s necessary that the receiving action is “below” the sending action. Make sure 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 the following popup, make sure that both checkboxes “MATFET.ALEREQ01” are marked. You can also see that the communication is asynchronous:
21/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems ____________________________________________________________________________________________
Go to the “Assign Comm Channel Template” tab and assign the previously created template idoc_inbound_receiver in the receiver part. You can use the F4-help-icon in the “Name”-field to find the channel template in our Software Component CCVENDOR_CRM. Leave the sender part empty, as we don’t 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”. You should 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 Material Master Request has no mapping” Activate all your changes (check chapter 5 about how to activate).
That’s it. With these simple steps you have created the certifiable content for the IDOC inbound scenario completely. 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 we will generate a separate Integration Scenario for each communication method.
22/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems ____________________________________________________________________________________________
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. Just choose “Tools Export Design Objects”, select the Software Component Version “CCVENDOR_CRM, 1.0” and export the objects that belong to your content that should be certified (usually “all objects of your Software Component Version”).
Note: When you are ready for a certification test drive, please provide us the export path with the name of your XI content and the 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 fits into 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, it’s not necessary to export the Integration Directory Content. For certifiable XI Content it must be possible, to configure it automatically with the Integration Scenario Configurator. 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 you leave, 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” Cache”.
“Clear SLD Data
Import the Integration Scenario: In the first step, we copy the Integration Scenario created in the XI Integration Repository into a Configuration Scenario. Choose “Tools” “Transfer Integration Scenario from the Integration Repository” and use the F4-help-icon to find your Integration Scenario IS_SendMaterialRequest in your Software Component Version. Click “Continue” The scenario is copied into a Configuration Scenario and you should change the name, e.g. into CS_ccSendMaterialRequest (“CS” is ConfiguationScenario). You can also add your company name 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 o
In the popup, use the arrow icons on the top to choose Role = SAP_System. Click on the “+”-icon of the table below and choose the F4-Help to find the Business System SAP_CE8.
23/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems ____________________________________________________________________________________________
o o o
o
o
Now use the arrow icons on the top to choose Role = External_CRM_System. Click on the “Create”-icon of the table below (4th icon) and choose 2 times “Continue” Look for your Business System CC_CRM. If it’s not available here, then it has been already created, click “Cancel”. If it’s available, then choose it, deselect the “Create Communication Channels Automatically” (Important!) and choose “Finish”, then “Close” If not yet assigned, click on the “+”-icon of the table below and choose the F4-Help to find the Business System CC_CRM.
Click on “Assign”.
3. Configure Connections: This is where we have to assign the Communication Channels: o
o o o
o
In the popup, use the arrow icons on the top to choose the Communication Step you want to configure. Since we only have one step in our Integration Scenario, this is chosen automatically. In the table below, click into the field “Communication Channel” for the Receiver Business System on the very right. Then click the “Create”-icon (3rd icon) to start the Communication Channel Wizard. Press “continue”, then make sure that our template idoc_inbound_receiver is chosen, and then press “continue”. Now give the Communication Channel a new unique name, so that it does not collide with other configuration objects, after that click “finish” and then “close”.
Finish the configuration of the connections by pressing “Apply”. 24/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems ____________________________________________________________________________________________
4. Generate: Generate all the needed agreements automatically and finish the wizard: o o o o
Change the general settings to “Generation” (no simulation), press “Start”. Quickly check the log, if there are any errors. Close the log without saving, Close the Integration Scenario Configurator and choose “Apply”.
If you have later changed the Integration Scenario in the XI Integration Repository and you want to update the existing Configuration Scenario, then you can also start the Integration Scenario Configurator manually: 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 the connection between XI and the SAP Backend System CE8 in the communication channel. After that, the external 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.
25/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems ____________________________________________________________________________________________
7.5
Check the IDOC communication
That’s it! Now you should be able to send MATFET messages from an external HTTP client to the SAP backend system. If you have also implemented chapter 6, then the SAP system will process the MATFET message, and if the requested material can be found, it generates a MATMAS message and sends that back 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. The information about service, namespace and interface can be taken from the matching Interface Determination, Sender part: It’s not necessary to fill the IDOC Control Record EDI_DC40. This is done by XI according to the configuration in the Integration Directory.
POST /sap/xi/adapter_plain?service=CC_CRM&namespace=urn%3asapcom%3adocument%3asap%3aidoc%3amessages&interface=MATFET%2eALEREQ01&qos=EO HTTP/1.0 Content-type: text/xml; charset=utf-8 Host: localhost Authorization: Basic Accept: */* MATMASMATMASMATNRIP-101
Congratulations! You have successfully created certifiable content and tested the communication. Now all 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 on the configuration in chapters 11 and 12.
26/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems ____________________________________________________________________________________________
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 the SAP 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 Repository 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 before you leave, you should make sure to jump to the “Change Lists”-Tab, rightclick on your change list and choose “Activate”. Import BAPI_CUSTOMER_GETDETAIL metadata: Since the external system already understands the BAPI_CUSTOMER_GETDETAIL message format, we only need to import one message into the XI system. We also don’t need any mapping. We import the message into our Software Component Version. Open your Software Component Version CCVENDOR_CRM, 1.0 of ccvendor.com “Imported Objects” Rightclick on “RFCs” and choose “Import” Enter data: Application Server: cpce801 System Number: 75 your CE8-user and password Choose the RFCs you want to import, in our case it’s BAPI_CUSTOMER_GETDETAIL, 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. We can create communication channel templates now, this makes the configuration of the integration scenario later easier. 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_receiver and enter a meaningful description. Choose “Adapter Type” = “RFC”, save, then choose “Receiver”-type. That’s it, the details of the connection are usually defined later during the configuration and are therefore not part of the static XI Content. Save.
27/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems ____________________________________________________________________________________________
Don’t 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 the documentation panel
2. Press here to add documentation
28/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems ____________________________________________________________________________________________
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 o o
Application Component Type = Product Version, title = SAP R/3 ENTERPRISE 47X110 Role – Name = SAP_System Choose “Apply”
Create a graphical representation of the external system by rightclicking into the second grey column. Choose “Insert Application Component”. o o o
Application Component Type = Product Version, title = ccCRM, 10. of ccvendor.com (our external product, created previously in the SLD) Role – Name = External_CRM_System Choose “Apply”
Don’t forget to enter some documentation of your Integration Scenario. It’s no bad idea to describe 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_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 “SendCustDetailRequest” and press “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 the BAPI_CUST _GETDETAIL from CCVENDOR_CRM. Enter a meaningful description and documentation Save and close the created action 29/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems ____________________________________________________________________________________________
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 and choose “Create Action” On the next popup we have to choose “External”, since from the view of our Software Component “CCVENDOR_CRM” SAP is the Partner Software Component. Enter the name “RecvCustDetailRequest” and press “Finish”, then “Close” You can now find a window with the details of the action, switch to the change mode here. In the SAP_System, we want to receive the BAPI message, so we need to add a line to the “Inbound Interfaces”. In the inbound-table, click on the +-icon and choose ObjectType = Function Module Click on the 7th icon (“Display input help”) and choose the BAPI_CUST_GETDETAIL 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 of the two created actions. To get a synchronous RFC/BAPI-connection, it’s necessary that both actions are on the same level. Make sure to move the boxes accordingly:
Rightclick the Send-action and choose “Define as Start Action”. Rightclick the Receive-action and choose “Define as End Action”
30/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems ____________________________________________________________________________________________
Mark both actions by holding the shift-key, rightclick and choose “Create Connection …”. In the following 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 templates rfc_inbound_receiver in the receiver part. You can use the F4-help-icon in the “Name”-field to find the channel template in our Software Component CCVENDOR_CRM.
Choose apply then save the Integration Scenario
31/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems ____________________________________________________________________________________________
Check the consistency of the scenario by choosing “Component View” “Check Configurability”. You should only receive warning messages like: “Check Result for Object IS_GetCustomerDetail Component View IS_GetCustomerDetail: Connection from Action to send the Customer Detail Request to SAP to Action to receive the Customer Detail Request in SAP has no mapping”
Activate all your changes (check chapter 5 about how to activate). That’s it. With these simple steps you have created the certifiable content for the RFC inbound scenario completely. 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 we will 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. Just choose “Tools Export Design Objects”, select the Software Component Version “CCVENDOR_CRM, 1.0” and export the objects that belong to your content that should be certified (usually “all objects of your Software Component Version”).
Note: When you are ready for a certification test drive, please provide us the export path with the name of your XI content and the 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 fits into our existing landscape with an external RFC client and the CE8 SAP system. After that, we want to test the communication. Since the system landscape is different for each customer, it’s not necessary to export the Integration Directory Content. For certifiable XI Content it must be possible, to configure it automatically with the Integration Scenario Configurator. 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 you leave, 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” Cache”.
“Clear SLD Data
Import the Integration Scenario: In the first step, we copy the Integration Scenario created in the XI Integration Repository into a Configuration Scenario. Choose “Tools” “Transfer Integration Scenario from the Integration Repository” and use the F4-help-icon to find your Integration Scenario IS_GetCustomerDetail in your Software Component Version. Click “Continue”. The scenario is copied into a Configuration Scenario and you should change the name, e.g. into CS_ccGetCustomerDetail (“CS” is ConfiguationScenario). You can also add your company name or initials as a prefix, so that you can find it later easily. Click “Finish” and “Close”. This automatically starts the: 32/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems ____________________________________________________________________________________________
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 o
In the popup, use the arrow icons on the top to choose Role = SAP_System. Click on the “+”-icon of the table below and choose the F4-Help to find the Business System SAP_CE8.
o o o
Now use the arrow icons on the top to choose Role = External_CRM_System. Click on the “Create”-icon of the table below (4th icon) and choose 2 times “Continue” Look for your Business System CC_CRM. If it’s not available here, then it has been already created, click “Cancel”. If it’s available, then choose it, deselect the “Create Communication Channels Automatically” (Important!) and choose “Finish”, then “Close” If not yet assigned, click on the “+”-icon of the table below and choose the F4-Help to find the Business System CC_CRM.
o
o
Click on “Assign”.
3. Configure Connections: This is where we have to assign the Communication Channels: o
o o o
In the popup, use the arrow icons on the top to choose the Communication Step you want to configure. Since we only have one step in our Integration Scenario, this is chosen automatically. Now click into the field “Communication Channel” for the Receiver Business System on the very right. Then click the “Create”-icon (3rd icon) to start the Communication Channel Wizard. Press “continue”, then make sure that our template rfc_inbound_receiver is chosen, and then press “continue”. Now give the Communication Channel a new unique name, so that it does not collide with other configuration objects, after that click “finish” and then “close”.
33/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems ____________________________________________________________________________________________
o
Finish the configuration of the connections by pressing “Apply”.
4. Generate: Generate all the needed agreements automatically and finish the wizard: o o o o
Change the general settings to “Generation” (no simulation), press “Start”. Quickly check the log, if there are any errors. Close the log without saving, Close the Integration Scenario Configurator and choose “Apply”.
If you have later changed the Integration Scenario in the XI Integration Repository and you want to update the existing Configuration Scenario, then you can also start the Integration Scenario Configurator manually: 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.
34/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems ____________________________________________________________________________________________
Finish Configuration in XI Integration Directory: Add the connection details to SAP into the previously created Receiver Communication Channel: Open CS_ccGetCustomerDetail Service Without Party Business System SAP_CE8 CommChannel rfc_inbound_receiver. Switch into the edit mode and enter the following 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, then you also need to set the following parameter in the channel: Open the “Advanced Mode” and select “Commit Handling for Single BAPI Calls”.
To finish the configuration in XI Integration Directory, save and activate all the changes done before.
8.4
Check the RFC communication
That’s 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 be found in the Runtime Workbench trace.
35/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems ____________________________________________________________________________________________
Sample Request: Below you can see the path to post the request to. The information about service, namespace and interface can be taken from the matching Interface Determination, Sender part:
HTTP/1.0 200 OK content-type: application/xml content-length: 263 msgguid: 8BE65800476811D995B100300546F7E9 server: SAP Web Application Server (1.0;640) CompanyBecker Berlin [...]
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. Now all 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 on the configuration in chapters 11 and 12.
36/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems ____________________________________________________________________________________________
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 is implemented 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 should be easy to copy it using different external systems and modules. As a prerequisite you should have completed chapters 3-5.
9.1
Create the Repository 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 before you 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, we only need to import one message into the XI system. We also don’t need any mapping. We import the message into our Software Component Version. Open your Software Component Version CCVENDOR_CRM, 1.0 of ccvendor.com “Imported Objects” Rightclick on “RFCs” and choose “Import” Enter data: Application Server: cpce801 System Number: 75 your CE8-user and password Choose the RFCs you want to import, in our case it’s QIRF_SEND_CATALOG_DATA, 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. We can create communication channel templates now, this makes the configuration of the integration scenario later easier. 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_receiver and enter a meaningful description. Choose “Adapter Type” = “HTTP” by using the F4-Help-icon, save, then choose “Receiver”-type. That’s it, the details of the connection are usually defined later during the configuration and are therefore not part of the static XI Content. Save.
37/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems ____________________________________________________________________________________________
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_sender and enter a meaningful description. Choose “Adapter Type” = “RFC” by using the F4-Help-icon. That’s it, the details of the connection are usually defined later during the configuration and are therefore not part of the static XI Content. Save. Don’t 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 the documentation panel
2. Press here to add 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. 38/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems ____________________________________________________________________________________________
o o o
Application Component Type = Product Version, title = SAP R/3 ENTERPRISE 47X110 Role – Name = SAP_System Choose “Apply”
Create a graphical representation of the external system by rightclicking into the second grey column. Choose “Insert Application Component”. o o o
Application Component Type = Product Version, title = ccCRM, 10. of ccvendor.com (our external product, created previously in the SLD) Role – Name = External_CRM_System Choose “Apply”
Don’t forget to enter some documentation of your Integration Scenario. It’s no bad idea to describe 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 and choose “Create Action” On the next popup we have to choose “External”, since from the view of our Software Component “CCVENDOR_CRM” SAP is the Partner Software Component.
Enter the name “SendCatalogDataQuery” and press “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 the QIRF_SEND_CATALOG_DATA from CCVENDOR_CRM. Enter a meaningful description and documentation Save and close the created action
39/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems ____________________________________________________________________________________________
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_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 “RecvCatalogDataQuery” and press “Finish”, then “Close” You can now find a window with the details of the action, switch to the change mode here. In the External_System, we want to receive the RFC message, so we need to add a line to the “Inbound Interfaces”. In the inbound-table, click on the +-icon and choose ObjectType = Function Module Click on the 7th icon (“Display input help”) and choose the QIRF_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 of the two created actions. To get a synchronous RFC/BAPI-connection, it’s necessary that both actions are on the same level. Make sure to move the 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 the following 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:
40/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems ____________________________________________________________________________________________
Go to the “Assign Comm Channel Template” tab and assign the previously created templates rfc_outbound_sender in the sender part and rfc_outbound_receiver in the receiver part. You can use the F4-help-icon in the “Name”-field to find the channel template in our Software Component CCVENDOR_CRM.
Choose apply then save the Integration Scenario
Check the consistency of the scenario by choosing “Component View” “Check Configurability”. You should only receive warning messages like: “Check Result for Object IS_ReceiveCatalogData Component View IS_RecvCatalogData: Connection from 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). That’s it. With these simple steps you have created the certifiable content for the RFC inbound scenario completely. 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 we will 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. Just choose “Tools Export Design Objects”, select the Software Component Version “CCVENDOR_CRM, 1.0” and export the objects that belong to your content that should be certified (usually “all objects of your Software Component Version”). 41/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems ____________________________________________________________________________________________
Note: When you are ready for a certification test drive, please provide us the export path with the name of your XI content and the exported SLD content zip file (see chapter 3).
9.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 fits into our existing landscape with an external RFC server and the CE8 SAP system. After that, we want to test the communication. Since the system landscape is different for each customer, it’s not necessary to export the Integration Directory Content. For certifiable XI Content it must be possible, to configure it automatically with the Integration Scenario Configurator. 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 you leave, 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” Cache”.
“Clear SLD Data
Import the Integration Scenario: In the first step, we copy the Integration Scenario created in the XI Integration Repository into a Configuration Scenario. Choose “Tools” “Transfer Integration Scenario from the Integration Repository” and use the F4-help-icon to find your Integration Scenario IS_ReceiveCatalogData in your Software Component Version. Click “Continue”. The scenario is copied into a Configuration Scenario and you should change the name, e.g. into CS_ccReceiveCatalogData (“CS” is ConfiguationScenario). You can also add your company name 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 o
In the popup, use the arrow icons on the top to choose Role = SAP_System. Click on the “+”-icon of the table below and choose the F4-Help to find the Business System SAP_CE8.
42/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems ____________________________________________________________________________________________
o o o
o
o
Now use the arrow icons on the top to choose Role = External_CRM_System. Click on the “Create”-icon of the table below (4th icon) and choose 2 times “Continue” Look for your Business System CC_CRM. If it’s not available here, then it has been already created, click “Cancel”. If it’s available, then choose it, deselect the “Create Communication Channels Automatically” (Important!) and choose “Finish”, then “Close” If not yet assigned, click on the “+”-icon of the table below and choose the F4-Help to find the Business System CC_CRM.
Click on “Assign”.
3. Configure Connections: This is where we have to assign the Communication Channels: o
o o o
o o o
o
In the popup, use the arrow icons on the top to choose the Communication Step you want to configure. Since we only have one step in our Integration Scenario, this is chosen automatically. In the table below, click into the field “Communication Channel” for the Sender Business System. Then click the “Create”-icon (3rd icon) to start the Communication Channel Wizard. Press “continue”, then make sure that our template rfc_outbound_sender is chosen, and then press “continue”. Now give the Communication Channel a new unique name, so that it does not collide with other configuration objects, after that click “finish” and then “close”. Now click into the field “Communication Channel” for the Receiver Business System on the very right. Then click the “Create”-icon (3rd icon) to start the Communication Channel Wizard. Press “continue”, then make sure that our template rfc_outbound_receiver is chosen, and then press “continue”. Now give the Communication Channel a new unique name, so that it does not collide with other configuration objects, after that click “finish” and then “close”.
Finish the configuration of the connections by pressing “Apply”.
43/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems ____________________________________________________________________________________________
4. Generate: Generate all the needed agreements automatically and finish the wizard: o o o o
Change the general settings to “Generation” (no simulation), press “Start”. Quickly check the log, if there are any errors. Close the log without saving, Close the Integration Scenario Configurator and choose “Apply”.
If you have later changed the Integration Scenario in the XI Integration Repository and you want to update the existing Configuration Scenario, then you can also start the Integration Scenario Configurator manually: 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 RFC connection between XI and the SAP Backend System CE8 in the sender communication channel. This channel 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 communication channel. Finish Configuration in XI Integration Directory: Add the connection details to SAP into the previously created Sender Communication Channel: Open CS_ccReceiveCatalogData Service Without Party Business System SAP_CE8 CommChannel rfc_outbound_sender. Switch into the edit mode and enter the following 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, it’s necessary to specify 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.
44/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems ____________________________________________________________________________________________
Now add the connection details to the external http Server into the previously created Receiver Communication 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 server o Service number: Port of http server o Path: Path of http service To access the internet: o Proxy Host: 155.56.68.229 o Proxy Port: 8080 o Authentication data if necessary
To finish the configuration in XI Integration Directory, save and activate 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 Channel created 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
That’s 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 system must be unique, e.g. in the NX7 Integration Directory you can only have one configured receiver for the call QIRF_SEND_CATALOG_DATA from CE8. If someone configures a second receiver, then any call fails with “BE multiple receives defined”. Therefore it’s difficult to configure outbound RFC integration scenarios on NX7, because this is a shared system that is used by many ISVs. Unicode: If the RFC Metadata Repository System specified in the Receiver Communication Channel is a Unicode system, then the external RFC Server also has to be Unicode enabled.
45/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems ____________________________________________________________________________________________
Test the communication from the SAP Backend System: Go into the SAP Backend CE8, Transaction SE37. Here you can test any available function module, also modules that should be executed externally. Function module: QIRF_SEND_CATALOG_DATA Press the third icon or press F8 to test the module To call the module in the external system, fill the RFC target sys: RFC target sys: CC_GET_CAT_REQUEST (defined earlier, see above) Enter some sample data in the import and table parameters Execute (press F8) Now the call is transferred through XI to the external RFC server and the result is displayed. The external web server should accept the message and answer with an appropriate response.
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. Sample Request from SAP:
POST /?msgguid=E8F0CF214E7B11D9C29000300546F7E9&service=SAP_CE8&namespace=urn%3asapcom%3adocument%3asap%3arfc%3afunctions&interface=QIRF_SEND_CATALOG_DATA HTTP/1.0 content-type: text/xml content-length: 408 connection: close accept: */* accept-encoding: gzip SAMPLEXXE
46/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems ____________________________________________________________________________________________
Sample Response:
HTTP/1.0 200 OK content-type: text/xml content-length: 263 Q451COLOR1MY_COLOR
Congratulations! You have successfully created certifiable content and tested the communication. Now all 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 on the configuration in chapters 11 and 12.
10 XI Content to invoke Web Services / SAP Enterprise Services In the following chapter we will illustrate, how to configure the XI system, to call services that are described through a WSDL file. For the sample we will use the SAP Enterprise Service (ES) “CustomerBasicDataByIDQueryResponse_In” that provides customer details from SAP, comparable with the RFC module (BAPI) BAPI_CUSTOMER_GETDETAIL from chapter 8. 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.
10.1
Download the WSDL file from the ES Workplace
The ES Workplace can be used to browse through all the available SAP ES. As a RAC-Subscriber you could also request access to ES Workplace and after that download WSDL files and use the Enterprise Services published there. Through the ES Workplace, navigate to the Business Object “Customer” and choose the Service Operation “Customer-BasicDataByIDQueryResponse_In” provided by an SAP ECC 6.0 system, from here you can download the WSDL file by clicking on WSDL (back-end).
10.2
Create the Repository Objects for the Web Service Consumption 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 before you leave, you should make sure to jump to the “Change Lists”-Tab, rightclick on your change list and choose “Activate”. 47/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems ____________________________________________________________________________________________
Import WSDL file: Since the external system already understands the CustomerBasicDataByIDQueryResponse_In message format, we only need to import this message into the XI system. We also don’t need any mapping. We import the message into our Software Component Version. Open your Software Component Version CCVENDOR_CRM, 1.0 of ccvendor.com Open your namespace “Interface Objects”, rightclick on “External Definitions”, choose “New” Enter a name for the external definition and a meaningful description. For the name we could use the technical name of the ES: ECC_CUSTOMER001QR. Click on “Create”. Click the button to import the external definition and choose the file containing the WSDL, after the upload you could save the external definition.
Don’t 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 the documentation panel
2. Press here to add documentation
48/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems ____________________________________________________________________________________________
Create Message Interfaces: The external definition contains specification of the inbound, the outbound and the error message. We now have to map these messages into a synchronous outbound and a synchronous inbound interface. Outbound Interface to send the message: Open your namespace “Interface Objects”, rightclick on “Message Interfaces”, choose “New” Enter a name for the Outbound Interface: SendCustDetailRequestESInterface and enter a meaningful description. Choose “Category” = “Outbound” and “Mode” = “Synchronous” You could use the F4-help icon to fill the 3 message types accordingly. For the sender, the output message is the request and the input message is the response. With the F4-help you can navigate to your external definition “ECC_CUSTOMER001QR” in your namespace and choose the correct message (see screenshot below). Save the interface.
F4-Help-Icons
49/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems ____________________________________________________________________________________________
Inbound Interface to receive the message: Open your namespace “Interface Objects”, rightclick on “Message Interfaces”, choose “New” Enter a name for the Inbound Interface: RecvCustDetailRequestESInterface and enter a meaningful description. Choose “Category” = “Inbound” and “Mode” = “Synchronous” You could use the F4-help icon to fill the 3 message types accordingly. For the receiver, the input message is the request and the output message is the response. With the F4-help you can navigate to your external definition “ECC_CUSTOMER001QR” in your namespace and choose the correct message (see screenshot below). Save the interface.
Create Communication Channel Templates: The communication channels serve as the technical endpoints to the connected systems. We can create communication channel templates now, this makes the configuration of the integration scenario later easier. We only need the receiver channel. Web Services are usually invoked via SOAP, so we create one Receiver communication channel, type SOAP: Open your namespace “Adapter Objects” and rightclick on “Comm Channel Templates”, choose “New” Enter a name for the SOAP receiver: ES_inbound_receiver and enter a meaningful description. Choose “Adapter Type” = “SOAP”, save, then choose “Receiver”-type. That’s it, the details of the connection are usually defined later during the configuration and are therefore not part of the static XI Content. Save.
50/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems ____________________________________________________________________________________________
Create the Integration Scenario: Open your namespace “Integration Scenarios…” and rightclick on “Integration Scenarios”, choose “New” Enter a name and description: IS_ES_CustomerDetail 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 o o
Application Component Type = Product Version, title = SAP ECC 6.0 Role – Name = SAP_System Choose “Apply”
Create a graphical representation of the external system by rightclicking into the second grey column. Choose “Insert Application Component”. o o o
Application Component Type = Product Version, title = ccCRM, 1.0 of ccvendor.com (our external product, created previously in the SLD) Role – Name = External_CRM_System Choose “Apply”
Don’t forget to enter some documentation of your Integration Scenario. It’s no bad idea to describe the scenario quite detailed here. Save.
Create action to send the Webservice Request 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 “SendCustDetailRequestES” and press “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 = Message Interface Click on the 7th icon of the table (“Display input help”) and choose the “SendCustDetailRequestESInterface” from CCVENDOR_CRM. Enter a meaningful description and documentation Save and close the created action
Create action to receive the message in the SAP_System 51/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems ____________________________________________________________________________________________
Still in the edit mode of your Integration Scenario, rightclick into the SAP_System column and choose “Create Action” On the next popup we have to choose “External”, since from the view of our Software Component “CCVENDOR_CRM” SAP is the Partner Software Component. Enter the name “RecvCustDetailRequestES” and press “Finish”, then “Close” You can now find a window with the details of the action, switch to the change mode here. In the SAP_System, we want to receive the message, so we need to add a line to the “Inbound Interfaces”. In the inbound-table, click on the +-icon and choose ObjectType = Message Interface Click on the 7th icon (“Display input help”) and choose the “RecvCustDetailRequestESInterface” 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 of the two created actions. To get a synchronous Webservice-connection, it’s necessary that both actions are on the same level. Make sure to move the boxes accordingly:
Rightclick the Send-action and choose “Define as Start Action”. Rightclick the Receive-action and choose “Define as End Action”
52/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems ____________________________________________________________________________________________
Mark both actions by holding the shift-key, rightclick and choose “Create Connection …”. In the following popup, make sure that the checkboxes 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 templates ES_inbound_receiver in the receiver part. You can use the F4-help-icon in the “Name”-field to find the channel template in our Software Component CCVENDOR_CRM.
Choose apply then save the Integration Scenario
53/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems ____________________________________________________________________________________________
Check the consistency of the scenario by choosing “Component View” “Check Configurability”. You should only receive warning messages like: “Check Result for Object IS_ES_CustomerDetail Component View IS_ES_CustomerDetail: Connection from SendCustDetailRequestES to RecvCustDetailRequestES has no mapping” Activate all your changes (check chapter 5 about how to activate). That’s it. With these simple steps you have created certifiable content to call a Web Service or SAP Enterprise Service. If there are further communication steps involved in your scenario (other Web Services or IDOCs or RFCs), you should add them directly into the already defined Integration Scenario. For a better overview, in our tutorial we will 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. Just choose “Tools Export Design Objects”, select the Software Component Version “CCVENDOR_CRM, 1.0” and export the objects that belong to your content that should be certified (usually “all objects of your Software Component Version”).
Note: When you are ready for a certification test drive, please provide us the export path with the name of your XI content and the exported SLD content zip file (see chapter 3).
10.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 fits into our existing landscape with an external web client and the system providing the web service / Enterprise Service (in our sample the ES Workplace). After that we want to test the communication. Since the system landscape is different for each customer, it’s not necessary to export the Integration Directory Content. For certifiable XI Content it must be possible to configure it automatically with the Integration Scenario Configurator. 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 you leave, 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” Cache”.
“Clear SLD Data
Import the Integration Scenario: In the first step, we copy the Integration Scenario created in the XI Integration Repository into a Configuration Scenario. Choose “Tools” “Transfer Integration Scenario from the Integration Repository” and use the F4-help-icon to find your Integration Scenario IS_ES_CustomerDetail in your Software Component Version. Click “Continue”. 54/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems ____________________________________________________________________________________________
The scenario is copied into a Configuration Scenario and you should change the name, e.g. into CS_ccESCustomerDetail (“CS” is ConfiguationScenario). You can also add your company name 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_CF5” that we have created in the System Landscape Directory in chapter 3. We can start directly with step 2: 5. Assign Services: This is where we have to assign the Business Systems: o o
In the popup, use the arrow icons on the top to choose Role = SAP_System. Click on the “+”-icon of the table below and choose the F4-Help to find the Business System SAP_CF5.
o o o
Now use the arrow icons on the top to choose Role = External_CRM_System. Click on the “Create”-icon of the table below (4th icon) and choose 2 times “Continue” Look for your Business System CC_CRM. If it’s not available here, then it has been already created, click “Cancel”. If it’s available, then choose it, deselect the “Create Communication Channels Automatically” (Important!) and choose “Finish”, then “Close” If not yet assigned, click on the “+”-icon of the table below and choose the F4-Help to find the Business System CC_CRM.
o
o
Click on “Assign”.
6. Configure Connections: This is where we have to assign the Communication Channels: o
o o
In the popup, use the arrow icons on the top to choose the Communication Step you want to configure. Since we only have one step in our Integration Scenario, this is chosen automatically. Now click into the field “Communication Channel” for the Receiver Business System on the very right. Then click the “Create”-icon (3rd icon) to start the Communication Channel Wizard. 55/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems ____________________________________________________________________________________________
o
Press “continue”, then make sure that our template ES_inbound_receiver is chosen, and then press “continue”. Now give the Communication Channel a new unique name, so that it 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. Generate: Generate all the needed agreements automatically and finish the wizard: o o o o
Change the general settings to “Generation” (no simulation), press “Start”. Quickly check the log, if there are any errors. Close the log without saving, Close the Integration Scenario Configurator and choose “Apply”.
If you have later changed the Integration Scenario in the XI Integration Repository and you want to update the existing Configuration Scenario, then you can also start the Integration Scenario Configurator manually: 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.
10.3
Finish the configuration manually
With the wizard we have already created all the needed XI objects, now we need to configure the SOAP connection between XI and the SAP Backend System that provides the web service / Enterprise Service.
56/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems ____________________________________________________________________________________________
Finish Configuration in XI Integration Directory: Add the connection details to SAP into the previously created Receiver Communication Channel: Open CS_ccESCustomerDetail Service Without Party Business System SAP_CF5 CommChannel ccES_inbound_receiver. Switch into the edit mode and enter the following data: Target URL: If the WSDL-file was taken from an SAP system, then it should contain the Target URL of the Enterprise Service in the tag. Sample:
Configure the User Authentication and enter your User/Password. If you use the ES Workplace, then you have received a separate user for this.
Configure the Proxy: Proxy Host: 155.56.68.229 Proxy Port: 8080
To finish the configuration in XI Integration Directory, save and activate all the changes done before.
10.4
Check the communication
That’s it! Now you should be able to call the ES “CustomerBasicDataByIDQueryResponse_In” from the external web client via http. (Remember that this is only a sample. Sure, via http you could also easily call the ES directly without using XI). 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 be found in the Runtime Workbench trace. 57/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems ____________________________________________________________________________________________
Sample Request: Below you can see the path to post the request to. The information about service, namespace and interface can be taken from the matching Interface Determination, Sender part:
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. Now all 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 on the configuration in chapters 11 and 12.
11 How to import/configure your XI Content in a target XI system For the certification, you need to provide a Configuration Guide document which describes all the necessary steps to be carried out by the customer to import and configure your XI Content package. You could use the template provided by ICC in the archive file (“XI Content Configuration_Guide_Template”), or you could write your own documentation. The Configuration Guide document must cover these minimum steps: 1. Import your SLD content file into the customer’s SLD system. To do that, log on to SLD and go to “Administration Content Import (Upload CIM data)”. There you can browse and select your SLD content zip file.
58/59
How to configure SAP XI/PI to use the standard SAP communication APIs (idoc, bapi, rfc, ES) from external systems ____________________________________________________________________________________________
2. Import your XI content file into the customer’s XI Integration Repository. To do that, copy the tpz file with the content into the repository import directory on the XI server, usually something like: \usr\sap\\SYS\global\xi\repository_server\import Then log on to the Integration Repository and choose “Tools Import Design Objects”. There you can select your content file. ] 3. Log on to the XI Integration Directory and clear the SLD cache with “Environment Data Cache”.
Clear SLD
4. Copy your Integration Scenario from the Integration Repository into the Directory. This can be done with “Tools Transfer Integration Scenario from the Integration Repository”. 5. Assign the services, configure the connections and generate all the communication agreements by using the automatically starting Integration Scenario Configurator wizard. 6. Finish the configuration of the communication channels manually, like you did when configuring your XI content for the certification test.
12 Files needed for Certification For a certification test drive, we need the following files from you: tpz-file that contains the exported Integration Repository Content. If you cannot access this file directly (because it was saved on one of the ICC test systems), then please send the file path and name during the export process to your assigned ICC consultant. We can retrieve the file for you. zip-file that contains your exported SLD Content. Configuration Guide document of your integration scenario. This guide should list all the steps that are necessary to import and configure your XI Content into a customer’s XI system (see chapter above). You can find a Configuration Guide template provided by ICC in the same archive file contained this tutorial. Complete the Technical Profile document for your package. You also can find this document in the same archive file. PPMS data sheet containing information regarding your Product, Product Version, Software Component and Software Component Version as defined in the SLD (see chapter 3). Please find further details about PPMS data collection in the XI Content certification catalog, chapter 4.
After your assigned ICC consultant reviewed the documentations, he or she will discuss the details of the certification test drive and schedule a date for the actual functional certification test.