cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple occurances of line item segment based on the Del quantity value

former_member187447
Participant
0 Kudos

Hi

I got a scenario where in i have to have multiple occurances of Line item segment based on LFIMG(Actual quantity delivered).

So if we have LFIMG as 10 the line item segment should occur 10 times in the target. Can we use the existing functions in the graphical mapping to achieve this or should we right a UDF.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

U can do it with graphical mapping only no need to use UDF.

map the LFIMG to root node of item segement (if require use spitbyvalue or remove contex fuction) it will repeat itself..I am not sure about the relation ship of LFIMG with ur IDOC segment but it will work along with node function,

chirag

former_member187447
Participant
0 Kudos

@Chirag,

But i dont want to repeat the root node, its only the child node for which i need multiple occurances.

Former Member
0 Kudos

Hi,

I mean the child node only....with graphical mapping logic it will work.

chirag

Edited by: Chirag Gohil on Nov 19, 2010 4:07 AM

former_member187447
Participant
0 Kudos

I am opening a new post for this one, i would definitely like to know how to do it with Graphical mapping, I will explain my scenario there

nabendu_sen
Active Contributor
0 Kudos

Hi Kalyan,

As per my knowledge, its not possible or would be very critical to achieve. It is better to use UDF. Please find the code:

Input String <var1>. Use All Values of a Context.

*****************************************

int counter = Integer.parseInt(var1[0]);

for (int i=0;i<counter;i++)

{

result.addValue("");

}

*******************************************

Thanks,

Nabendu.

former_member187447
Participant
0 Kudos

Thanks.

Also i would like to change the structure by changing the occurance of that Line item segment, the problem is it is an EDI XSD i am not able to change the occurance by going into the edit mode for that XSD in the external definitions. So what are my options. I am closing the current post and have opened a new post for this one.