997 FA Segments description
The description of 997 FA segments continues our previous post where we spoke about 997 FA basic definition and recoinciliation. Below you will find the main 997 FA segments, their description and purpose.
AK1: This 997 FA segment refers to the (GS) group level of the original document. AK101 is equal to the GS01 of the original document. For example, if a document is a Purchase Order, AK101= ‘PO’. If a document is an invoice, AK101 = ‘IN’. AK102 = GS06 of the original document. This is the group control number.
AK2: This segment refers to the (ST) Transaction Set level of the document. AK201 is equal to the ST01 of the original document. For example, if a document is a Purchase Order, AK201= 850. If a document is an invoice AK201 = 810. AK202 = ST02 of the original document. This is the transaction set control number.
AK3: Used to report errors in a data segment and identify the location of the data segment. AK301 contains the segment name that has the error. The segment name in the second example is ‘PID’. AK302 contains the numerical count position of this data segment from the start of the transaction set; in the example above the erroneous ‘PID’ segment is in the 4th position. AK303 contains the loop ID where the error occurred. AK304 contains the error code and it specifies what the error is. In the second example, the code is ‘8’ which means “Segment Has Data Element Errors”.
AK4: Used to report errors in a data element and identify the location of the data element. AK401 contains the data element position in the segment that has an error. In the erroneous 997 example, the error is in position 5; PID-05. AK402 contains the data element reference number, PID-05 = 352. AK403 contains the error code, it specifies what the error in the data element is, in the PID-05 the code is ‘6’ which is “Invalid character in data element.” AK404 contains a copy of the bad data element data.
AK5: Used to report errors in a transaction set. AK501 indicates whether the whole document (STà SE) is ‘A’ Accepted, ‘R’ Rejected or ‘E’ Accepted with errors. Other codes such as ‘M’, ‘W’ or ‘X’ are available but are hardly ever being used, they are made for security decryption purposes. In erroneous example above, AK501 = ‘E’ that means the invoice was accepted with errors. AK502 is not used in the example above. The purpose of AK502àAK506 is to report an error code on the whole transaction. Some sample error codes include:
1-Transaction Set Not Supported
2-Transaction Set Trailer Missing
3-Transaction Set Control Number in Header and Trailer Do Not Match
AK9: This is the acknowledgement code for the whole Group (GSàGE). AK901 is different from AK501 because AK901 indicates whether the whole Group is ‘A’ Accepted, ‘R’ Rejected or ‘E’ Accepted with errors. AK902 is a count of the ST à SE transaction sets included in the acknowledgement. AK903 is the number of received transaction sets and AK904 is the number of Accepted transaction sets.