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:
The version identified is assigned to the value starting at position 1 and ending at position 3.
The release identified is assigned to the value starting at position 4 and ending at position 6.
The industry identified is assigned to the value starting at position 7.
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:
The version identified is assigned to the Message Version Number (0052) data element.
The release identified is assigned to the Message Release Number (0054) data element.
The industry identified is assigned to the Association Assigned Code (0057) data element.
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"