1.- Explaining the Idea.
If you are just about to start a migration project between SAP PI 7.0 to SAP PI 7.31, this document may be useful for you. There are differents approach to achive this, but if you are going to have new installation with new SAP PI 7.31, one of the different task you need to do will be migrate objects from old to the new system. You can do this using export/import tpz files for repository and directory. This approach works except for Communication Channels. When you try to import Communication Channels from 7.0 into 7.31 you are going to get a pop-up screen like this:
com.sap.aii.ib.core.roa.RoaObjectAccessException:Attempt to read object Adapter Metadata SOAP | http://sap.com/xi/XI/System, type AdapterMetaData from application REPOSITORY on system REPOSITORY failes. Object does not exist. Detailed information: Software component version with name SAP BASIS 7.00 not found.
Why do you have this error when you try to import your Communication Channels from your old SAP PI 7.0 in your new SAP PI 7.31? Because new PI system use new version of Adapter Metadata belongs to SAP BASIS 7.31 software component, and your tpz files from your old SAP PI System still use Adapter Metadata from SAP BASIS 7.00. New PI can not translate one into another. But this can be done with a little of work from your side. When you close this pop-up (and you should close it several times), you are going to lose all information in your new Communication Channel, so export/import tpz files for Communicationi Channels is not very useful. You have to create new Communication Channels manually. And the risk in your project increase. That’s the reason why I write this blog. Directory API and PI can help you to do this automatically. You are about to use PI to implement one interface to create objects inside PI. We always create interfaces to the rest of the users to avoid manual taks, this is the first time you can do it for yourself. And of course, if you only have a few number of communication channels in your landscape, maybe this blog is not for you, but if you have a big number , this implementation help you to save time, money and will increase the quality of your migration project. Keep in mind that sometimes you have different configuration of your Communication Channels in Development, Quality and Production. This means that you have to do all versions manually, and of course you are going to have problems because you have to set all parameters, modules, File content Conversions and more.
First thing is download Communication Channels from your SAP PI 7.0 system using Directory API. To do this easily you can use the fantastic tool :
You can download this tool from :
Maybe you are asking yourself about, what is the meaning of download Communication Channels? Let me explain later about this. So far continue reading.
I did some changes inside code of this Excel in order to have unique name for all xml files generated. Let me explain how this Lets Excel works. This Excel connect to your PI system and execute 2 webservices. First one is to get all list of your communication channel. Second webservice is to read every single communication channel and get all information and parameters. The idea of this blog is using this xml files with all information about your communication channels to create a copy in your new PI system automatically without manual intervention. The only thing you have to set is passwords if needed.
So if you open Let’s Excel and pres Alt + F11 you can access to the code inside. Then go to DownloadCCXML Module and change this line with this content:
Open tempStore & “\” & PartyID & “_” & compid & “_” & chanid & “.xml” For Output As #1
I renamed the name of file in order to have unique name per channel.
When you execute this and connect with your PI system, (Please read http://scn.sap.com/community/pi-and-soa-middleware/blog/2011/11/10/lets-excel-enhanced-communication-channel-search-in-sap-pi to understasnd this part of this blog) this program download xml files with all description of your communication channels. All of these files will be stored in folder \PICCD of your filesystem. (search in your Temporary folders)
If you system ID is XID you can find folder PICCD\XID with all xml files
This Tool use CommunicationChannelServiceVi and read operation to get read response like this:
In this file you will find all parameters of your communication channels.
You can map this xml to request of CommunicationChannelServiceVi and create operation easily, with a couple of changes.
2.- Directory API.
1.1.-We have all xml files with all description of our communication channel from our old system SAP PI 7.0. We have also in SAP PI 7.31 Directory API where we can use webservice to create Communication Channels. You need to design one interface to pick up files, translate SoftwareComponentID from 7.0 to 7.31, call a webservice and save the log with results in one folder.
You can test Directory API to understand how it works in Webservice Navigator.
You can use CommunicationChannelServiceVi. Then you can see different operations.
In our case we will use create operation to create new Communication Channels.
To get wsdl of this webservice go to your SAP PI 7.0 Integration Repository and find this External Definition:
Software Component SAP BASIS 7.00
External Definitions: CommunicationChannelService
Below you can see readOut_doc message. This message is same format that our xml files generated by Let’s Excel. Also you can find below createIn_doc. This is the message we need to use in order to create Communication Channel in SAP PI 7.31 without losing any information.
Now you more or less know which is the approach of this blog. Reuse this useful information obtained with Let’s Excel to create easily our communication channels in our new PI without any manual intervention.
3.- Describing the proccess.
ccBPM has the following steps:
- 1. Receiver xml file with Communication Channel structure
- 2. Mapping to delete Soap header and to transfer all information to request message of webservice.
- 3. Synchronous call to webservice CommunicationChannelServiceVi ->create
- 4. Send response of webservice to save it as a logfile in order to check the results.
- 1.- If you take a look into xml file generated by Let’s Excel tool you can see that payload is almost the same than request message to create Communication Channel. But we need to delete SOAP header. I will use xslt mapping later to Delete Soap header. I will explain this later.
- 2.- Second thing to take into account is to create a Communication Channel using Directory API. You need to have Change List ID in order to assign generated object to a change list like we do in normal way when we create communication channel in Integration Directory. You can create manually one Change List and get easily ID. But you need to set this ID in your mapping. To do that you can use Import parameter in your Operation Mapping and then you can set this Change List ID in Integration Directory. I will explain this in more detail later.
The value of the Key will be used as value of import parameter in our Operation Mapping. This is a mandatory field in request of creation of Communication Channel as you can see below:
3.- Integration Respository.
Now we are able to start working in Integration Repository in your new SAP PI 7.31.
Create your own Software Component or reuse existing one.
Create your own namespace to create all objects needed to build this interface.
You can do this in different ways. This is my proposal.
obtained from SAP PI 7.0 CommunicationChannelService.wsdl
1.-LogFile_In : Inbound, Asynchronous and using Logfile message type
2.-ReadOut_Out: Outbound, Asynchronous and using readOut_doc from
CommunicationChannelService External Definition.
3.-ReadOut_Abs: Abstract, Asynchronous and using readOut_doc from
CommunicationChannelService External Definition
4.-CreateOut_Abs: Abstract, Asynchronous and using createOut_doc from
CommunicationChannelService External Definition
5.-CreateIn_Abs: Abstract, Asynchronous and using createOut_doc from
CommunicationChannelService External Definition
6.-CreateComChannelSync_Abs: Abstract, Synchronous using
For request: createIn_doc from CommunicationChannelService External Definition
For response: createOut_doc from CommunicationChannelService External Definition
DeleteSoapHeader xslt mapping
To delete Soap header we can use xlst mapping to do it simple.
Imported Archive DeleteSoapHeader
<xsl:transform xmlns:xsl=”http://www.w3.org/1999/XSL/Transform“ version=”1.0“>
<xsl:output method=”xml“ indent=”no” />
<xsl:strip-space elements=”*” />
<rpl:readResponse xmlns:rpl=”urn:CommunicationChannelServiceVi“ xmlns:rn1=”http://schemas.xmlsoap.org/soap/encoding/“
<xsl:copy-of select=”.” />
This mapping is only used to take Import Parameter (Change List ID) from Integration Directory to use it inside ccBMP.
You can map target message using buttom remarked in yellow below:
But in field : /ns0:readResponse/ns0:Response/ns1:LogMessageCollection/ns1:LogMessage/ns1:LogMessageItem/ns1:Message/ns1:value
you can map with Constant and select import parameter to use in next steps. (I use this field as a temporary variable, because is not used in this step)
2.- MM_readOut_TO_createIn71 .
This mapping would be used to map readOut message with createIn message in order to create communication channel. Take into account the following field:
To set /ns0:create/ns0:CommunicationChannelCreateRequest/ns1:ChangeListID with Import parameter assign to /ns0:readResponse/ns0:Response/ns1:LogMessageCollection/ns1:LogMessage/ns1:LogMessageItem/ns1:Message/ns1:value (used in step before as temporary variable to save import parameter with Change List ID)
Other important field is
Old version has GUID for SAP BASIS 7.00. To create new communication channel in your new SAP PI 7.31 system you need to use new SoftwareComponentVersion ID. This is the error with pop up in the beginning of this blog. Please check in your Software Component and try to find something similar to this:
Map with this ID found in your own Software Component Version(This is not a constant you should have a different value of ID in your own system)
The rest of the mapping can be done easily name by name.
This mapping is used to get log information from the response of webservice about the result of creation of communication channel.
The main idea here is use this mapping described below taken all fields from LogMessageCommunicationChannel and format them into content field in LogFile.
Source Operation: ReadOut_Out
Target Operation: ReadOut_Abs
ChangeListID type string and Import type
Source Operation : Read_Out
Target Operation: CreateIn_Abs
Mapping Program: MM_readOut_TO_createIn71
Source Operation: CreateOut_Abs
Target Operation: LogFile_In
Mapping Program: MM_createOut_TO_LogFile
2.- Integration Process.
To implement this interface we need to use ccBPM.
In this ccBPM you can see 4 steps.
- 1.- ReceiverReadOut: Message readOut
- 2.- Operation Mapping: OM_readOut_TO_createIn_Abs
- 3.- Send: (Webservice call to create channel)
Synchronous Interface: CreateComChannelSync_Abs
- 4.- Send:(Send response from webservice to map to LogFile and save it into a folder)
3.- Integration Directory.
- Create a new Scenario for this interface.
2.- Business Component
BC_PI700: For SAP PI 7.0
BC_PI731: For SAP PI 7.31
3.- Communication Channels:
CC_File_Sender_AutomaticMigration700 where you have to configure the source folder where you are going to put xml file with Communication Channel description.
CC_File_Receiver_AutomaticMigration700 where you have to configure the target folder to put log file with errors of process
CC_SOAP_Receiver_ComChnelService: where you have to configure to call webservice of Directory API.
Tartet URL: http://<PI 7.31 server>:50000/CommunicationChannelService/HTTPBasicAuth?style=document
SOAP Action : create
Special attention in Interface Determination with Import Parameter to set Change List ID
7.- Running Interface.
Steps to run the interface
- Open Lets Excel – Communication Channel Search v1.1.xlsm
- Connect Lets Excel with your SAP PI 7.0 systems.
- Download the files of your Communication Channels from your SAP PI 7.0.
- Go to Integration Directory of your SAP PI 7.31 system. Create a Change List manually and take ID to set it in Integration Determination as shown in above ilustration.
- Move the files to folder configured in your File Sender Channel.
- Monitor messages in sxmb_moni.
- Check in the change list if you can see communication channels created. Take into account that you have to create first Parties, Business Service, or Business Component related to your communication channels. What I did in my case was import all scenario from SAP PI 7.0 using tpz files and delete all communication channels from XI import list. Then I activated Parties, Business Services and Business Component, and after that, upload Communication channels using this interface. Finally you need to activate Channels and after that you can activate the rest of objects of imported scenario.
- Check LogFile in case of errors. Sometimes there are some parameters that they are not compatible with new Adapter Metadata version. You can delete them manually inside the file and reprocess again.
- Don’t forget to set password if needed in your communication channels created by this interface.
Hope this blog help you to increase quality and improve timing in your migration project.
Don’t hesitate to contact me in case of you have some questions.