Register or Login to Your Account
please any one let me know how to implement logic for segment count in EDI X12 or EDIFACT.
i.e number of transaction segments which appear as first element in Group Segment and the number of group segments in Envelope.
You can determine the count for the group segments in envelope from the IEA segement (element IEA01).
Similarly you can determine the count of transaction sets within a functional group from the GE segment (element GE01).
yes as you said that IEA01 contains number of Group segments,But
How to implement the logic for this while translating to an EDI from othe formats.
While translating from other format to EDI format, follow the below steps:
1. Convert the ISDocumentType (EDI Values) to String using wm.b2b.edi:convertToString.
2. Use wm.b2b.edi.util:controlNumber to get the Control number.
3. Use wm.b2b.edi.util:addGroupEnvelope to add the Group envelope passing the required fields.
4. Use wm.b2b.edi.util:addICEnvelope to add the IC Envelope passing the required fields.
Using the in-built services will create the envelope with the counts for the Group Segment and Transaction Sets in the IEA01 and GE01 fields respectively.
I hope this will help.