cancel
Showing results for 
Search instead for 
Did you mean: 

SAP PI 7.31 - Node function Exists bug?

0 Kudos

Hi to all,

I am facing a strange behavior of the node function Exists in the mapping.
I am trying to check if a field is present in the input paylod (an idoc) and if not present I set a default value. I followed too the SAP note 1319395 (SAP Note 1319395) changing the context to the highest level but nothing changed and the result was an empty result.

I show you some examples:

This is with normal context.

This is with context Idoc node.

Can you help me to understand? there is a BUG? My version of SAP PI is 7.31 SP 04.

Accepted Solutions (1)

Accepted Solutions (1)

former_member186851
Active Contributor

Hello Anonio.

This is because you missed the root nodes mapping of the target structure.

See the below cases

Case 1(If I didn't map the root nodes of the target):

Case 2(If I map the root nodes of the target):

0 Kudos

Thanks, i forgot it !!!

Answers (1)

Answers (1)

former_member190293
Active Contributor
0 Kudos

Hi Antonio!

There is no need to use "Exists" function for your requirement. It's enough to use "MapWithDefault" instead.

Regards, Evgeniy.