on 01-23-2012 4:02 PM
Hi Friends,
What is the different between if and IFs in graphical mapping? I have a requirement where I have 3 source fields Src1 , Src2 , Src3. Target field Trg1.
I need to check if Src1 ( String) is not empty then trg1 = Src1 else if Src2 is not empty then Trg1 = Src2 else if Src3 is not empty then Trg1 = Src3.
How can I acheive the above ? Please advice.
Thanks,
Teresa
Hi,
Use the mapping as below:
http://img205.imageshack.us/img205/3408/mappingexample.png
You can use different function instead of exists() if required (for example if you value always exists, but sometimes is empty, then use equals empty). And of course use your own fields instead of Name1,2,3.
Hope you'll find this useful,
Greg
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,
The difference between IF and IFs is that IFs works like an if statement. that means that first the condition is evaluated and based on that either the IF or the ELSE branch is evaluated.
In the case of IF all the branches get evaluated.
In your case you can safely use any of the two blocks.
Regards,
Horia
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
chk this:
http://forums.sdn.sap.com/thread.jspa?threadID=1984292
whats the output in case when all the input fields dont have any value??
chk this UDF :
if(a.length()>0)
{
return a;
}
else if (b.length()>0)
{
return b;
}
else if(c.length()>0)
{
return c;
}
else
{
return "No combination exist";
}
Edited by: AmitSri on Jan 23, 2012 5:40 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Teresa,
By using SDN search button with "IFS", in less 2 min, you should find by yourself the answer.
[Oss notes 1158484 - FAQ about If - IfS and IfWithoutElse/IfWithoutElse|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes/sdn_oss_bc_xi/~form/handler%7b5f4150503d3030323030363832353030303030303031393732265f4556454e543d444953504c4159265f4e4e554d3d31313538343834%7d]. (SDN link, not service market place)
Mickael
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.