1 Reply Latest reply on Dec 24, 2018 6:16 AM by Dheeraj Kumar M at Accenture

    Oracle - Incorrect Segment and Transaction Set Counts in BPEL Operations for X12 File

    3312288

      Hi All

       

      Recently , I had been doing development related to transforming a Positional Flat File to EDI_X12 File, here the output is an 856 file.

      The transformation and setup are working correctly except for one issue. The requirement was to accommodate multiple ST/SE (Multiple Transaction sets within the same file).So the structure of my output document would be
      ISA

      GS

      ST

      SE---(SE_01 element will give number of segments coming under this ST-SE(transaction) , including ST and SE segments )

      ST

      SE

      ST

      SE---(SE_01 element will give number of segments coming under this ST-SE(transaction) , including ST and SE segments )

      .

      .

      .

      GE ---(GE_01 element will give number of transaction sets (ST-SE) )
      IEA

       

      I used B2B adapters for input and output with the necessary ECS/XSD.
      Now, when doing the development for the output document X12-856 in this case Oracle Doc Editor had the limitation of generating only single ST/SE Per set.
      So we introduced a loop (refer to the screenshot ,ODE_Strcture.PNG), to accommodate multiple ST/SE.

      The output is generating correctly with multiple ST/SE in one file but the count of segment in the SE Segment(SE01 element ) is showing incorrect values.
      We have used #SegmentCount# to count the number of segments and mapped to SE01 element.

       

      What is happening here,by applying #SegmentCount#  it's giving correct segment count for first occurrence ST-SE only.

      But second ST-SE and onwards  it's adding the total segments coming in current ST-SE plus segments  previously coming under all ST-SE.

       

      Also for transaction set count is not coming correctly in GE segment (GE_01 element).

       

      Can someone please suggest a correction or alternate approach to count the segments under SE and translation sets under GE correctly.

       

      Thanks in advance for your help.