Skip to Content

This weblog will be useful for those people who still use JCO for making a lookup in XI / PI instead of the Lookup API.

Basically this blog will concentrate on how to hide the connection parameters (userid / password) being passed in the JCO code , and also how to ensure that when the code is being moved across different system the connection parameters are also picked up dynamically.

This blog will talk of how to use the properties file to achieve both hiding the connection parameter information as well as ensuring that parameters are dynamic, so that even when the maps are transported from dev to quality there is no need to modify the code.

Assumption made in this blog is that people are already aware of lookups and how to create a udf in XI.

The first step is to create a .properties file, in my case I call it as xiprop.properties. The content of xiprop.properties will be as follows….

Store the created property file in a folder in the XI box, in my case I store it in the following location,

C:\usr\sap\properties 

Ensure that the above properties file is created in all instance of XI (with appropriate values) like Dev, QA and Prod, so that whenever the map is being transported from one instance to another the lookup works without any changes.

The next step is to create the udf in the message map with the following piece of code.

Hope the above piece of code was of some help.

Note: The content of this blog is definitely not the best solution and the best practice when it comes to making a lookup.

To report this post you need to login first.

3 Comments

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

  1. Karsten Geiseler
    Hi.
    I don’t want to dis you, but I don’t want people to copy this, because:
    – storing credentials unencrypted in a file is generally not a good idea
    – accessing files in a application server context ist not recommended
    – using the jco library without using the JCA api is not recommended since NW04

    Cheers, Karsten

    (0) 

Leave a Reply