Returns the collection of all elements in the Data Segment.
Syntax
Returns
Object of type FREDI.ediDataElements.
Remark
A data segment is made up of data elements each separated by data element terminators. For example, the DTM segment below has two data elements separated by an asterisk (*).
DTM*003*20011204
When a document is read, all the data elements and composite elements of the data segment is stored in the ediDataElements collection. This object is returned by this property.
Example
Dim oDataElement As Fredi.ediDataElement
Dim oDataElements As Fredi.ediDataElements
Dim oDataSegment As Fredi.ediDataSegment
Dim sElements As String
....
' Get first data segment in document.
Set oDataSegment = oEdiDoc.FirstDataSegment
' Get the data segment.
Set oDataSegment = oDataSegment.GetDataSegmentByPos("\ISA\GS\ST\BEG")
' Get the data segments collection of data elements.
Set oDataElements = oDataSegment.DataElements
For Each oDataElement In oDataElements
' Show some element properties.Next
sElements = sElements & oDataElement.Position & vbTab & oDataElement.ID & vbTab & oDataElement.Description & vbCrLf
MsgBox "Elements in Data Segment:" & vbCrLf & vbCrLf & sElements
Sample