Framework EDI Reference. Methods and Properties
ediTransactionSet. GetEdiString

Gets a string containing the entire content of the UN/EDIFACT Message or ASC/X12 Transaction Set.

Syntax:

Remarks

The text starts with and includes the UN/EDIFACT Message or ASC/X12 Transaction Set Control Header and ends with and includes the control trailer.  The control segments are as follows:

ASC/X12

UN/EDIFACT

 

Example

Dim oEdiDoc As ediDocument
Dim oSchema As ediSchema
Dim oInterchange As ediInterchange
Dim oGroup As ediGroup
Dim oTransactionSet As ediTransactionSet
Dim sEdiFile As String
Dim sSefFile As String
Dim sOutputString As String

sEdiFile = App.Path & "\850.X12"
sSefFile = App.Path & "\850.SEF"

Set oEdiDoc = New ediDocument
Set oSchema = oEdiDoc.LoadSchema(sSefFile, 0)

oEdiDoc.LoadEdi sEdiFile

' Get Interchange from document
Set oInterchange = oEdiDoc.FirstInterchange

' Get Functional Group from Interchange
Set oGroup = oInterchange.FirstGroup

' Get Transaction Set from Group
Set oTransactionSet = oGroup.FirstTransactionSet

' Get interchange string
sOutputString = oTransactionSet.GetEdiString
Debug.Print sOutputString