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 :
http://sourceforge.net/projects/channelsearch/files/latest/download
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... 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.
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
Namespace: http://sap.com/xi/XI/System
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.
ccBPM has the following steps:
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:
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.
External Definition
obtained from SAP PI 7.0 CommunicationChannelService.wsdl
1.- logRow:
2.- logFile
1.- Logfile
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
SOAP_readResponse_To_readResponse.xsl
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="xml" indent="no" />
<xsl:strip-space elements="*" />
<xsl:template match="/">
<rpl:readResponse xmlns:rpl="urn:CommunicationChannelServiceVi" xmlns:rn1="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:rn0="urn:com.sap.aii.ib.server.api.types" xmlns:rn3="urn:com.sap.aii.ibdir.server.api.types"
xmlns:rn2="java:sap/standard">
<xsl:for-each select="//rpl:Response">
<xsl:copy-of select="." />
</xsl:for-each>
</rpl:readResponse>
</xsl:template>
</xsl:transform>
1.- MM_readOut_TO_readOut_Abs.
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
/ns0:create/ns0:CommunicationChannelCreateRequest/ns1:CommunicationChannel/ns1:AdapterMetadata/ns1:SoftwareComponentVersionID
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)
field /ns0:create/ns0:CommunicationChannelCreateRequest/ns1:CommunicationChannel/ns1:AdapterMetadata/ns1:SoftwareComponentVersionID
The rest of the mapping can be done easily name by name.
3.- MM_createOut_TO_LogFile
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.
1.- OM_readOut_TO_readOut_Abs
Source Operation: ReadOut_Out
Target Operation: ReadOut_Abs
Mapping Program:
SOAP_readResponse_To_readResponse XSL
MM_readOut_TO_readOut_Abs
Parameter:
ChangeListID type string and Import type
2.- OM_readOut_TO_createIn_Abs
Source Operation : Read_Out
Target Operation: CreateIn_Abs
Mapping Program: MM_readOut_TO_createIn71
3.- OM_createOut_TO_LogFile
Source Operation: CreateOut_Abs
Target Operation: LogFile_In
Mapping Program: MM_createOut_TO_LogFile
To implement this interface we need to use ccBPM.
Container
In this ccBPM you can see 4 steps.
Mode: Synchronous
Synchronous Interface: CreateComChannelSync_Abs
Mode: Asynchronous
Message: createOut
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
Steps to run the 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.
Kind regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
7 | |
5 | |
5 | |
5 | |
5 | |
4 | |
4 | |
4 | |
3 | |
3 |