Electronic Data Interchange
Construction of Functional Acknowledgment (ASC/X12)

The following table shows what reporting level is created in the acknowledgment at the same time a level has been referenced in the subject document.

REPORTING LEVEL REPORTING LEVEL DESCRIPTION REFERENCED LEVEL
AK1 and AK9 Functional Group Response Header (AK1) and Functional Group Response Trailer (AK9) GS, GE
AK2 and AK5 Transaction Set Response Header (AK2) and Transaction Set Response Trailer (AK5) ST, SE
AK3 Data Segment Note Data Segments
AK4 Data Element Note Data Elements

The functional acknowledgment acknowledges a functional group, so verification for functional acknowledgment begins with the functional group header (GS) and ends with the functional group trailer (GE).  So for each functional group encountered in a subject document, FREDI builds a Functional Acknowledgment (997) transaction set.  The diagram below shows the resulting functional acknowledgment structure created from a subject document containing 2 functional groups.  It also shows the corresponding data segment created in the functional acknowledgment as data segments are encountered in the subject document.

The functional acknowledgment is constructed as follows:

  1. ISA.  The Interchange Control Header (ISA) is automatically generated when the first interchange header in the subject document is encountered during verification.  See Auto-Create of Interchange Control Header (ISA).

  2. GS.  The Functional Group Header (GS) is automatically generated when the first functional group in the subject document is encountered.  See Auto-Create of Functional Group Header (GS).

  3. ST.  A transaction set is created for every functional group encountered in the subject interchange.  The transaction set is always started with a Transaction Set Header (ST) control segment and is created as follows for the functional acknowledgment:

     
    POSITION ELEMENT ID DESCRIPTION CONSTRUCT INFO
    01 143  Transaction Set Identifier Code The functional acknowledgment transaction set identifier "997" is assigned to this data element.
    02 329  Transaction Set Control Number The control number is the current count of the transaction sets created within the functional group of the acknowledgment, padded to the left with zeros to satisfy the minimum length requirement.  The first transaction set has a control number of 1.

    The value here is saved to be later stored in the Transaction Set Trailer (SE) data element 329 when the transaction set is closed.

    03 1705  Implementation Convention Reference Not created.  Introduced in later version of ASC/X12.


  4. AK1.  A Functional Group Response Header (AK1) is created immediately after the transaction set header.  Like the transaction set header, there is a one-to-one relationship of this segment with the functional group in the subject document.  The AK1 is created as follows:
    POSITION ELEMENT ID DESCRIPTION CONSTRUCT INFO
    01 479  Functional Identifier Code The functional group identifier of the referenced functional group is assigned here.
    02 28  Group Control Number The control number of the referenced functional group is assigned here.
    03 480  Version / Release / Industry Identifier Code The version/release information of the referenced functional group is assigned here.  The exact value found in data element 480 of the GS in the referenced functional group is assigned here.


  5. AK2.  A Transaction Set Response Header (AK2) is created for each transaction set encountered in the functional group reported by AK1.  The AK2 is created when the Transaction Set Header (ST) is encountered in the subject document.
    POSITION ELEMENT ID DESCRIPTION CONSTRUCT INFO
    01 143  Transaction Set Identifier Code The transaction set identifier of the transaction set acknowledged is assigned here.
    02 329  Transaction Set Control Number The control number of the transaction set acknowledged is assigned here.
    03 1705  Implementation Convention Reference The implementation convention reference of the transaction set acknowledged is assigned here.


  6. AK3.  A Data Segment Note (AK3) is created when an error is encountered in a data segment in a transaction set of the subject document.  This data segment is not present in the acknowledgment if no error is found in any data segment of the transaction set.
    POSITION ELEMENT ID DESCRIPTION CONSTRUCT INFO
    01 721  Segment ID Code The identifier of the data segment that has the error is assigned here.
    02 719  Segment Position in Transaction Set The position in the transaction set of the data segment that is in error.
    03 447  Loop Identifier Code The loop ID of the segment group that the data segment belongs to.
    04 720  Segment Syntax Error Code Syntax error code that has been translated from the standard error code of the data segment error.


  7. AK4.  A Data Element Note (AK4) is created when an error is encountered in a data element in a transaction set of the subject document.
    POSITION ELEMENT ID DESCRIPTION CONSTRUCT INFO
    01 C030  Position in Segment The position of the data element that is in error.
    02 725  Data Element Reference Number The data element identifier that is in error.
    03 723  Data Element Syntax Error Code Syntax error code that has been translated from the standard error code of the data element error.
    04 724  Copy of Bad Data Element Data element value of the data element in error.


  8. AK5.  A Transaction Set Response Trailer (AK5) is created when the Transaction Set Trailer (SE) is encountered in the subject document.
    POSITION ELEMENT ID DESCRIPTION CONSTRUCT INFO
    01 717  Transaction Set Acknowledgment Code  See Accepting or Rejecting a Transaction Set for functional acknowledgment.
    02 718  Transaction Set Syntax Error Code  A syntax error code determined from a syntax error discovered by FREDI is stored in this data element.
    03 718 Transaction Set Syntax Error Code  A syntax error code determined from a syntax error discovered by FREDI is stored in this data element.
    04 718 Transaction Set Syntax Error Code  A syntax error code determined from a syntax error discovered by FREDI is stored in this data element.
    05 718 Transaction Set Syntax Error Code  A syntax error code determined from a syntax error discovered by FREDI is stored in this data element.
    06 718 Transaction Set Syntax Error Code  A syntax error code determined from a syntax error discovered by FREDI is stored in this data element.


  9. AK9.  A Functional Group Response Trailer (AK9) is created the Functional Group Trailer (GE) is encountered in the subject document.
    POSITION ELEMENT ID DESCRIPTION CONSTRUCT INFO
    01 715  Functional Group Acknowledge Code  See Accepting or Rejecting a Functional Group for functional acknowledgment.
    02 97  Number of Transaction Sets Included  The total number of transaction sets specified by the functional group that this AK9 is reporting for.
    03 123  Number of Received Transaction Sets  The total number of transaction sets that was actually verified in the functional group that this AK9 is reporting for.
    04 Number of Accepted Transaction Sets  The total number of transaction sets that were accepted by the recipient.
    05 716  Functional Group Syntax Error Code  A syntax error code determined from a syntax error discovered by FREDI is stored in this data element.
    06 716 Functional Group Syntax Error Code  A syntax error code determined from a syntax error discovered by FREDI is stored in this data element.
    07 716 Functional Group Syntax Error Code  A syntax error code determined from a syntax error discovered by FREDI is stored in this data element.
    08 716 Functional Group Syntax Error Code  A syntax error code determined from a syntax error discovered by FREDI is stored in this data element.
    09 716 Functional Group Syntax Error Code  A syntax error code determined from a syntax error discovered by FREDI is stored in this data element.


  10. SE.  A Transaction Set Trailer (SE) is created 
    POSITION ELEMENT ID DESCRIPTION CONSTRUCT INFO
    01 96 Number of Included Segments  The total number of data segments in the transaction set.  This total includes the Transaction Set Header and Trailer (ST/SE).
    02 329 Transaction Set Control Number  The same control number that was assigned to the Transaction Set Header (ST) is also assigned here.


  11. GE.  The Functional Group Trailer (GE) is created when the Interchange Control Trailer (IEA) has been encountered which indicates that the end of the subject interchange has been reached.  See Auto-Create of Functional Group Trailer (GE).


  12. IEA.  The Interchange Trailer (IEA) is created immediately after the Functional Group Trailer (GE) has been created.  See Auto-Create of Interchange Control Trailer (IEA).


See Also