Hello,
I am very new to PO/PI and am trying to understand the functions that are graphically displayed in the Message Mappings objects. The following mapping for the cust_Legacy_Job_Code shows various functions used to get the required DESCRIPTION in the target message.

How do I understand what these functions are doing?

I've googled the various functions available but have no understanding how this is working. I can follow the part that if there is no value from mapWithDefault that a constant of 49 is used. I'm not sure why the adjustLength needs to be there and why the mapWithDefault is done again. Thank you.
Regards,
Carol
Request clarification before answering.
Hi Carol
You should read from left to right
- mapWithDefault: when the element is not present in xml, then assign a default value: it's used to avoid null exceptions in this case
- adjustLength: it's a UDF (user defined funcion) to do something with text, like truncate length to 49 chars, like an example (in tabs upper you can see functions, and source code in java
- 49 constant: like an argument to function adjustLength
- second mapWithdefault: i think not need here, because no null value be possible.
i hope it can help
regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Ryan. I was thinking there was some redundancy but unsure how to read the functions.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi samye228,
Please consult this blog /article from SAP which shows detailed explanation of standard functions used in SAP PI.

Regards
Anupam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anupam,
Thank you for the link, it was not intuitive for me to find this. I'm not sure why you refer to the constant 49 as a UDF. I understood UDF to mean User Defined Function. Does PO/PI consider a string of functions that produce a value a UDF?
My real issue is trying to figure out how this "UDF" is read and what operands are executed first. Would you happen to know of any videos that would be helpful?
Thank you,
Carol
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Carol,
He was just sharing that 49 is an input value to the UDF named adjustLength. The overall processing of the sample you have shown goes like so:
Regards,
Ryan Crosby
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.