SAP PI/PO is equipped with a set of standard APIs which among many other things allow the maintenance of Integration Directory objects. This API can save you a big amount of time in certain circumstances and it is really good to know it?s usage.
In one of my projects I faced the following time consuming task, which I managed to get through quickly using this standard SAP PI/PO API. While working on a SAP PO Dual Stack to SAP PO Single Stack migration project, there was a need to rename Business System names. By that time I had more than 100 interfaces working and most of them were using this particular Business System name. If I had to manually update the Business System in more than 100 channels and ICOs it would have taken quite many hours identifying the interfaces which use the particular Business System, make a copy of them and then delete the original ones. In order to save time, this SAP PO API can be used.
First of all navigate to Web Service Navigator (https://<host>:<port>/wsnavigator).
The following screen will appear and now we need to choose the proper Service Interface that we have to use. As Search Type choose Provider System and in Search for field you must provide the Service Interface name.
Please find below all the Service Interfaces that you can use in order to maintain the Integration Directory objects.
For example, let’s look at how to make a copy of an existing Communication Component. So in Search for, type *component* press enter and the wanted Service Interface will be listed.
First step is always the Operation Query. We need the XML that produce this operation in order to read all the information for the Communication Component.
At the Operation Query provide the proper information in order to find the Communication component or components that you want to use and click Next.
At the Result side, go to XML Content tab and download the XML result.
Now you have to go 2 steps back and use the Operation Read. In case you would like to delete these Communication component you found by the Query, you can use the operation Delete.
We use the Operation Read in order to get all the details about the Communication Components.
Choose Import-Test Data and upload the previously downloaded xml file.
Click Next and again download the result XML.
This XML can be used in order to Create or Update the Communication Components, after properly editing it. So now you need to open the XML with any editing tool and make proper changes. In our case we only want to make a copy of the Communication Component with a different name, so we simply replace all the existences of the previous Communication Component Name with a new one.
Go back to WSNavigator and go 2 steps back and now use the operation Create.
The next steps are the same, import the edited XML and click next. Now you can open the Integration Builder and see the newly created Communication Component. Activate the change list and you are done.
Exactly the same steps can be performed in order to copy any channels, ICOs or Configuration Scenarios in order to copy a big number of objects at once or just to create a copy with changes of particular ones.
In my case, During the SAP PI dual stack to SAP PO JAVA stack installation project, I had to make a copy of each channel that used the renamed Business System and delete the old channels, after that do the same for each ICO and in the end I had to update the Configuration Scenarios in which my objects existed.
So in order to update the Configuration Scenarios the steps were as follows:
Use the Query in order to find all the proper Configuration Scenarios. Use the Read Operation in order to read all the details for each Configuration Scenario that need to be updated. Edit the XML result file properly and use it in the Operation Change in order to update the Configuration Scenarios. All these actions took me no more than 45 minutes, just using these simple steps described above.
I hope that after this blog, SAP PO API will be helping you more in the future projects.
In case of any questions, feel free to ask in the comments.
Write to us