cancel
Showing results for 
Search instead for 
Did you mean: 

creating multiple target fields from multiple source fields

former_member452321
Participant
0 Kudos

In IDOC E1EDPO1>Z1EKPO2 -itemlevel
I have the following 18 fields
ZZMLTNOTE1 TO ZZMLTNOTE18
In each i need to check particular text(Test) if equals
then I need to create Notes segment in target
Can it be done with udf instead of creating duplicates of 18 Notes in target for
each ZZMLTNOTE with creat if
ZZMLTNOTE1>equals >Test >createif >Notes instead of doing this

any udf?
if there are 5 ZZMLTNOTEs has that value in first item level it has to create.5 notes in target  similary in other line item levvel
Thanks
Mahesh

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Mahesh

Duplicate the node on target and do the mapping.

You can try this once. Not sure if this will work

- Change the cardinality of target field Note to 0..18

- Write UDF with 18 inputs(Use "All value in context" while creating UDF)

- Check your conditions in UDF

- Map all 18 notes to UDF (Do not change the context, map as is)

If(ZZMLTNOTE1[0].equals("test")){

     result.addValue(ZZMLTNOTE1[0]);

}

If(ZZMLTNOTE2[0].equals("test")){

     result.addValue(ZZMLTNOTE2[0]);

}

.

.

.

Regards

Osman

former_member452321
Participant
0 Kudos

Thank you. I didnt changed the cardinality and it worked.

(ZZMLTNOTE1[0].equals("test")){ 

     result.addValue("");

}

former_member452321
Participant
0 Kudos

It is creating in 1st line item only.TO create in all the line items do I need to change context to E1EDP01 for all the fields?

Answers (0)