| EDIdEv - Electronic Data Interchange Development | EDIdEv | |
|
EDI Tool for Developers | |
|
The 997 Functional Acknowledgment Framework EDI (FREDI) can automatically generate 997 Functional Acknowledgments simply by doing the following: Dim oEdiDoc As Fredi.ediDocument
Dim oAck As Fredi.ediAcknowledgment
Dim oSegment As Fredi.ediDataSegment
Dim sSefFile As String
Dim sEdiFile As String
Dim sAckfile As String
Dim sPath As String
Set oEdiDoc = New Fredi.ediDocument
oEdiDoc.CursorType = Cursor_ForwardOnly
'Load SEF file for EDI file
oEdiDoc.LoadSchema sPath & sSefFile, 0
'Load SEF file for 997 EDI file
oEdiDoc.LoadSchema sPath & "997_4010.SEF", 0
'Enable 997 Functional Acknowledgment
Set oAck = oEdiDoc.GetAcknowledgment
oAck.EnableFunctionalAcknowledgment = True
'Load EDI file
oEdiDoc.LoadEdi sPath & sEdiFile
'Traverse thru EDI file
Set oSegment = oEdiDoc.FirstDataSegment
Do While Not oSegment Is Nothing
Set oSegment = oSegment.Next
Loop
'Save 997 to file
oAck.Save sPath & sAckfile
With some modifications to the above program, it is also possible to create yourself a self made 997 Functional Acknowledgment by interrogating the ediDocument Events for errors, and then identifying and reporting them in a 997 EDI format. Below are some of the essential modifications to be noted In the Form1 class: 'declare ediDocument with events 'add procedure to
capture Events Additional classes to the sample program to do the following: - CAck977 - creates the 997
EDI file Click here to download the complete VB .NET example program "My997Ack.zip".
The 999 Implementation Acknowledgment The current version of FREDI 5.5 does not automatically generate a 999 Implementation Acknowledgment, but with some modifications to the above "My997Ack.zip" sample program, one can manage to create a 999 EDI file. Basically, we just have to replace the segments AK3 and AK4 with segments IK3 and IK4 respectively. We also have to add the CTX segment in the IK3 loop (2100) into the acknowledgment. Unfortunately, there is a limitation to the current FREDI Events in that it does not describe situational triggers for related errors, and therefore this program cannot create the CTX segments that report the situational trigger information. Click here to download the VB .NET example program "My999.zip"
|
EDIdEv - EDI Development
www.edidev.com