on 10-27-2011 7:29 AM
Dear SDNs,
I need your immediate help on the following udf, the problem is, it is returning nulls. Really appreciate your help.
Source Message STructure, I am passing arrays values into the UDF Context vales.
IDOC
Other nodes
.
.
rel_addr 0..n
bupa_tel 0 ..n
tel 0..1
r3 0..1
public void test4(String[] rel_addr, String[] bupa_tel, String[] tel, String[] r3, ResultList
result, Container container) throws StreamTransformationException{
int reladdrs, bupatels,tels,r3s;
reladdrs=rel_add.length;
bupatels=bupa_tel.length;
tels = tel.length;
r3s =r3.length
if(reladdrs!=0)
{
for(int i=0; i<reladdrs; i++)
{
if(bupatels!=0)
{
for(int y =0; y<bupatels; y++)
{
if(r3s != 0)
{
if(r3[y].equals("1") || r3[y].equals("0") ){
result.addValue(tel[y]);
}
}
}
}
}
}
}
Hi,
For rel[y] will not have value for the second iteration as a result you must be getting nulll....
you cannot use index for the rel...as it will have only one value...
HTH
Rajesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.