Background:

Recently in our landscape we had to set up several PI systems for different testing/quality purpose. Activating large number of channels manually is time consuming activity, Hence we created this tool to so that we can update the communication channels easily and quickly. This tool is easy to use and it uses simple excel sheet to get the communication channel details. It connects to PI system and calls the change list and communication channel services to retrieve and update channel details.

Prerequisites:

To use this tool following prerequisites have to be met

1) JDK 1.6 or later should be installed on your system.

2) The PI user should have two roles SAP_XI_API_DEVELOP_J2EE and SAP_XI_API_DISPLAY_J2EE assigned.

3) MS office excel 2007(xlsx only) or above is required.

Download Link:

Download the zip file from below link and extract it.

http://sdrv.ms/1kcZfxM

/wp-content/uploads/2013/12/bin_333589.jpg

How to use:

This tool should be used in three steps

1) GetChannels: In first step, we create an excelsheet lets say Channels.xlsx and place it in the same folder as the tool. The first sheet of the excelsheet has 5 details to be provided Target PI host,Target PI port, Changelistkey, Source PI host and Source PI Port. FirstSheet new.jpg

TargetPIHost: Host of the PI system which has the change list

TargetPIPort: Port of the PI system which has the change list

ChangeLisyKey: Change List key

SourcePIHost: Host of the PI system from which details of the channels have to be fetched

SourcePIPort: Port of the PI system from which details of the channels have to be fetched

Here source system will be your development system and target system will be your quality system to which the objects are transported from development.

Now open a command prompt, navigate to the folder where this tool is extracted and run GetChannels.bat file from the tool. Pass the name of the excelsheet to it. It asks for user and password to connect to PI system.

GetChannels.jpg

GetChannels.bat will retrieve the party,component and channel names in the change list from target system and write them in first sheet of the excelsheet. After successful execution of GetChannels.bat, excelsheet will look as shown below.

After GetChannels New.jpg

2) GetDetails:Now open the excelsheet and update the business system details for Source PI System in first sheet. You can get this information in SLD business system transport path. If the component is business component then you may simply copy it from Target PI System. Save and close the excelsheet.

Update Business System.jpg

Now run GetDetails.bat file in command prompt and pass the excelsheet name as parameter to it.

GetDetails.jpg

It will connect to source PI system and retrieve adapter-specific-attributes of all the channels in first sheet of excel and write them into second sheet of same excelsheet. Name of this sheet will be Channels. After successful execution of GetDetails.bat, the excelsheet will look as shown below.

After GetDetails.jpg

Only green colored cells value should be edited and rest should not be changed. These cells have cell comment which should not be changed because they are adapter-specific-attribute key. Update the details of non transportable attributes like folders,FTP host etc in the sheet. Red colored cell indicates that these are password values which must be filled manually, if required. It is easy to edit if similar channels are grouped by applying filter on adapter type, direction, transport protocol and message protocol. Save and close the excelsheet. You may want to save a copy of this excelsheet as backup at this point.

3) Update: Now run Update.dat file in command prompt and pass the excelsheet name as parameter to it. It will update the channels in target PI system changelist with the values of the excelsheet.

Update New.jpg

After successful execution of Update.bat, the changelist can be activated easily at once.

Assumptions:

1) The change list has atleast one channel in it.

2) The change list is assumed to be under same user as used in this tool. If not, first transfer the change list under that user and then use this tool.

3) The channels in the change list of target PI system are available in source PI system and not opened in edit mode in source system.

4) The business system/service of the channels in changelist are activated in target system or they are in the same change list or different change list under the same user used in the tool.

5) Only adapter-specific-attributes of the channels needs to be updated.

If you face any issue in using this tool, leave a comment below.

To report this post you need to login first.

35 Comments

You must be Logged on to comment or reply to a post.

  1. Iñaki Vila

    Hi Anand,

    Thanks for sharing this tool. It could be helpful when you need to transport several scenarios between environments and you want to change the communication channels, also it’s a good tool to have an excel about all the communication channels actives outside PI environment.

    From my point of view, it has the disadvantage to need to access to OS (in several projects i cant have this possibility).

    Regards.

    (0) 
  2. Abhinav verma

    Hi Anand,

    Really appreciate the way you come up with a new and enhanced tool.Which will really help us to do the configuration.

    Thanks a lot.

    Regards,

    Abhi

    (0) 
  3. Abhinav verma

    Hi Anand,

    I have one doubt,all the .bat files and all classes which i can see in the zip files are created by you or getupdate.bat such  files are standard files.

    Because If i want to develop one similar tool as you have developed so do I need to have knowledge of how to create the bat files and all the windows and API files etc.Just wanted to clear this things.

    Regards,

    Abhi

    (0) 
    1. Anand V D Post author

      Hi Abhinav,

      Only the classes in the folder com\sap\pi\channelactivation are custom classes. Remaining classes are generated by NWDS while generating ws client.

      The .bat files are also created by me. If you open .bat file in a notepad, you can see the name of the main class.

      Thanks,

      Anand

      (0) 
  4. Abhinav verma

    Hi Anand,

    I am getting this error when I am trying to execute the command from CMD.

    GetChannel.bat is not recognized as an internal and external command.

    operable program  or batch file.

    Is it is because I am in office Network.

     

    Regards,

    Abhi

    (0) 
      1. Abhinav verma

        Thanks Anand for correcting me.After Correcting this,it asked for user id and pwd and than it is saying error in getChannelsInChangelist<>

        Any Idea.Is it because PI server i am connecting remotely from my local machine ??

        It would be great if you can help me out in this…

        Regards,

        Abhi

        (0) 
        1. Anand V D Post author

          Hi Abhinav,

          Check if the PI user has two roles i.e SAP_XI_API_DEVELOP_J2EE and SAP_XI_API_DISPLAY_J2EE assigned.

          If yes, paste the complete error message here.

          Thanks,

          Anand

          (0) 
          1. Abhinav verma

            Hi Anand,

            Both  roles are assigned to my id.I am not able to share the screenshot here,as insert image button is disabled here.

            Can you please share ur email id.I will send it to your email id directly.

            Regards,

            Abhi

            (0) 
        1. Anand V D Post author

          Hi Ganesh,

          The link is active and working…click on the folder in one drive and download will start.

          Thanks,

          Anand

          (0) 
  5. Anupam Ghosh

    Hi Anand,

                         This is a great initiative and this proves that you think for PI community.

    Thank you for writing this blog and hope to get many more from experts like you.

    Regards

    Anupam

    (0) 
  6. Avinash Ayanala

    Hi Anand,

    Thanks for the really precious information.

    I have used your tool successfully and i have done exactly as you said but when i executed the update bat file i am not able to activate the channels in the change list and it is giving statement saying updated successfully and i am using 7.31 single stack server please help me in this issue.

    Regards,

    Avinash.

    (0) 
    1. Anand V D Post author

      Hi Avinash,

      The changelist will not be activated…the idea behind creating this utility is to update the non-transportable attributes of the communication channels easily and quickly in the changelist.

      After executing update.bat, you have to activate the changelist manually in ID.

      Thanks,

      Anand

      (0) 
  7. Raye Raymundo

    Hi Anand!

    This is a really useful tool! Do you think this can still be used for 7.4, single stack? If so, can I have a copy?

    Edit: I’m now running it, but I can’t seem to get it work. Is it possible to have same target and source? Like I’m just editing a lot of communication channel in one host.

    Also, I have business component and it does not work if I just copy it.

    It says Check if all business system are mapped correctly.

    Edit: Nevermind. I got it running. Thanks for this wonderful tool!

    Regards,

    Raye

    (0) 

Leave a Reply