loading

SAP PI/PO API for Integration Directory Objects Maintenance

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.

Step by step example

First of all navigate to Web Service Navigator (https://<host>:<port>/wsnavigator).

WebService Navigator

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.

Editable Objects

Interface Name

Communication Components

BusinessComponentIn

Communication Channels

CommunicationChannelIn

ICOs

IntegratedConfigurationIn

Configuration Scenarios

ConfigurationScenarioIn

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.

WebService Navigator Service Interface

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.

WebService Navigator Operations

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.

WebService Navigator Parameters

At the Result side, go to XML Content tab and download the XML result.

WebService Navigator Result XML Content

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.

WebService Navigator Operations

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.

WebService Navigator Parameters

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.

WebService Navigator XML

Go back to WSNavigator and go 2 steps back and now use the operation Create.

WebService Navigator Operations

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.

PI Change List

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.

More uses:

  • Export the Integration Directory objects from one system and create the objects on a different system.
  • Massive change of status in Advanced setting of channels (active/inactive), for example during the SAP PI to SAP PO migration it is mandatory to start all the channels on new SAP PO single stack in the moment after all the channels on the old SAP PI dual stack get stopped.

 

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.

 

SAP Integration Consultant
SAP developer and integration consultant. Involved in several international projects as ABAP developer and SAP PI/PO integration consultant. Skilled at a variety of tools and integration technologies including SAP Process Orchestration, SAP CPI, SAP S/4 HANA, Adobe Forms, SAP Gateway, BAdIs, BAPIs, Enhancement Framework, IDocs, ALE, LSMW and OData.

2 thoughts on “SAP PI/PO API for Integration Directory Objects Maintenance

  • Very useful. Recently I performed a PI to PO migration. However, there weren’t many interfaces so didn’t make sense to use the above technique. However, I can understand how useful it can be when there are huge number of interfaces running. Appreciate the info shared. Thanks.

  • Hi Anand, of course for each task there may be a different quicker approach. My scope was just to spread the knowledge of this easy to use technique which can be used for plenty tasks/scenarios, because those SAP PI/PO API can make our daily time consuming and repetitive tasks just a piece of cake! I am pretty sure that if you are working on SAP PI/PO eventually this API is going to help you a lot.
    Thank you!

Leave a Reply

Your email address will not be published. Required fields are marked *

Contact

INT4
ul. Bednarska 1
60-571 Poznan, Poland

 

office(at)int4.com

Write to us