Framework EDI Reference. Methods and Properties
ediInterchange. CreateGroup

Creates a Functional Group within the Interchange.

Syntax:

Parameters:

Returns

If successful a FREDI.ediGroup object is returned, otherwise an empty object is returned.

Remarks

The <sVersionString> parameter is used to select the one schema that is used as a guideline for the creation of the functional group.  The controlling agency used in the search is the one specified earlier in the call made to CreateInterchange.  FREDI will search through the list of one or more schemas that have been loaded (or imported), and/or the standard reference library, for a matching version.  If one is found, then the schema is used; otherwise the method will fail.

ASC/X12:  The schema selected is used as a guideline for the creation of the functional group as well as the underlying transaction sets and semantic objects.  By default, the version string is assigned to the Version / Release / Industry Identifier Code (480) data element of the Functional Group (GS) control header as follows:

Example:

:
Set oGroup = oInterchange.CreateGroup("004010X091")

UN/EDIFACT:  By default, the version string is assigned to the Message Version (S008) composite element of the Group Header (UNG) as follows:

Example:

:
Set oGroup = oInterchange.CreateGroup("D96AEGT002")

Example

:
Set oGroup = oInterchange.CreateGroup("004010")
'Gets the GS segment, then its element values are changed.
Set oSegment = oGroup.GetDataSegmentHeader
oSegment.DataElementValue(1) = "IN"
oSegment.DataElementValue(2) = "SENDERDEPT"
oSegment.DataElementValue(3) = "007326879"
oSegment.DataElementValue(4) = "19960807"
oSegment.DataElementValue(5) = "1548"
oSegment.DataElementValue(6) = "000001"
oSegment.DataElementValue(7) = "X"
oSegment.DataElementValue(8) = "004010"