EDIdEv - Electronic Data Interchange Development      EDIdEv


 
Generating EDI Acknowledgments with Framework EDI

  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
Private WithEvents oEdiDoc As ediDocument 

'add procedure to capture Events
Private Sub oEdiDoc_EventNotify(ByVal EventNotify As Edidev.FrameworkEDI.ediEventNotify) Handles oEdiDoc.EventNotify

   oMyAck997.HandleAckNotification(EventNotify.Severity, EventNotify.ErrorDescription)

End Sub

Additional classes to the sample program to do the following:

   - CAck977 - creates the 997 EDI file
   - CAk1 - creates the AK1 and AK9 segments
   - CAk2 - creates the AK2 and AK5 segments
   - CAk3 - creates the AK3 segment
   - CAk4 - creates the AK5 segment

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"

 

  Home

  Evaluate Framework EDI

  Source Code Examples

  Purchase

  Support

  About EDIdEv LLC

EDIdEv - EDI Development
www.edidev.com