cancel
Showing results for 
Search instead for 
Did you mean: 

Graphical Mapping

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Answers (3)

Answers (3)

Former Member
0 Kudos

use this way

OR(Equals(item, const(a)), Equals(item, const(b)))-if -


thenconst(A)-- item

else--const(B)--

i hope u understand

regards,

manisha

Former Member
0 Kudos

Hi,

the easiest way is to use the standard function FixValue (Function Category: Conversions):

default -> B

a -> A

b -> A

Regards

Patrick

Shabarish_Nair
Active Contributor
0 Kudos

>

> 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.