Hi All,
I am working on IDOC to file scenario in PI 7.31.
Now segment E1P1000 comes thrice in IDOC,E1P1000 segment has child node OTYPE and STEXT.
Otype values for all the three segments are O,S and C.
I need to implement condition where OTYPE = S I need to return corresponding STEXT otherwise blank.
Now using standard functions when I am giving logic If OTYPE =S then STEXT to target field, it is lways picking first contect which is OTYPE =O and the condition goes false so blank is populated to target field.
So I am trying to do through UDF, below code is being written. It does not fail with any syntax issue, but at runtime it gives .ArrayIndexOutOfBoundsException: 1.
String a = " ";
for(int i=0; i<=otype.length;i++)
{
if(otype[i].equals("S"));
{
for( int j=0;j<=stext.length;j++)
{
a = stext[i];
}
result.addValue(a);
}
}
Please let me know what is the problem with my logic.
Regards,
Sachi