EDIFACTWriter Component
Properties Methods Events Config Settings Errors
The EDIFACTWriter component generates EDIFACT documents with a clear, straightforward API.
Syntax
TedEDIFACTWriter
Remarks
The component allows you to create an EDI document from scratch, one segment at a time. Here's how a document would normally be created:
- Call LoadSchema to load the necessary schemas for the transactions that will be used.
- Specify where to write the output document by setting the OutputFile, or check the OutputData property after writing.
- Create a new interchange start segment by setting the fields of the Interchange property and call the StartInterchange method. Once the interchange is complete, call EndInterchange to add the interchange footer.
- If you want to create a functional group, set the fields of the FunctionalGroup property and then call the StartFunctionalGroup. Once all the messages in the group have been created, call EndFunctionalGroup to add a footer for the group.
- To start a message, call the StartMessage method. Once all segments have been added, call EndMessage to add a footer to the message.
- To begin a segment, call the StartSegment method and pass in the tag for the segment. Once all the elements in the segment have been added, call EndSegment to add the segment terminator.
- To write a basic element to the current segment, call the WriteElement method.
- To write a composite element, call the StartCompositeElement method, then call the WriteComponent method for each component, and finally call EndCompositeElement to end the element.
Property List
The following is the full list of the properties of the component with short descriptions. Click on the links for further details.
| DelimiterComponent | The character used to separate the components in a composite element. |
| DelimiterDecimal | The character used to separate the integer portion of a numeric value from the fractional portion. |
| DelimiterElement | The delimiter used to separate elements within a segment. |
| DelimiterRelease | The character used to escape other characters within a property. |
| DelimiterRepetition | The character used to indicate a repeating element or component. |
| DelimiterSegment | The character used to terminate a segment. |
| FileWriteMode | Determines how the output file is opened for writing. |
| FGroupAppPassword | The application password as specified in the functional group header. |
| FGroupAppRecipientIdentification | The name or code of the intended recipient of the message group. |
| FGroupAppRecipientIDQualifier | The qualifier for the recipient's identification (if it contains a code value). |
| FGroupAppSenderIdentification | The name or code of the message group's sender. |
| FGroupAppSenderIDQualifier | The qualifier for the sender's identification (if it contains a code value). |
| FGroupAssociationAssignedCode | The assigned code for the message type. |
| FGroupControllingAgency | A code value that indicates the agency responsible for maintaining the message specifications. |
| FGroupDate | The date that the group of messages was prepared. |
| FGroupGroupIdentification | The identification value for the functional group. |
| FGroupMessageRelease | The message release number for the message type appearing in the message group. |
| FGroupMessageVersion | The message version number for message type appearing in the functional group. |
| FGroupReferenceNumber | The reference number for the functional group. |
| FGroupTime | The time that the group of messages was prepared. |
| InterchangeAckRequest | If this property is '1', an ACK was requested in response to this interchange. |
| InterchangeAgreementIdentifier | The identifier for the communication agreement used by the interchange. |
| InterchangeApplicationReference | If the interchange contains only one type of message, this can contain the identifier for the type of message. |
| InterchangeCharacterEncoding | The character encoding used by the interchange. |
| InterchangeCodeListVersionNumber | The identifier for the communication agreement used by the interchange. |
| InterchangeDate | The date that the interchange was prepared. |
| InterchangeProcessingPriorityCode | A 1-character code that requests a specific processing priority for the interchange. |
| InterchangeRecipientIdentification | The identification for the interchange's recipient. |
| InterchangeRecipientIDQualifier | The qualifier for the recipient identification code. |
| InterchangeRecipientInternalIdentification | More specific recipient identification for internal use. |
| InterchangeRecipientInternalSubIdentification | A sub-identification string for the receiver for internal use. |
| InterchangeRecipientPassword | A password to be verified by the recipient, such as a system or network password. |
| InterchangeRecipientPasswordQualifier | A qualifier for the recipient password. |
| InterchangeReferenceNumber | A reference number for the interchange. |
| InterchangeSenderIdentification | The identification for the interchange's sender. |
| InterchangeSenderIDQualifier | The qualifier for the sender identification code. |
| InterchangeSenderInternalIdentification | More specific sender identification for internal use. |
| InterchangeSenderInternalSubIdentification | A sub-identification string for the sender for internal use. |
| InterchangeSyntaxIdentifier | A identifier specifying the controlling agency and valid character set. |
| InterchangeSyntaxVersionNumber | A 1-character numeric value indicating the syntax version. |
| InterchangeTestIndicator | If this property is '1', the interchange is a test interchange. |
| InterchangeTime | The time that the interchange was prepared. |
| MsgAssociationAssignedCode | A code assigned to the message by the controlling organization. |
| MsgCodeListVersionNumber | The version number of the code list that should be used. |
| MsgCommonAccessReference | A reference value to associate this message with related messages. |
| MsgControllingAgency | A code that identifies the controlling agency for this message type. |
| MsgFirstAndLastTransfer | A single-character property that indicates the first and last messages in a related set. |
| MsgMessageImplControllingAgency | A code value that identifies the controlling agency for the message implementation. |
| MsgMessageImplIdentification | Identifies the message implementation. |
| MsgMessageImplRelease | Identifies the release number for the message implementation. |
| MsgMessageImplVersion | Identifies the version number for the message implementation. |
| MsgMessageRelease | Identifies the release number for the message. |
| MsgMessageSubsetControllingAgency | A code value that identifies the controlling agency for the message subset. |
| MsgMessageSubsetIdentification | Identifies the message subset. |
| MsgMessageSubsetRelease | Identifies the release number for the message subset. |
| MsgMessageSubsetVersion | Identifies the version number for the message subset. |
| MsgMessageType | A code identifying the message's type. |
| MsgMessageTypeSubFunctionIdentification | A code identifying the sub-function of the message's type. |
| MsgMessageVersion | Identifies the version number for the message. |
| MsgReferenceNumber | A unique reference number for the message. |
| MsgScenarioControllingAgency | Identifies the controlling agency for the message scenario. |
| MsgScenarioIdentification | The identifier for the message scenario. |
| MsgScenarioRelease | The message scenario's release number. |
| MsgScenarioVersion | The message scenario's version number. |
| MsgSequenceOfTransfers | Specifies the message's position in a sequence. |
| OutputData | The output data that has been written so far. |
| OutputFile | The name of the output file to which the EDI data will be written. |
| SegmentSuffix | The suffix that is appended to the end of a segment. |
Method List
The following is the full list of the methods of the component with short descriptions. Click on the links for further details.
| Close | Closes the writer. |
| Config | Sets or retrieves a configuration setting. |
| EndCompositeElement | Finish writing the composite element. |
| EndFunctionalGroup | Write the UNE(FunctionalGroup) segment to the output file/data/stream. |
| EndInterchange | Write the UNZ(Interchange) segment to the output file/data/stream. |
| EndMessage | Closes the current message. |
| EndSegment | Finish writing the segment, add SegmentSuffix at the end of the segment. |
| Reset | Resets all properties to their default values. |
| StartCompositeElement | Starts a composite element within the current segment. |
| StartFunctionalGroup | Starts a new functional group in the EDI document. |
| StartInterchange | Starts a new interchange in the EDI document. |
| StartMessage | Starts a new message in the EDI document. |
| StartSegment | Starts a new segment with the specified tag. |
| WriteComponent | Writes a component element value to the current composite element. |
| WriteElement | Writes an element value to the current segment. |
Event List
The following is the full list of the events fired by the component with short descriptions. Click on the links for further details.
| Error | Fires when an error occurs during message processing. Normally, the component fails with an error. |
| Output | Fires when output data is written. |
Config Settings
The following is a list of config settings for the component with short descriptions. Click on the links for further details.
DelimiterComponent Property (EDIFACTWriter Component)
The character used to separate the components in a composite element.
Syntax
__property String DelimiterComponent = { read=FDelimiterComponent, write=FSetDelimiterComponent };
Default Value
":"
Remarks
The character used to separate the components in a composite element.
This property is not available at design time.
Data Type
String
DelimiterDecimal Property (EDIFACTWriter Component)
The character used to separate the integer portion of a numeric value from the fractional portion.
Syntax
__property String DelimiterDecimal = { read=FDelimiterDecimal, write=FSetDelimiterDecimal };
Default Value
"."
Remarks
The character used to separate the integer portion of a numeric value from the fractional portion.
This property is not available at design time.
Data Type
String
DelimiterElement Property (EDIFACTWriter Component)
The delimiter used to separate elements within a segment.
Syntax
__property String DelimiterElement = { read=FDelimiterElement, write=FSetDelimiterElement };
Default Value
"+"
Remarks
The delimiter used to separate elements within a segment.
This property is not available at design time.
Data Type
String
DelimiterRelease Property (EDIFACTWriter Component)
The character used to escape other characters within a property.
Syntax
__property String DelimiterRelease = { read=FDelimiterRelease, write=FSetDelimiterRelease };
Default Value
"?"
Remarks
The character used to escape other characters within a field. For example, with the default EDIFACT delimiters, "?+" should be considered "+" character that appears within a field, not an element separator.
This property is not available at design time.
Data Type
String
DelimiterRepetition Property (EDIFACTWriter Component)
The character used to indicate a repeating element or component.
Syntax
__property String DelimiterRepetition = { read=FDelimiterRepetition, write=FSetDelimiterRepetition };
Default Value
"*(syntax 4) or empty(syntax 3)"
Remarks
The character used to indicate a repeating element or component.
This property is not available at design time.
Data Type
String
DelimiterSegment Property (EDIFACTWriter Component)
The character used to terminate a segment.
Syntax
__property String DelimiterSegment = { read=FDelimiterSegment, write=FSetDelimiterSegment };
Default Value
"'"
Remarks
The character used to terminate a segment.
This property is not available at design time.
Data Type
String
FileWriteMode Property (EDIFACTWriter Component)
Determines how the output file is opened for writing.
Syntax
__property TedEDIFACTWriterFileWriteModes FileWriteMode = { read=FFileWriteMode, write=FSetFileWriteMode };
enum TedEDIFACTWriterFileWriteModes {
fwmCreate=0,
fwmOverwrite=1,
fwmAppend=2
};
Default Value
fwmCreate
Remarks
When OutputFile is set, this property determines how the file will be opened.
| fwmCreate (Default) | Creates a new file. If the file already exists, the translation will fail. |
| fwmOverwrite | Opens an existing file and overwrites its contents. If the file does not exist, a new file will be created. |
| fwmAppend | Opens an existing file and appends data to the end of the file. If the file does not exist, a new file will be created. |
This property is not available at design time.
Data Type
Integer
FGroupAppPassword Property (EDIFACTWriter Component)
The application password as specified in the functional group header.
Syntax
__property String FGroupAppPassword = { read=FFGroupAppPassword, write=FSetFGroupAppPassword };
Default Value
""
Remarks
The application password as specified in the functional group header.
This is an alphanumeric field with a value up to 14 characters long.
This property is not available at design time.
Data Type
String
FGroupAppRecipientIdentification Property (EDIFACTWriter Component)
The name or code of the intended recipient of the message group.
Syntax
__property String FGroupAppRecipientIdentification = { read=FFGroupAppRecipientIdentification, write=FSetFGroupAppRecipientIdentification };
Default Value
""
Remarks
The name or code of the intended recipient of the message group.
This is an alphanumeric field with a value up to 35 characters long.
This property is not available at design time.
Data Type
String
FGroupAppRecipientIDQualifier Property (EDIFACTWriter Component)
The qualifier for the recipient's identification (if it contains a code value).
Syntax
__property String FGroupAppRecipientIDQualifier = { read=FFGroupAppRecipientIDQualifier, write=FSetFGroupAppRecipientIDQualifier };
Default Value
""
Remarks
The qualifier for the recipient's identification (if it contains a code value).
This is an alphanumeric field with a value up to 4 characters long.
This property is not available at design time.
Data Type
String
FGroupAppSenderIdentification Property (EDIFACTWriter Component)
The name or code of the message group's sender.
Syntax
__property String FGroupAppSenderIdentification = { read=FFGroupAppSenderIdentification, write=FSetFGroupAppSenderIdentification };
Default Value
""
Remarks
The name or code of the message group's sender.
This is an alphanumeric field with a value up to 35 characters long.
This property is not available at design time.
Data Type
String
FGroupAppSenderIDQualifier Property (EDIFACTWriter Component)
The qualifier for the sender's identification (if it contains a code value).
Syntax
__property String FGroupAppSenderIDQualifier = { read=FFGroupAppSenderIDQualifier, write=FSetFGroupAppSenderIDQualifier };
Default Value
""
Remarks
The qualifier for the sender's identification (if it contains a code value).
This is an alphanumeric field with a value up to 4 characters long.
This property is not available at design time.
Data Type
String
FGroupAssociationAssignedCode Property (EDIFACTWriter Component)
The assigned code for the message type.
Syntax
__property String FGroupAssociationAssignedCode = { read=FFGroupAssociationAssignedCode, write=FSetFGroupAssociationAssignedCode };
Default Value
""
Remarks
The assigned code for the message type.
This is an alphanumeric field with a value up to 6 characters long.
This property is not available at design time.
Data Type
String
FGroupControllingAgency Property (EDIFACTWriter Component)
A code value that indicates the agency responsible for maintaining the message specifications.
Syntax
__property String FGroupControllingAgency = { read=FFGroupControllingAgency, write=FSetFGroupControllingAgency };
Default Value
""
Remarks
A code value that indicates the agency responsible for maintaining the message specifications.
This is an alphanumeric field with a value up to 3 characters long.
This property is not available at design time.
Data Type
String
FGroupDate Property (EDIFACTWriter Component)
The date that the group of messages was prepared.
Syntax
__property String FGroupDate = { read=FFGroupDate, write=FSetFGroupDate };
Default Value
""
Remarks
The date that the group of messages was prepared.
This property is not available at design time.
Data Type
String
FGroupGroupIdentification Property (EDIFACTWriter Component)
The identification value for the functional group.
Syntax
__property String FGroupGroupIdentification = { read=FFGroupGroupIdentification, write=FSetFGroupGroupIdentification };
Default Value
""
Remarks
The identification value for the functional group.
This is an alphanumeric field with a value up to 6 characters long.
This property is not available at design time.
Data Type
String
FGroupMessageRelease Property (EDIFACTWriter Component)
The message release number for the message type appearing in the message group.
Syntax
__property String FGroupMessageRelease = { read=FFGroupMessageRelease, write=FSetFGroupMessageRelease };
Default Value
""
Remarks
The message release number for the message type appearing in the message group.
This is an alphanumeric field with a value up to 3 characters long.
This property is not available at design time.
Data Type
String
FGroupMessageVersion Property (EDIFACTWriter Component)
The message version number for message type appearing in the functional group.
Syntax
__property String FGroupMessageVersion = { read=FFGroupMessageVersion, write=FSetFGroupMessageVersion };
Default Value
""
Remarks
The message version number for message type appearing in the functional group.
This is an alphanumeric field with a value up to 3 characters long.
This property is not available at design time.
Data Type
String
FGroupReferenceNumber Property (EDIFACTWriter Component)
The reference number for the functional group.
Syntax
__property String FGroupReferenceNumber = { read=FFGroupReferenceNumber, write=FSetFGroupReferenceNumber };
Default Value
""
Remarks
The reference number for the functional group.
This is an alphanumeric field with a value up to 14 characters long.
This property is not available at design time.
Data Type
String
FGroupTime Property (EDIFACTWriter Component)
The time that the group of messages was prepared.
Syntax
__property String FGroupTime = { read=FFGroupTime, write=FSetFGroupTime };
Default Value
""
Remarks
The time that the group of messages was prepared.
This property is not available at design time.
Data Type
String
InterchangeAckRequest Property (EDIFACTWriter Component)
If this property is '1', an ACK was requested in response to this interchange.
Syntax
__property String InterchangeAckRequest = { read=FInterchangeAckRequest, write=FSetInterchangeAckRequest };
Default Value
""
Remarks
If this field is '1', an ACK was requested in response to this interchange.
This property is not available at design time.
Data Type
String
InterchangeAgreementIdentifier Property (EDIFACTWriter Component)
The identifier for the communication agreement used by the interchange.
Syntax
__property String InterchangeAgreementIdentifier = { read=FInterchangeAgreementIdentifier, write=FSetInterchangeAgreementIdentifier };
Default Value
""
Remarks
The identifier for the communication agreement used by the interchange.
This is an alphanumeric field with a value up to 35 characters long.
This property is not available at design time.
Data Type
String
InterchangeApplicationReference Property (EDIFACTWriter Component)
If the interchange contains only one type of message, this can contain the identifier for the type of message.
Syntax
__property String InterchangeApplicationReference = { read=FInterchangeApplicationReference, write=FSetInterchangeApplicationReference };
Default Value
""
Remarks
If the interchange contains only one type of message, this can contain the identifier for the type of message.
This is an alphanumeric field with a value up to 14 characters long.
This property is not available at design time.
Data Type
String
InterchangeCharacterEncoding Property (EDIFACTWriter Component)
The character encoding used by the interchange.
Syntax
__property String InterchangeCharacterEncoding = { read=FInterchangeCharacterEncoding, write=FSetInterchangeCharacterEncoding };
Default Value
""
Remarks
The character encoding used by the interchange.
This is an alphanumeric field with a value up to 3 characters long, and is only present for EDIFACT syntax 4.
This property is not available at design time.
Data Type
String
InterchangeCodeListVersionNumber Property (EDIFACTWriter Component)
The identifier for the communication agreement used by the interchange.
Syntax
__property String InterchangeCodeListVersionNumber = { read=FInterchangeCodeListVersionNumber, write=FSetInterchangeCodeListVersionNumber };
Default Value
""
Remarks
The identifier for the communication agreement used by the interchange.
This is an alphanumeric field with a value up to 6 characters long.
This property is not available at design time.
Data Type
String
InterchangeDate Property (EDIFACTWriter Component)
The date that the interchange was prepared.
Syntax
__property String InterchangeDate = { read=FInterchangeDate, write=FSetInterchangeDate };
Default Value
""
Remarks
The date that the interchange was prepared.
This property is not available at design time.
Data Type
String
InterchangeProcessingPriorityCode Property (EDIFACTWriter Component)
A 1-character code that requests a specific processing priority for the interchange.
Syntax
__property String InterchangeProcessingPriorityCode = { read=FInterchangeProcessingPriorityCode, write=FSetInterchangeProcessingPriorityCode };
Default Value
""
Remarks
A 1-character code that requests a specific processing priority for the interchange.
This property is not available at design time.
Data Type
String
InterchangeRecipientIdentification Property (EDIFACTWriter Component)
The identification for the interchange's recipient.
Syntax
__property String InterchangeRecipientIdentification = { read=FInterchangeRecipientIdentification, write=FSetInterchangeRecipientIdentification };
Default Value
""
Remarks
The identification for the interchange's recipient.
This is an alphanumeric field with a value up to 35 characters long.
This property is not available at design time.
Data Type
String
InterchangeRecipientIDQualifier Property (EDIFACTWriter Component)
The qualifier for the recipient identification code.
Syntax
__property String InterchangeRecipientIDQualifier = { read=FInterchangeRecipientIDQualifier, write=FSetInterchangeRecipientIDQualifier };
Default Value
""
Remarks
The qualifier for the recipient identification code.
This is an alphanumeric field with a value up to 4 characters long.
This property is not available at design time.
Data Type
String
InterchangeRecipientInternalIdentification Property (EDIFACTWriter Component)
More specific recipient identification for internal use.
Syntax
__property String InterchangeRecipientInternalIdentification = { read=FInterchangeRecipientInternalIdentification, write=FSetInterchangeRecipientInternalIdentification };
Default Value
""
Remarks
More specific recipient identification for internal use.
This is an alphanumeric field with a value up to 35 characters long.
This property is not available at design time.
Data Type
String
InterchangeRecipientInternalSubIdentification Property (EDIFACTWriter Component)
A sub-identification string for the receiver for internal use.
Syntax
__property String InterchangeRecipientInternalSubIdentification = { read=FInterchangeRecipientInternalSubIdentification, write=FSetInterchangeRecipientInternalSubIdentification };
Default Value
""
Remarks
A sub-identification string for the receiver for internal use.
This is an alphanumeric field with a value up to 35 characters long.
This property is not available at design time.
Data Type
String
InterchangeRecipientPassword Property (EDIFACTWriter Component)
A password to be verified by the recipient, such as a system or network password.
Syntax
__property String InterchangeRecipientPassword = { read=FInterchangeRecipientPassword, write=FSetInterchangeRecipientPassword };
Default Value
""
Remarks
A password to be verified by the recipient, such as a system or network password.
This is an alphanumeric field with a value up to 14 characters long.
This property is not available at design time.
Data Type
String
InterchangeRecipientPasswordQualifier Property (EDIFACTWriter Component)
A qualifier for the recipient password.
Syntax
__property String InterchangeRecipientPasswordQualifier = { read=FInterchangeRecipientPasswordQualifier, write=FSetInterchangeRecipientPasswordQualifier };
Default Value
""
Remarks
A qualifier for the recipient password.
This is an alphanumeric field with a value up to 2 characters long.
This property is not available at design time.
Data Type
String
InterchangeReferenceNumber Property (EDIFACTWriter Component)
A reference number for the interchange.
Syntax
__property String InterchangeReferenceNumber = { read=FInterchangeReferenceNumber, write=FSetInterchangeReferenceNumber };
Default Value
""
Remarks
A reference number for the interchange.
This is an alphanumeric field with a value up to 14 characters long.
This property is not available at design time.
Data Type
String
InterchangeSenderIdentification Property (EDIFACTWriter Component)
The identification for the interchange's sender.
Syntax
__property String InterchangeSenderIdentification = { read=FInterchangeSenderIdentification, write=FSetInterchangeSenderIdentification };
Default Value
""
Remarks
The identification for the interchange's sender.
This is an alphanumeric field with a value up to 35 characters long.
This property is not available at design time.
Data Type
String
InterchangeSenderIDQualifier Property (EDIFACTWriter Component)
The qualifier for the sender identification code.
Syntax
__property String InterchangeSenderIDQualifier = { read=FInterchangeSenderIDQualifier, write=FSetInterchangeSenderIDQualifier };
Default Value
""
Remarks
The qualifier for the sender identification code.
This is an alphanumeric field with a value up to 4 characters long.
This property is not available at design time.
Data Type
String
InterchangeSenderInternalIdentification Property (EDIFACTWriter Component)
More specific sender identification for internal use.
Syntax
__property String InterchangeSenderInternalIdentification = { read=FInterchangeSenderInternalIdentification, write=FSetInterchangeSenderInternalIdentification };
Default Value
""
Remarks
More specific sender identification for internal use.
This is an alphanumeric field with a value up to 35 characters long.
This property is not available at design time.
Data Type
String
InterchangeSenderInternalSubIdentification Property (EDIFACTWriter Component)
A sub-identification string for the sender for internal use.
Syntax
__property String InterchangeSenderInternalSubIdentification = { read=FInterchangeSenderInternalSubIdentification, write=FSetInterchangeSenderInternalSubIdentification };
Default Value
""
Remarks
A sub-identification string for the sender for internal use.
This is an alphanumeric field with a value up to 35 characters long.
This property is not available at design time.
Data Type
String
InterchangeSyntaxIdentifier Property (EDIFACTWriter Component)
A identifier specifying the controlling agency and valid character set.
Syntax
__property String InterchangeSyntaxIdentifier = { read=FInterchangeSyntaxIdentifier, write=FSetInterchangeSyntaxIdentifier };
Default Value
""
Remarks
A identifier specifying the controlling agency and valid character set.
This is an alphanumeric field with a value up to 4 characters long.
This property is not available at design time.
Data Type
String
InterchangeSyntaxVersionNumber Property (EDIFACTWriter Component)
A 1-character numeric value indicating the syntax version.
Syntax
__property String InterchangeSyntaxVersionNumber = { read=FInterchangeSyntaxVersionNumber, write=FSetInterchangeSyntaxVersionNumber };
Default Value
""
Remarks
A 1-character numeric value indicating the syntax version.
This property is not available at design time.
Data Type
String
InterchangeTestIndicator Property (EDIFACTWriter Component)
If this property is '1', the interchange is a test interchange.
Syntax
__property String InterchangeTestIndicator = { read=FInterchangeTestIndicator, write=FSetInterchangeTestIndicator };
Default Value
""
Remarks
If this field is '1', the interchange is a test interchange.
This property is not available at design time.
Data Type
String
InterchangeTime Property (EDIFACTWriter Component)
The time that the interchange was prepared.
Syntax
__property String InterchangeTime = { read=FInterchangeTime, write=FSetInterchangeTime };
Default Value
""
Remarks
The time that the interchange was prepared.
This property is not available at design time.
Data Type
String
MsgAssociationAssignedCode Property (EDIFACTWriter Component)
A code assigned to the message by the controlling organization.
Syntax
__property String MsgAssociationAssignedCode = { read=FMsgAssociationAssignedCode, write=FSetMsgAssociationAssignedCode };
Default Value
""
Remarks
A code assigned to the message by the controlling organization.
This is an alphanumeric field with a value up to 6 characters long.
This property is not available at design time.
Data Type
String
MsgCodeListVersionNumber Property (EDIFACTWriter Component)
The version number of the code list that should be used.
Syntax
__property String MsgCodeListVersionNumber = { read=FMsgCodeListVersionNumber, write=FSetMsgCodeListVersionNumber };
Default Value
""
Remarks
The version number of the code list that should be used.
This is an alphanumeric field with a value up to 6 characters long. This field only appears in EDIFACT syntax version 4.
This property is not available at design time.
Data Type
String
MsgCommonAccessReference Property (EDIFACTWriter Component)
A reference value to associate this message with related messages.
Syntax
__property String MsgCommonAccessReference = { read=FMsgCommonAccessReference, write=FSetMsgCommonAccessReference };
Default Value
""
Remarks
A reference value to associate this message with related messages.
This is an alphanumeric field with a value up to 35 characters long.
This property is not available at design time.
Data Type
String
MsgControllingAgency Property (EDIFACTWriter Component)
A code that identifies the controlling agency for this message type.
Syntax
__property String MsgControllingAgency = { read=FMsgControllingAgency, write=FSetMsgControllingAgency };
Default Value
""
Remarks
A code that identifies the controlling agency for this message type.
This is an alphanumeric field with a value up to 3 characters long.
This property is not available at design time.
Data Type
String
MsgFirstAndLastTransfer Property (EDIFACTWriter Component)
A single-character property that indicates the first and last messages in a related set.
Syntax
__property String MsgFirstAndLastTransfer = { read=FMsgFirstAndLastTransfer, write=FSetMsgFirstAndLastTransfer };
Default Value
""
Remarks
A single-character field that indicates the first and last messages in a related set.
This property is not available at design time.
Data Type
String
MsgMessageImplControllingAgency Property (EDIFACTWriter Component)
A code value that identifies the controlling agency for the message implementation.
Syntax
__property String MsgMessageImplControllingAgency = { read=FMsgMessageImplControllingAgency, write=FSetMsgMessageImplControllingAgency };
Default Value
""
Remarks
A code value that identifies the controlling agency for the message implementation.
This is an alphanumeric field with a value up to 3 characters long. This field only appears in EDIFACT syntax version 4.
This property is not available at design time.
Data Type
String
MsgMessageImplIdentification Property (EDIFACTWriter Component)
Identifies the message implementation.
Syntax
__property String MsgMessageImplIdentification = { read=FMsgMessageImplIdentification, write=FSetMsgMessageImplIdentification };
Default Value
""
Remarks
Identifies the message implementation.
This is an alphanumeric field with a value up to 14 characters long. This field only appears in EDIFACT syntax version 4.
This property is not available at design time.
Data Type
String
MsgMessageImplRelease Property (EDIFACTWriter Component)
Identifies the release number for the message implementation.
Syntax
__property String MsgMessageImplRelease = { read=FMsgMessageImplRelease, write=FSetMsgMessageImplRelease };
Default Value
""
Remarks
Identifies the release number for the message implementation.
This is an alphanumeric field with a value up to 3 characters long. This field only appears in EDIFACT syntax version 4.
This property is not available at design time.
Data Type
String
MsgMessageImplVersion Property (EDIFACTWriter Component)
Identifies the version number for the message implementation.
Syntax
__property String MsgMessageImplVersion = { read=FMsgMessageImplVersion, write=FSetMsgMessageImplVersion };
Default Value
""
Remarks
Identifies the version number for the message implementation.
This is an alphanumeric field with a value up to 3 characters long. This field only appears in EDIFACT syntax version 4.
This property is not available at design time.
Data Type
String
MsgMessageRelease Property (EDIFACTWriter Component)
Identifies the release number for the message.
Syntax
__property String MsgMessageRelease = { read=FMsgMessageRelease, write=FSetMsgMessageRelease };
Default Value
""
Remarks
Identifies the release number for the message.
This is an alphanumeric field with a value up to 3 characters long.
This property is not available at design time.
Data Type
String
MsgMessageSubsetControllingAgency Property (EDIFACTWriter Component)
A code value that identifies the controlling agency for the message subset.
Syntax
__property String MsgMessageSubsetControllingAgency = { read=FMsgMessageSubsetControllingAgency, write=FSetMsgMessageSubsetControllingAgency };
Default Value
""
Remarks
A code value that identifies the controlling agency for the message subset.
This is an alphanumeric field with a value up to 3 characters long. This field only appears in EDIFACT syntax version 4.
This property is not available at design time.
Data Type
String
MsgMessageSubsetIdentification Property (EDIFACTWriter Component)
Identifies the message subset.
Syntax
__property String MsgMessageSubsetIdentification = { read=FMsgMessageSubsetIdentification, write=FSetMsgMessageSubsetIdentification };
Default Value
""
Remarks
Identifies the message subset.
This is an alphanumeric field with a value up to 14 characters long. This field only appears in EDIFACT syntax version 4.
This property is not available at design time.
Data Type
String
MsgMessageSubsetRelease Property (EDIFACTWriter Component)
Identifies the release number for the message subset.
Syntax
__property String MsgMessageSubsetRelease = { read=FMsgMessageSubsetRelease, write=FSetMsgMessageSubsetRelease };
Default Value
""
Remarks
Identifies the release number for the message subset.
This is an alphanumeric field with a value up to 3 characters long. This field only appears in EDIFACT syntax version 4.
This property is not available at design time.
Data Type
String
MsgMessageSubsetVersion Property (EDIFACTWriter Component)
Identifies the version number for the message subset.
Syntax
__property String MsgMessageSubsetVersion = { read=FMsgMessageSubsetVersion, write=FSetMsgMessageSubsetVersion };
Default Value
""
Remarks
Identifies the version number for the message subset.
This is an alphanumeric field with a value up to 3 characters long. This field only appears in EDIFACT syntax version 4.
This property is not available at design time.
Data Type
String
MsgMessageType Property (EDIFACTWriter Component)
A code identifying the message's type.
Syntax
__property String MsgMessageType = { read=FMsgMessageType, write=FSetMsgMessageType };
Default Value
""
Remarks
A code identifying the message's type.
This is an alphanumeric field with a value up to 6 characters long.
This property is not available at design time.
Data Type
String
MsgMessageTypeSubFunctionIdentification Property (EDIFACTWriter Component)
A code identifying the sub-function of the message's type.
Syntax
__property String MsgMessageTypeSubFunctionIdentification = { read=FMsgMessageTypeSubFunctionIdentification, write=FSetMsgMessageTypeSubFunctionIdentification };
Default Value
""
Remarks
A code identifying the sub-function of the message's type.
This is an alphanumeric field with a value up to 6 characters long. This field only appears in EDIFACT syntax version 4.
This property is not available at design time.
Data Type
String
MsgMessageVersion Property (EDIFACTWriter Component)
Identifies the version number for the message.
Syntax
__property String MsgMessageVersion = { read=FMsgMessageVersion, write=FSetMsgMessageVersion };
Default Value
""
Remarks
Identifies the version number for the message.
This is an alphanumeric field with a value up to 3 characters long.
This property is not available at design time.
Data Type
String
MsgReferenceNumber Property (EDIFACTWriter Component)
A unique reference number for the message.
Syntax
__property String MsgReferenceNumber = { read=FMsgReferenceNumber, write=FSetMsgReferenceNumber };
Default Value
""
Remarks
A unique reference number for the message.
This is an alphanumeric field with a value up to 14 characters long.
This property is not available at design time.
Data Type
String
MsgScenarioControllingAgency Property (EDIFACTWriter Component)
Identifies the controlling agency for the message scenario.
Syntax
__property String MsgScenarioControllingAgency = { read=FMsgScenarioControllingAgency, write=FSetMsgScenarioControllingAgency };
Default Value
""
Remarks
Identifies the controlling agency for the message scenario.
This is an alphanumeric field with a value up to 3 characters long. This field only appears in EDIFACT syntax version 4.
This property is not available at design time.
Data Type
String
MsgScenarioIdentification Property (EDIFACTWriter Component)
The identifier for the message scenario.
Syntax
__property String MsgScenarioIdentification = { read=FMsgScenarioIdentification, write=FSetMsgScenarioIdentification };
Default Value
""
Remarks
The identifier for the message scenario.
This is an alphanumeric field with a value up to 14 characters long. This field only appears in EDIFACT syntax version 4.
This property is not available at design time.
Data Type
String
MsgScenarioRelease Property (EDIFACTWriter Component)
The message scenario's release number.
Syntax
__property String MsgScenarioRelease = { read=FMsgScenarioRelease, write=FSetMsgScenarioRelease };
Default Value
""
Remarks
The message scenario's release number.
This is an alphanumeric field with a value up to 3 characters long. This field only appears in EDIFACT syntax version 4.
This property is not available at design time.
Data Type
String
MsgScenarioVersion Property (EDIFACTWriter Component)
The message scenario's version number.
Syntax
__property String MsgScenarioVersion = { read=FMsgScenarioVersion, write=FSetMsgScenarioVersion };
Default Value
""
Remarks
The message scenario's version number.
This is an alphanumeric field with a value up to 3 characters long. This field only appears in EDIFACT syntax version 4.
This property is not available at design time.
Data Type
String
MsgSequenceOfTransfers Property (EDIFACTWriter Component)
Specifies the message's position in a sequence.
Syntax
__property String MsgSequenceOfTransfers = { read=FMsgSequenceOfTransfers, write=FSetMsgSequenceOfTransfers };
Default Value
""
Remarks
Specifies the message's position in a sequence.
This is an alphanumeric field with a value up to 2 characters long.
This property is not available at design time.
Data Type
String
OutputData Property (EDIFACTWriter Component)
The output data that has been written so far.
Syntax
__property String OutputData = { read=FOutputData, write=FSetOutputData };
Default Value
""
Remarks
OutputData contains the entire EDI document that has been written so far. If writing to a file or stream, this property will be empty.
This property is not available at design time.
Data Type
String
OutputFile Property (EDIFACTWriter Component)
The name of the output file to which the EDI data will be written.
Syntax
__property String OutputFile = { read=FOutputFile, write=FSetOutputFile };
Default Value
""
Remarks
FileWriteMode property determines how the file is opened for writing. If OutputFile is empty, no file will be written and the OutputData property will contain the EDI data instead.
This property is not available at design time.
Data Type
String
SegmentSuffix Property (EDIFACTWriter Component)
The suffix that is appended to the end of a segment.
Syntax
__property TedEDIFACTWriterSegmentSuffixes SegmentSuffix = { read=FSegmentSuffix, write=FSetSegmentSuffix };
enum TedEDIFACTWriterSegmentSuffixes {
ssNone=0,
ssCR=1,
ssLF=2,
ssCRLF=3
};
Default Value
ssCRLF
Remarks
Possible values are:
| ssNone (0) | No suffix is appended to the segment. |
| ssCR (1) | A carriage return (ASCII 13) is appended to the segment. |
| ssLF (2) | A line feed (ASCII 10) is appended to the segment. |
| ssCRLF (3) | A carriage return followed by a line feed (ASCII 13 and 10) is appended to the segment. This is the default value. |
This property is not available at design time.
Data Type
Integer
Close Method (EDIFACTWriter Component)
Closes the writer.
Syntax
void __fastcall Close();
Remarks
Calling Close will close the writer and release any resources associated with it. After calling Close, the writer cannot be used unless it is re-initialized.
Config Method (EDIFACTWriter Component)
Sets or retrieves a configuration setting.
Syntax
String __fastcall Config(String ConfigurationString);
Remarks
Config is a generic method available in every component. It is used to set and retrieve configuration settings for the component.
These settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the component, access to these internal properties is provided through the Config method.
To set a configuration setting named PROPERTY, you must call Config("PROPERTY=VALUE"), where VALUE is the value of the setting expressed as a string. For boolean values, use the strings "True", "False", "0", "1", "Yes", or "No" (case does not matter).
To read (query) the value of a configuration setting, you must call Config("PROPERTY"). The value will be returned as a string.
EndCompositeElement Method (EDIFACTWriter Component)
Finish writing the composite element.
Syntax
void __fastcall EndCompositeElement();
Remarks
This method is used to close a CompositeElement. This method may only be called after a successful call to StartCompositeElement
EndFunctionalGroup Method (EDIFACTWriter Component)
Write the UNE(FunctionalGroup) segment to the output file/data/stream.
Syntax
void __fastcall EndFunctionalGroup();
Remarks
This method is used to close a FunctionalGroup. This method may only be called after a successful call to StartFunctionalGroup
EndInterchange Method (EDIFACTWriter Component)
Write the UNZ(Interchange) segment to the output file/data/stream.
Syntax
void __fastcall EndInterchange();
Remarks
This method is used to close an Interchange. This method may only be called after a successful call to StartInterchange
EndMessage Method (EDIFACTWriter Component)
Closes the current message.
Syntax
void __fastcall EndMessage();
Remarks
Calling this method will close the current message. If no message is open, an error will be raised. This method will also write the required Message Trailer (UNT) segment to the output.
EndSegment Method (EDIFACTWriter Component)
Finish writing the segment, add SegmentSuffix at the end of the segment.
Syntax
void __fastcall EndSegment();
Remarks
This method is used to close a Segment. This method may only be called after a successful call to StartSegment
Reset Method (EDIFACTWriter Component)
Resets all properties to their default values.
Syntax
void __fastcall Reset();
Remarks
This method resets all properties of the component to their default values as specified in the property definitions.
StartCompositeElement Method (EDIFACTWriter Component)
Starts a composite element within the current segment.
Syntax
void __fastcall StartCompositeElement();
Remarks
This method starts a composite element within the current segment. The composite element can contain multiple component elements. The composite element is ended by calling the EndCompositeElement method. Component elements within the composite are added by calling the WriteComponent method.
StartFunctionalGroup Method (EDIFACTWriter Component)
Starts a new functional group in the EDI document.
Syntax
void __fastcall StartFunctionalGroup();
Remarks
This method starts a new functional group in the EDI document. The functional group fields must be set using the appropriate properties before calling this method. The functional group is ended by calling the EndFunctionalGroup method. The functional group header segment (UNG) is written to the output when this method is called.
StartInterchange Method (EDIFACTWriter Component)
Starts a new interchange in the EDI document.
Syntax
void __fastcall StartInterchange();
Remarks
This method starts a new interchange in the EDI document. The interchange fields must be set using the appropriate properties before calling this method. The interchange is ended by calling the EndInterchange method. The interchange header segment (UNB) is written to the output when this method is called. If opening a new interchange would result in an invalid structure (for example, starting a new interchange before ending the previous one), an error will be raised.
StartMessage Method (EDIFACTWriter Component)
Starts a new message in the EDI document.
Syntax
void __fastcall StartMessage();
Remarks
This method starts a new message in the EDI document. The message fields must be set using the appropriate properties before calling this method. The message is ended by calling the EndMessage method. The message header segment (UNH) is written to the output when this method is called. If opening a new message would result in an invalid structure (for example, starting a new message before ending the previous one), an error will be raised.
StartSegment Method (EDIFACTWriter Component)
Starts a new segment with the specified tag.
Syntax
void __fastcall StartSegment(String tag);
Remarks
This method starts a new segment with the specified tag. The segment is ended by calling the EndSegment method. Element values within the segment are added by calling the WriteElement method. Composite elements can be added to the segment by calling the StartCompositeElement method. If starting a new segment would result in an invalid structure (for example, starting a new segment before ending the previous one), an error will be raised.
WriteComponent Method (EDIFACTWriter Component)
Writes a component element value to the current composite element.
Syntax
void __fastcall WriteComponent(String val);
Remarks
This method writes a component element value to the current composite element. The composite element must be started by calling the StartCompositeElement method before calling this method. The composite element is ended by calling the EndCompositeElement method. If this method is called when not within a composite element, an error will be raised.
WriteElement Method (EDIFACTWriter Component)
Writes an element value to the current segment.
Syntax
void __fastcall WriteElement(String val);
Remarks
This method writes an element value to the current segment. The segment must be started by calling the StartSegment method before calling this method. The segment is ended by calling the EndSegment method. If this method is called when not within a segment, an error will be raised.
Error Event (EDIFACTWriter Component)
Fires when an error occurs during message processing. Normally, the component fails with an error.
Syntax
typedef struct {
int ErrorCode;
String Description;
} TedEDIFACTWriterErrorEventParams;
typedef void __fastcall (__closure *TedEDIFACTWriterErrorEvent)(System::TObject* Sender, TedEDIFACTWriterErrorEventParams *e);
__property TedEDIFACTWriterErrorEvent OnError = { read=FOnError, write=FOnError };
Remarks
The Error event is fired in case of exceptional conditions during message processing. Normally, the component raises an exception.
ConnectionId is the associated client Id, ErrorCode contains an error code, and Description contains a textual description of the error. For a list of valid error codes and their descriptions, please refer to the Error Codes section.
Output Event (EDIFACTWriter Component)
Fires when output data is written.
Syntax
typedef struct {
String Data;
DynamicArray<Byte> DataB;
} TedEDIFACTWriterOutputEventParams;
typedef void __fastcall (__closure *TedEDIFACTWriterOutputEvent)(System::TObject* Sender, TedEDIFACTWriterOutputEventParams *e);
__property TedEDIFACTWriterOutputEvent OnOutput = { read=FOnOutput, write=FOnOutput };
Remarks
This event is fired when output data is written. The Data parameter contains the segment that was written.
Config Settings (EDIFACTWriter Component)
The component accepts one or more of the following configuration settings. Configuration settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the component, access to these internal properties is provided through the Config method.Trappable Errors (EDIFACTWriter Component)
EDIFACTWriter Errors
| 202 | Invalid argument. |
| 304 | Cannot write to file. |
| 1099 | Encountered an unexpected segment tag. |
| 1100 | Attempted to perform an action while the component was busy, or close an incomplete interchange. |
| 1205 | Tried to perform an operation in a bad state (such as ending an interchange before starting one). |
| 1206 | Tried to end an interchange with no contents. |