on 03-09-2009 8:14 AM
Hi,
I have a mapping requirement where if the source field - 'Item' = 'a' or 'b' then pass 'A' to target field - 'Itm' if a value other than a or b then pass 'B' to the same field.
I have approached it this way, IF(Item(equalS(Or( a,b)) then constant=A else Constant = B.
This is the error thrown,
" Cannot cast a to boolean] in class com.sap.aii.mappingtool.flib3.Bool method or[a, b, com.sap.aii.mappingtool.tf3.rt.Context@1f65697]"
Could someone help me out !
Thanks,
Raggy
Edited by: Raghavendra Vuppala on Mar 9, 2009 9:17 AM
Hi,
OR operator is used for boolean inputs.
Split your equation.
equalS(item, 'a') ---->Res1
OR(Res1, Res2) ---> IF true THEN 'blabl' ELSE 'blibli'
equalS(item, 'b')----->Res2
Regrads
Edited by: Joseph BERTHE on Mar 9, 2009 9:29 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
use this way
OR(Equals(item, const(a)), Equals(item, const(b)))-if -
else--const(B)--
i hope u understand
regards,
manisha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
the easiest way is to use the standard function FixValue (Function Category: Conversions):
default -> B
a -> A
b -> A
Regards
Patrick
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
>
> Hi,
>
> I have a mapping requirement where if the source field - 'Item' = 'a' or 'b' then pass 'A' to target field - 'Itm' if a value other than a or b then pass 'B' to the same field.
>
> I have approached it this way, IF(Item(equalS(Or( a,b)) then constant=A else Constant = B.
>
> This is the error thrown,
> " Cannot cast a to boolean] in class com.sap.aii.mappingtool.flib3.Bool method or[a, b, com.sap.aii.mappingtool.tf3.rt.Context@1f65697]"
>
> Could someone help me out !
>
> Thanks,
> Raggy
>
> Edited by: Raghavendra Vuppala on Mar 9, 2009 9:17 AM
use this;
Item *equalsS* a----- ----- Constant A to target
| ---- OR - IF
Item *equalsS* b----- else ----- Constant B to target
Note use EqualsS string function.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
8 | |
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.