on 10-05-2009 9:41 AM
Hi Friends,
I have the below mapping.The if condition is satisfied,even though 'then' value is going to the target field.
When i try to check the queue of the 'IF' function it is throwing error RUNTIME EXCEPTION-Cannot cast null to boolean
>splitbyvalue(eachvalue)----> then
->splitbyvalue(eachvalue)
->mapwithdefault->else
Please help !!!
Regards,
Suresh.
the input to the if standard function should be boolean value true or false.So use those standard function before if whose output is boolean.
SplitByValue does not return boolean value.
If you tell us your mapping requirement then we will help you to do the correct mapping.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Suresh ,
Do the mapping as
OTYPE -------->equalS------------->\
Constant[P]/ Constant[123]--->Then
-->And -------------------> If ------- --- --> TELNO
FILTER------->equalS(StringFunction)--->/ TELNO-->Else
Constant[SD1]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Suresh,
>splitbyvalue(eachvalue)----> then
->splitbyvalue(eachvalue)
->mapwithdefault->else
What are you trying to do with the above mapping?What is the source field? Provide some more details
>>RUNTIME EXCEPTION-Cannot cast null to boolean
This is a valid error because you are passing "null" and it expected "boolean"
Regards
Suraj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Thanks for the input!!
In the below mapping suppose both 'equals' are satisfied then constant value '123' will go to target field otherwise 'else' value will go.
constant(123)----
/
>concat>splitbyvalue(eachvalue)----
> then
E1K1456(source segment)-->\
equals/
>and--
/
---equals-\
concat>splitbyvalue(eachvalue)>if------>target field
E1K1456(source segment)----
>\
source field ->mapwithdefault->else
Regards,
Suresh.
In the below mapping suppose both 'equals' are satisfied
Which equals function are you using. Looking at your requirement (where you are comparing two values....arithmatically) I suppose that you are using the equalS function and not the equals (boolean fuction). From the error it is clear that input to IF function is not boolean.
Regards,
Abhishek.
Hi,
I think my mapping is not done properly. Could you guys help me with the correct mapping--
In the source structure under the segment E1POO1 there are 3 fields whose condions are as below--
Source structure
E1P0006
--OTYPE
--FILTER
--TELNO
The OTYPE value should be 'P' and FILTER value shoud be 'SD1', then only the the constant number 123 should go to the target field TELNO(Present in the segment K1P9009 ONLY),othewise the value from TELNO of source should target field TELNO(Present in the segment K1P9009 ONLY).
Regards,
Suresh.
OTYPE ----->
--->equalS(StringFunctIon)-->
Constant(P)---> Then(Constant: 123)
-->And(Boolean Function...O/P from equalS) --> IfWithElse ---> Target(K1P9009 --> TELNO)
FILTER ---> Else(TELNO)
--->equalS(StringFunction)--->
Constant(SD1)-->
For multiple instances of source field (E1P0006) raise the context of the relevat fields....
Regards,
Abhishek.
Hi Suresh,
Please try the below code with the inputs to the function as otype, filter and telno respectively. Use context as the input type in the UDF
for(int i=0;i<OTYPE.length;i++)
{
if(OTYPE<i> == "P" & FILTER<i> == "SD1"
(
TELNO<i> = "123";
result.addValue(TELNO<i>);
)
else
result.addValue(TELNO<i>);
}
Regards,
Vishnu.
User | Count |
---|---|
88 | |
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.