on 01-29-2014 10:35 AM
Hi Experts,
I have recently started to work on SAP PI. So I'm relatively new to sap pi. I have to design a mapping. The condition is as follows
X is the field in source structure------> If ‘N’ then taregt field(Y) = ‘A’ else Target field(Y) = ‘B’ also note that X field is not always be populated .
How can I accomplish this? Please help.
Thanks
Regards,
Ravi
Hi Ravi,
You can use boolean function. And you can assign default value for e.g. Some pattern "@" so you can check value and assign to 'X' and 'Y' and if default pattern matches then clear it and assign to respective Target field.
Regards,
Gaurav Patwari
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hello ravi,
input--->mapwithdefault
than compare with N and pass this value to if else.
If true then A
else B
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ravi,
As above said you can easily handle your situation using fix values/if else fns ,but the point you need to make sure is how to handle when input field value is not populated(xml tag with no value in it ,without xml tag).
Ask for the below cases when the input field value not populated.
1)Do I need to take any default value when no input value comes?
2)Do I need to ignore the case where no input value comes ?
Based on the answer to above questions you can easily fulfill your req using graphical fns.
Regards
Venkat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In my point of you it will work when the source field is mandatory,
Best Regards,
Monikandan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Since your source field might be missing, go for the following mapping:
source -> fixValues( N -> A, if key not found then use default, default = B ) -> target
This already covers all the possible cases (source = N then target = A, source <> N then target = B, source doesn't exist then target = B).
Regards,
Greg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I guess this is going to work when the target field is mandatory.
Regards,
Muniyappan.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ravi,
You can use the standard boolean function if. (Standard Functions - Enterprise Services Repository - SAP Library). If X is not populated, do you want to execute the mapping as well?
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ravi,
Use map with default function to populated some values. use this after x field.
if not working can you paste here your mapping and input and output structure?
Regards,
Muniyappan.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.