1

I'm new to Altova Correct me if I'm wrong.

I'm in a situation to map XML schema File to X12 and here I have a problem to get the actual X12 structure.

Requirements: X12.6020 - 811 (Consolidated Service Invoice/Statement)

Picture of the Actual X12 Structure and My mapped X12 Structure
https://ibb.co/cWFBAa

Picture of the XML file
https://ibb.co/ggZDqa

Picture of the Mapping from XML to X12
https://ibb.co/k5qWbF

In the above XML all notice Objects are grouped using 'group-adjecent' library function based on 'contractId' and each group should have one 'Detail' and I need to iterate though the individual group and create 'Sub-detail' and 'Sub-sub-detail' for each notice under group.

I have used 'Add Duplicate Input After' function on EDI 811 Component to create a duplicate 'LoopHL' node. ie., 'LoopHL', 'LoopHL1', 'LoopHL2' in the mapping picture above.

Ask me if you need any further information, if you feel it will be helpful to understand my question.

Thanks in advance, guys.

Raj K
  • 458
  • 2
  • 7
  • 22
  • 1
    From my experience easiest way to work with hierarchical HL loops is to tune template located at C:\Program Files (x86)\Altova\MapForce2016\MapForceEDI\X12.4010\811.Config - copy whole HL loop and insert one HL loop in another HL loop. – Artem Mar 24 '17 at 01:44
  • 1
    I believe you also may try to achieve this result using nested non-inline functions, but this is more difficult approach which will be harder to maintain – Artem Mar 24 '17 at 01:48
  • Hi @Artem, thanks for the reply. I found that I can achieve the desired result by modifying 811.config file, but I'm not sure if I can change the 811 standard hierarchy, although it works perfect for my situation. I read some online help on altova.com about non inline functions, which is not so helpful. Can you point me to the direction where I can get proper usage of functions for my situation. – Raj K Mar 27 '17 at 12:14
  • I think you should connect the "group" output of your "group-adjacent"-box with the "Loop HL(2)" input, thereby replacing the line from "invoice" to "Loop HL(2)". – Kai Weber May 23 '17 at 07:41
  • I got it by modifying the 811.config. Copied entire HL Loop and inserted it into another HL Loop as - Artem suggested. And I appreciate for your suggestion @Kai. – Raj K May 23 '17 at 18:12

0 Answers0