Framework EDI Reference. Methods and Properties
ediAcknowledgment. GetFirstContrlDataSegment

Returns the first Data Segment in the Acknowledgment generated by an EDIFACT document.

Syntax:

Returns

Object of type FREDI.ediDataSegment.

Controlling Agency:

Remarks

The acknowledgment generated by an EDIFACT document uses the message CONTRL.

Example

Set oAck = oEdiDoc.GetAcknowledgment

oAck.EnableFunctionalAcknowledgment = True

oEdiDoc.SegmentTerminator = "'" & vbCrLf
oEdiDoc.ElementTerminator = "+"
oEdiDoc.CompositeTerminator = ":"
oEdiDoc.ReleaseIndicator = "?"


oEdiDoc.LoadEdi sInputPath & sEdiFile

Set oSegment = oAck.GetFirstContrlDataSegment
Set oSegment = oSegment.GetDataSegmentByPos("\UNB\UNB")
oSegment.DataElementValue(4, 1) = "000101"
oSegment.DataElementValue(4, 2) = "1200"

oAck.Save sOutputPath & sAckfile