cancel
Showing results for 
Search instead for 
Did you mean: 

EDI Question (Count EDI Segements)

Former Member
0 Kudos

Hi,

I want to map the field D_96 under the EDI Segment SE and I was wandering if how to do that?

The description of the field is: Total number of segments included in transaction set.

So is there a way that I can load the result mapping in a Java function so that I can count the number of segments?

I know that I could add a counter (using user-defined function) for each segment that I'm writing but I was just wandering if there would be an easier way of doing it.

Rgds,

Yves

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi,

try to use node functions like Split By Value....

have a look at this blog...

/people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii

regards,

sundararamaprasad.

Answers (3)

Answers (3)

Former Member
0 Kudos

Thanks, I will try the Java mapping.

Tgds,

Yves

Former Member
0 Kudos

Hi ,

Were you able to use java mapping for counting th enumbe rof segments? if so could you please give me the details.

thank you

Former Member
0 Kudos

hey... just use the count function in the statistics section of the standard graphical mapping...

in future you should open a new thread and you would probably get more people respond to you

Former Member
0 Kudos

Hi Alexander

I am mapping an IDOC to the EDI format , For that i need to fill in the last segment with the number of segments in the created EDI document. I am not quiet sure how to use COUNT function for this , Coul dyou tell me the schema for using this function please.

Thanks

Sudheer

Former Member
0 Kudos

Hi Yves,

i don't think, that it is possible in a Java function within a message mapping, but you can do it by creating a java mapping from the result of the message mapping to the same structure. Then you can count the nodes and add just the value to D_96.

In your Interface mapping you will just need to add the additional java mapping after your message mapping.

Best regards

Christine

Former Member
0 Kudos

Yves,

The total no of EDI line segments will be present in the SE itself. the second field contains total no of line segments + 2 (ST & SE). Hence just subtract 2 to get the correct no in any EDI.

regards,

Felix