cancel
Showing results for 
Search instead for 
Did you mean: 

Need help on UDF ResultList returns Nulls

Former Member
0 Kudos

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]);

}

}

}

}

}

}

}

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Answers (0)