So far on Cloud Integration if you needed to access Headers and Properties in your Message Mapping you needed to use a Groovy Script (Access Header and Properties in Message Mapping) . Unfortunately this Groovy Script had to be defined in every IFlow as Reusable Groovy Script Collection was not supported in your Message Mappings.

With Cloud Integration version 6.46.34 released in Nov 2023,you no more need to write custom Groovy Scripts to access headers and properties. You can now do this automatically, with a standard Functions called getHeader and getProperty

Use of standard functions getHeader and getProperty in Message Mapping

In your message mapping, search for Functions with term get and you will notice the standard out of the box functions now delivered by SAP called getHeader and getProperty. See image below. If you do not see these functions, then your tenant is not yet upgraded by SAP.

Standard Out of the box Message Mapping Function getHeader and getProperty

NULL handling

If the header or property does not exist then the standard function returns a string “null“. This then needs to be further handled in your logic.

So far in most of my implementations of using the custom groovy we have always explicitly set the value as a “Empty” String ,i.e, “”. So to allow us to use this Standard Function we have added a fixValues to handle the null as a empty String. See image below.

Use a fixValues to handle NULL for getHeader and getProperty functions from SAP.

Great Step Forward

From a governance perspective this is a great step forward as you now can avoid having Custom Scripts in each IFlow as Message Mappings do not support “Script Collection”. ( As of Dec 2023).

One of the most common requirement across Message Mappings is to access Headers and Properties in Message Mapping and this standard out of the box function albeit a little late, is still a step in the right direction.

If I had to predict the future, especially for SAP PO migrations, I would hope that support for Script Collections in Message Mapping is made available as well in the future releases but for now, this is still something to be used in your projects to avoid custom scripts!