• Login
    • Stedi.com

    LS/LE segments

    General
    2
    2
    72
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • K
      kasia last edited by

      Does anyone know why are LS and LE segments used?

      Stumbled upon this example, where I believe LS and LE separate REF for different warehouses, but curious what's the more general use case for them. Thanks in advance!

      lsle.png

      1 Reply Last reply Reply Quote 0
      • R
        ross last edited by

        Hi @kasia ,

        LS/LE segments are used to help parsers (and humans) differentiate between segments which can appear in multiple places in a transaction set. Sometimes it is possible for the last segment of a loop to have the same segment ID as the segment after the loop ends.

        For example, in the 846 in the 004010 release, https://www.stedi.com/edi/x12-004010/846, the detail area 450 sequence is an N1 segment. In the loop prior to the 450 there is an N1 segment at the 410 sequence. If you received EDI with an N1 it may not be clear whether it is the N1 at the 410 or the 450 sequence.

        But, if the previous loop (380 sequence in this case) is wrapped in LS and LE segments then we can differentiate the two N1 segments, as there will always be an LE segment between the 410 and 450 N1 segments.

        1 Reply Last reply Reply Quote 1
        • First post
          Last post
        Powered by NodeBB | Contributors