Framework EDI Reference. Methods and Properties
ediAcknowledgment. MapMessageLevelError

Maps a Framework EDI standard error code (in the Transaction Set/Message Group semantic level) to an acknowledgment code.

Syntax:

Parameters:

Returns

Returns a value of 1 if successful, otherwise 0 if the operation failed.

Remarks

When an instance of Framework EDI is created, a pre-defined set of standard error codes are mapped by default to acknowledgment error codes. This method allows users to create or remove their own custom mappings of acknowledgment codes that report errors at the transaction set/message level. In X12, the data segment reporting level is AK2-AK5. In EDIFACT, the data segment reporting level is UCM.

NOTE: This method works exactly like MapTransactionSetLevelError.

Example

Set oEdiDoc = New Fredi.ediDocument
oEdiDoc.CursorType = Cursor_ForwardOnly

oEdiDoc.LoadSchema spath & sSefFile, 0

Set oAck = oEdiDoc.GetAcknowledgment
oAck.EnableFunctionalAcknowledgment = True

oAck.MapMessageLevelError 13209, 2
oAck.MapDataElementLevelError 13209, 5
oAck.MapGroupLevelError 13209, 6

oEdiDoc.LoadEdi sEdiFile

Set oSegment = oEdiDoc.FirstDataSegment
Do While Not oSegment Is Nothing
   Set oSegment = oSegment.Next
Loop

oAck.Save sAckfile