Skip to Content
0

SAP PI 7.31 - Node function Exists bug?

Oct 26, 2017 at 09:00 AM

53

avatar image

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.

cattura.jpg (125.3 kB)
cattura2.jpg (121.7 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Raghuraman S Oct 26, 2017 at 09:57 AM
1

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):


capture12.png (90.0 kB)
capture11.png (95.0 kB)
Show 1 Share
10 |10000 characters needed characters left characters exceeded

Thanks, i forgot it !!!

0
Evgeniy Kolmakov Oct 26, 2017 at 10:23 AM
0

Hi Antonio!

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

Regards, Evgeniy.

Share
10 |10000 characters needed characters left characters exceeded