Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
MichalKrawczyk
Active Contributor

During PI migrations for the new java version of the new PI some of us might experience issues related to the fact that custom written code does not work in one of the user defined functions from the message mapping. If we know which part of code is causing the error we can always easily find it out by checking all UDFs in the mappings. What if we have a bit more then just a few mappings (like thousands) and same number of UDFs ? Do we need to go one by one ? Let me share with you and idea on how this issue can be solved.

Problem

How to get the source code of UDFs for all the mappings? 

Solution

Use the SimpleQuery to get the UDFs source code

http://host:port/rep/support/SimpleQuery

Step 1

Use the SimpleQuery to get all of the mappings from the ESR. You need to select object - Message Mapping and in the Result attributes - Link to object.

Step 2

As a result you will get a list of objects with a link to the "RAW" mapping specification as per screenshot below.

Step 3

Inside the RAW link you can see that one of the nodes contains a zipped source code of the mapping.

Step 4

You need to get the zipped value and decode it with BASE64 decoder.

Decoder:

http://www.opinionatedgeek.com/dotnet/tools/Base64Decode/Default.aspx

Step 5

Now you can unzip the mapping and you will the source code.

Step 6

Now you can easily check in all UDFs for the string wich you need to replace and get the message mapping name from it

Note

In order to make it more practical to use you'd need to write a small tool which can get all the RAW source codes from all of your Message Mappings automatically but this is much easier if you know where to look for the code.

Request

Please let me know what you think of this approach - thank you.

4 Comments
Labels in this area