Posted on Apr. 5, 2010 at 05.17 PM - Kuala Lumpur, Malaysia
With SAP PI version 7.1 , we can now define global function libraries in which we can create user defined functions, as is possible in local libraries.
Below are the steps necessary to create a global user defined function
A function library is a separate object type in the ESR, and can be created via the context menu, Context Menu-> New -> Mapping Objects -> Function Libraries. Assign a name to the function library, and then assign it to a software component version, and a namespace.
Once we have the function library created, we can now define functions in that library, by making an entry in "Function and Java Areas". A window appears on the right hand side of the screen in which we can maintain the function parameters and source code.
Once global user defined function is created in a function library, we can use it in a message mapping. To do that, go to message mapping and open the "Show Used Function Libraries" window by choosing "Used Function Libraries" to the left of the mapping editor.
These user defined functions should be defined in one independent software component version which can then be linked to any message mapping of any software component version through dependency configuration.
Life is beautiful! Let's make it meaningful and colorful!