cancel
Showing results for 
Search instead for 
Did you mean: 

message mapping

Former Member
0 Kudos

Hi ,

  i had a requirement on mapping condition

If field1 = ABC and field2 <> XYZ then use the values from that 'SRCHEADER'  to 'TGTHEADER'.  for this i had written UDF

for (int i = 0; i< SRCHEADER.length; i++) {

if(field1[i].equals( "ABC") &&  !(field2[i].equals( "XYZ")))

  result.addValue("");

else

result.addValue(ResultList.SUPPRESS);

}

while executing i ma getting error:  Exception:[java.lang.ArrayIndexOutOfBoundsException: 1]

can you please help me on this.

thanks

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

thank for your help ,

issue resolved with graphical mapping only.but i dont unerstand why my UDF is not working.

former_member187010
Participant
0 Kudos

Hi Shaik,

I think you were not using "All values of queue".

Try with this execution type under function tab and see, this will remove the error msg.

Regards

Jitender

former_member182455
Active Contributor
0 Kudos

Hi shaik,

you can use standard functions.

field 1 = ABC

AND                   Then Map SRCHEADER  ---> Traget

Field2 = xyz

Regards

srinivas

Former Member
0 Kudos

hi srinu,

  Field2 not equals to XYZ

iaki_vila
Active Contributor
0 Kudos

Hi Shaik,

You are taking the number of iterations of the variable SRCHEADER but you are accessing to the variables field1 and field2, then if the length of field1 or field2 is lower then the exception would be raised. You need to do a While and control this issue or to do the iteration with field1 or field2.

Regards.

Former Member
0 Kudos

thanks for you reply Vila,

  field1 & filed2 are the fileds of the header 'SRCHEADER'  fileds are iterated as many times as SRCHEADER.

Former Member
0 Kudos

Hi Shaik,

Please make sure that Field1 and Fields2 has the same amount of values(queue entries).

Regards,

Jannus Botha