cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple occurances of lin itm seg based on a field using graphical mapping

former_member187447
Participant
0 Kudos

Hi

I have a scenario where in i have to populate the target segment multiple times based on quantity field LFIMG

Source structure in IDOC and target structure is XSD. In the following we need to have multiple occurances of S_LIN based on LFIMG. So if the value of LFIMG is 6 we need to have 6 occurances of S_LIN.

Source structure

E1EDL24 (segment)

LFIMG (field)

Target structure

ITEM (segment)

GSHL (segment)

S_LIN (segment)

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member472138
Active Contributor
0 Kudos

Hello Kalyan,

You need to write an udf like this.

LFIMG (change context Queue)---->UDF ---> S_LIN

Variable : source and separator(",")

String[] values = source.split(separator);

for(int i = 1 ; i < values.length ; i++){

result.addValue(values<i>);

result.addValue(ResultList.CC);

}

Regards

Pothana

former_member187447
Participant
0 Kudos

Pothana, thanks for the code but i already have the code. Just wondering if we can do it without the the UDF using graphical mapping.

Former Member
0 Kudos

Now I got ur actual question- U wanted based on value of length u wanted ur child node to be repeated--- For this requirement u have to use small UDF.

I was under impression that LFIMG node is repeating.

chirag