Migrating SAP PI Message Mapping with Function Libraries

Message Mapping from your SAP PI/PO system represents great value. The more mappings migrated, the better because it will save time. In many mappings, you have Function Libraries (FL) which have been complicating the migration to Cloud Integration. 

Sometimes you should redesign the integration entirely because leveraging the new platform will be a better approach. 

SAP has, in July 2023 released a new object, Function Libraries, where you can import the Function Libraries into Cloud Integration. Currently, you can only use it manually in the Message Mapping you create in Cloud Integration. FL is not used with SAP’s migration tool in migrations, but I expect it to be delivered shortly. 

See the full flow

Import the Function Library

The Function Library object in Cloud Integration can contain many FL that are imported. You can have the same FL in multiple FL objects. It would help if you considered how your naming conversion for it. 

My idea is to create a package for all your FLs and then create an FL object with just one FL for each PI object. 

Here is my sample FL

The Original FL
The imported FL module where name of Object and Library is the same

Some limitations with the current FL

It seems the Function Library import has some limitations. The ones we currently know about are

  • Parameters
  • All value of a queue
  • Function without any input 

If a Function Library has one of the above, then the import will not work. 

Migration of mappings

With the Figaf tool, we select an ICO that we want to migrate. Then we define we want to use FL for the mapping. We also support Groovy functions, where we have written our own conversion to avoid some limitations. But Groovy also has some challenges, so it is good to have two options.

In Figaf, selecting the Iflow and package where the migration should be migrated to.
Here we select the resource to switch between Groovy(Shared artifact) or the CPI function Lib. Default it to use our Groovy functions but it may change later. If you change the structure of an existing mapping you need to overwrite the mapping and not reuse the existing.
Once you hit migrate, you will be able to open the iflow with allt he mapped artifacts.
In the message mapping, you can then see the migrated artifacts. If you click the code to it you will open the FL in a new tab.

Experiences

I have tried with a somewhat complicated function it seems like it tackles Global Container pretty well. 

You should of cause be testing the functionality which can be easily done with the Figaf tool. I would expect that there will be places where you can find a difference and it is better to be able to test this early and then consider if you need a different appoach.

Here we see the test result a lot of the functions originate the the FL in different ways. The time difference can easily be ignored with two clicks.

Try it out

We still have to get the new feature fully the QA process and into a build. I hope it will be delivered soon. I would recommend you to signup for the free Migration Editon. They you will get 10 migrations for free so you can test the functionality with Groovy functions. 

Then you can upgrade once we release the functions and they try the Function Libraries update. 

We have added transports of the new FL objects which is crucial for the migration aspect.

Simplify your SAP Integration in under 10 minutes with Figaf DevOps Suite on Cloud.

 
No credit card is required. 30 days free trial.

Latest Articles