Tag Loops

EDI Loops
EDI Loops - How to identify END of an EDI X12 Loop?
To identify the end of an EDI Loop you must remember Loops one EDI few rules
Rule # 1: Each loop has loop ID and can contain one or more segments
Rule # 2: Each loop has only one segment which is defined as a loop starting
Rule # 3: Each loop must start with the segment that the segment is defined as starting for the loop, although this segment is optional!
Rule # 4: Each loop may have a parent for purposes of identification Loop nesting
Rule # 5: Each nested loop must have a parent Loop ID
Rule # 6: Not all parents have Loops Loop ID, but if they do, must appear only as nested loops within the cycle of parents, are not independent!
Rule # 7: Loops without parents Loop ID no can be nested within the cycles of other
Rule # 8: Loop ID can not be nested within the same Loop ID
These Regulations are EDI-Loops extremely important for understanding EDI-Loops and how they work, and EDI-Loops that have no labels start / end help us identify the segments and nested loops.
Now, how to find the end of the EDI-Loop?
Find the end of an EDI-Loop is not cross-strait forward as the beginning of loop, however, you have to use a few steps to identify the end of the loop.
I will use a common ID loop in most cases, Loop ID = N1, for the loop containing sections of the N1, N2, N3, N4 (used in the transaction in September 850, ie purchase order)
These segments are used to identify a party by type of organization, name and code
N1 contain the name of the company
Name N2 contain additional information
N3 containing Information Division
Containing N4 Geographic Location
Step 1: For each segment in the transaction set, find the loop ID, you can tell if a segment of belonging to a loop in it watching Loop ID in the application guide or the EDI data dictionary, some companies use SEF files, so whatever its use, obtain the current segment Loop ID
Step 2: If Loop ID exists for that segment is the segment name beginning this ID Loop (Rule # 2)
Step 3: Now, we know that the loop ID (found in step 2), then we can continue reading Next segments and test each with the rules above:
- 1. if we find a segment that has No ID Loop, the anterior segment may be the end of our loop
- 2. if we find a segment with the same ID loop like ours and the name of the segment is the segment part of this circuit means that this is a start of new loop (item # 8), so that the end of our loop may be the anterior segment of the new loop
- 3. if running in a loop segment with different ID, ours and parent Loop ID is different then ours, it can mean two things:
- 3.1 This segment is the start of new loop - loop nested within our
- 3.2 This segment is the beginning of the new loop - not nested within our loop
To find out which of the two cases this segment is, we must rise to the level Loop until a cycle that has no parent Loop ID, and while we were climbing to the level of loop, the Parent Loop ID NO was equal to our Loop ID (because that would mean that this loop is nested inside our loop).
When we find that segment, it means that this is a start of new loop (item # 6), so that the end of our loop may be the anterior segment of the loop.
Once we found if the nested within our loop or do not do one of the following:
- 3.1 (continued) - This segment can not be a signal to the final Our Loop
- 3.2 (continued) - This segment may be the end of our loop
Outside of all those segments, the segment after our first segment is the end of our loop
How to raise levels Loop?
For all segments visit us, we must find out if Loop ID. If it does, then you can look in the Dictionary of EDI, which is the segment Loop ID and which segment is the first segment to be shown in all cases of loop, this segment Fisrt is our way of raising the levels of Loop. Once you have the first element, we ask who is the Parent Loop ID of this segment in the first place?
The Parent Loop ID will help us raise the level of Loop. When we find the Parent Loop ID the first part of our loop, which can search up to all the upstream and test if they have Loop ID, and if they do, then Loop ID is equal to our Father Loop ID Once this segment is found, repeat the process with the same question, until we find the segment that has no parent Loop ID, ie when we know that We are at the root level of the whole operation.
About the Author:
Article Source: ArticlesBase.com - Edi Loops
Tag Loops
Tag Loops
















