EDIFACTWriter Class
Properties Methods Events Config Settings Errors
The EDIFACTWriter class generates EDIFACT documents with a clear, straightforward API.
Syntax
EDIFACTWriter
Remarks
The class 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 class with short descriptions. Click on the links for further details.
| Delimiters | Contains the delimiters for the EDI Document.. |
| FileWriteMode | Determines how the output file is opened for writing. |
| FunctionalGroup | Contains the current functional group information for the EDI Document. |
| Interchange | Contains the current interchange information for the EDI Document. |
| Message | Contains the current message information for the EDI Document. |
| 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 class 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 class 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 class with short descriptions. Click on the links for further details.
| Error | Fires when an error occurs during message processing. Normally, the class fails with an error. |
| Output | Fires when output data is written. |
Config Settings
The following is a list of config settings for the class with short descriptions. Click on the links for further details.
Delimiters Property (EDIFACTWriter Class)
Contains the delimiters for the EDI Document..
Syntax
EDISDKEDIFACTDelimiters* GetDelimiters();
char* edisdk_edifactwriter_getdelimitercomponent(void* lpObj);
int edisdk_edifactwriter_setdelimitercomponent(void* lpObj, const char* lpszDelimiterComponent);
char* edisdk_edifactwriter_getdelimiterdecimal(void* lpObj);
int edisdk_edifactwriter_setdelimiterdecimal(void* lpObj, const char* lpszDelimiterDecimal);
char* edisdk_edifactwriter_getdelimiterelement(void* lpObj);
int edisdk_edifactwriter_setdelimiterelement(void* lpObj, const char* lpszDelimiterElement);
char* edisdk_edifactwriter_getdelimiterrelease(void* lpObj);
int edisdk_edifactwriter_setdelimiterrelease(void* lpObj, const char* lpszDelimiterRelease);
char* edisdk_edifactwriter_getdelimiterrepetition(void* lpObj);
int edisdk_edifactwriter_setdelimiterrepetition(void* lpObj, const char* lpszDelimiterRepetition);
char* edisdk_edifactwriter_getdelimitersegment(void* lpObj);
int edisdk_edifactwriter_setdelimitersegment(void* lpObj, const char* lpszDelimiterSegment);
QString getDelimiterComponent();
int setDelimiterComponent(QString qsDelimiterComponent); QString getDelimiterDecimal();
int setDelimiterDecimal(QString qsDelimiterDecimal); QString getDelimiterElement();
int setDelimiterElement(QString qsDelimiterElement); QString getDelimiterRelease();
int setDelimiterRelease(QString qsDelimiterRelease); QString getDelimiterRepetition();
int setDelimiterRepetition(QString qsDelimiterRepetition); QString getDelimiterSegment();
int setDelimiterSegment(QString qsDelimiterSegment);
Remarks
This property contains the delimiters that will be used when writing the EDIFACT document. If the document uses delimiters other than the default, change the properties of this object to write the document correctly.
This property is read-only and not available at design time.
Data Type
FileWriteMode Property (EDIFACTWriter Class)
Determines how the output file is opened for writing.
Syntax
ANSI (Cross Platform) int GetFileWriteMode();
int SetFileWriteMode(int iFileWriteMode); Unicode (Windows) INT GetFileWriteMode();
INT SetFileWriteMode(INT iFileWriteMode);
Possible Values
FWM_CREATE(0),
FWM_OVERWRITE(1),
FWM_APPEND(2)
int edisdk_edifactwriter_getfilewritemode(void* lpObj);
int edisdk_edifactwriter_setfilewritemode(void* lpObj, int iFileWriteMode);
int getFileWriteMode();
int setFileWriteMode(int iFileWriteMode);
Default Value
0
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
FunctionalGroup Property (EDIFACTWriter Class)
Contains the current functional group information for the EDI Document.
Syntax
EDISDKEDIFACTFunctionalGroup* GetFunctionalGroup();
char* edisdk_edifactwriter_getfgroupapppassword(void* lpObj);
int edisdk_edifactwriter_setfgroupapppassword(void* lpObj, const char* lpszFGroupAppPassword);
char* edisdk_edifactwriter_getfgroupapprecipientidentification(void* lpObj);
int edisdk_edifactwriter_setfgroupapprecipientidentification(void* lpObj, const char* lpszFGroupAppRecipientIdentification);
char* edisdk_edifactwriter_getfgroupapprecipientidqualifier(void* lpObj);
int edisdk_edifactwriter_setfgroupapprecipientidqualifier(void* lpObj, const char* lpszFGroupAppRecipientIDQualifier);
char* edisdk_edifactwriter_getfgroupappsenderidentification(void* lpObj);
int edisdk_edifactwriter_setfgroupappsenderidentification(void* lpObj, const char* lpszFGroupAppSenderIdentification);
char* edisdk_edifactwriter_getfgroupappsenderidqualifier(void* lpObj);
int edisdk_edifactwriter_setfgroupappsenderidqualifier(void* lpObj, const char* lpszFGroupAppSenderIDQualifier);
char* edisdk_edifactwriter_getfgroupassociationassignedcode(void* lpObj);
int edisdk_edifactwriter_setfgroupassociationassignedcode(void* lpObj, const char* lpszFGroupAssociationAssignedCode);
char* edisdk_edifactwriter_getfgroupcontrollingagency(void* lpObj);
int edisdk_edifactwriter_setfgroupcontrollingagency(void* lpObj, const char* lpszFGroupControllingAgency);
char* edisdk_edifactwriter_getfgroupdate(void* lpObj);
int edisdk_edifactwriter_setfgroupdate(void* lpObj, const char* lpszFGroupDate);
char* edisdk_edifactwriter_getfgroupgroupidentification(void* lpObj);
int edisdk_edifactwriter_setfgroupgroupidentification(void* lpObj, const char* lpszFGroupGroupIdentification);
char* edisdk_edifactwriter_getfgroupmessagerelease(void* lpObj);
int edisdk_edifactwriter_setfgroupmessagerelease(void* lpObj, const char* lpszFGroupMessageRelease);
char* edisdk_edifactwriter_getfgroupmessageversion(void* lpObj);
int edisdk_edifactwriter_setfgroupmessageversion(void* lpObj, const char* lpszFGroupMessageVersion);
char* edisdk_edifactwriter_getfgroupreferencenumber(void* lpObj);
int edisdk_edifactwriter_setfgroupreferencenumber(void* lpObj, const char* lpszFGroupReferenceNumber);
char* edisdk_edifactwriter_getfgrouptime(void* lpObj);
int edisdk_edifactwriter_setfgrouptime(void* lpObj, const char* lpszFGroupTime);
QString getFGroupAppPassword();
int setFGroupAppPassword(QString qsFGroupAppPassword); QString getFGroupAppRecipientIdentification();
int setFGroupAppRecipientIdentification(QString qsFGroupAppRecipientIdentification); QString getFGroupAppRecipientIDQualifier();
int setFGroupAppRecipientIDQualifier(QString qsFGroupAppRecipientIDQualifier); QString getFGroupAppSenderIdentification();
int setFGroupAppSenderIdentification(QString qsFGroupAppSenderIdentification); QString getFGroupAppSenderIDQualifier();
int setFGroupAppSenderIDQualifier(QString qsFGroupAppSenderIDQualifier); QString getFGroupAssociationAssignedCode();
int setFGroupAssociationAssignedCode(QString qsFGroupAssociationAssignedCode); QString getFGroupControllingAgency();
int setFGroupControllingAgency(QString qsFGroupControllingAgency); QString getFGroupDate();
int setFGroupDate(QString qsFGroupDate); QString getFGroupGroupIdentification();
int setFGroupGroupIdentification(QString qsFGroupGroupIdentification); QString getFGroupMessageRelease();
int setFGroupMessageRelease(QString qsFGroupMessageRelease); QString getFGroupMessageVersion();
int setFGroupMessageVersion(QString qsFGroupMessageVersion); QString getFGroupReferenceNumber();
int setFGroupReferenceNumber(QString qsFGroupReferenceNumber); QString getFGroupTime();
int setFGroupTime(QString qsFGroupTime);
Remarks
The functional group information is used when writing the functional group header (GS) and trailer (GE) segments. The properties of this object must be changed before calling StartFunctionalGroup to write the functional group correctly. After calling StartFunctionalGroup changing the properties of this object will change the values for the next functional group only.
This property is read-only and not available at design time.
Data Type
Interchange Property (EDIFACTWriter Class)
Contains the current interchange information for the EDI Document.
Syntax
EDISDKEDIFACTInterchange* GetInterchange();
char* edisdk_edifactwriter_getinterchangeackrequest(void* lpObj);
int edisdk_edifactwriter_setinterchangeackrequest(void* lpObj, const char* lpszInterchangeAckRequest);
char* edisdk_edifactwriter_getinterchangeagreementidentifier(void* lpObj);
int edisdk_edifactwriter_setinterchangeagreementidentifier(void* lpObj, const char* lpszInterchangeAgreementIdentifier);
char* edisdk_edifactwriter_getinterchangeapplicationreference(void* lpObj);
int edisdk_edifactwriter_setinterchangeapplicationreference(void* lpObj, const char* lpszInterchangeApplicationReference);
char* edisdk_edifactwriter_getinterchangecharacterencoding(void* lpObj);
int edisdk_edifactwriter_setinterchangecharacterencoding(void* lpObj, const char* lpszInterchangeCharacterEncoding);
char* edisdk_edifactwriter_getinterchangecodelistversionnumber(void* lpObj);
int edisdk_edifactwriter_setinterchangecodelistversionnumber(void* lpObj, const char* lpszInterchangeCodeListVersionNumber);
char* edisdk_edifactwriter_getinterchangedate(void* lpObj);
int edisdk_edifactwriter_setinterchangedate(void* lpObj, const char* lpszInterchangeDate);
char* edisdk_edifactwriter_getinterchangeprocessingprioritycode(void* lpObj);
int edisdk_edifactwriter_setinterchangeprocessingprioritycode(void* lpObj, const char* lpszInterchangeProcessingPriorityCode);
char* edisdk_edifactwriter_getinterchangerecipientidentification(void* lpObj);
int edisdk_edifactwriter_setinterchangerecipientidentification(void* lpObj, const char* lpszInterchangeRecipientIdentification);
char* edisdk_edifactwriter_getinterchangerecipientidqualifier(void* lpObj);
int edisdk_edifactwriter_setinterchangerecipientidqualifier(void* lpObj, const char* lpszInterchangeRecipientIDQualifier);
char* edisdk_edifactwriter_getinterchangerecipientinternalidentification(void* lpObj);
int edisdk_edifactwriter_setinterchangerecipientinternalidentification(void* lpObj, const char* lpszInterchangeRecipientInternalIdentification);
char* edisdk_edifactwriter_getinterchangerecipientinternalsubidentification(void* lpObj);
int edisdk_edifactwriter_setinterchangerecipientinternalsubidentification(void* lpObj, const char* lpszInterchangeRecipientInternalSubIdentification);
char* edisdk_edifactwriter_getinterchangerecipientpassword(void* lpObj);
int edisdk_edifactwriter_setinterchangerecipientpassword(void* lpObj, const char* lpszInterchangeRecipientPassword);
char* edisdk_edifactwriter_getinterchangerecipientpasswordqualifier(void* lpObj);
int edisdk_edifactwriter_setinterchangerecipientpasswordqualifier(void* lpObj, const char* lpszInterchangeRecipientPasswordQualifier);
char* edisdk_edifactwriter_getinterchangereferencenumber(void* lpObj);
int edisdk_edifactwriter_setinterchangereferencenumber(void* lpObj, const char* lpszInterchangeReferenceNumber);
char* edisdk_edifactwriter_getinterchangesenderidentification(void* lpObj);
int edisdk_edifactwriter_setinterchangesenderidentification(void* lpObj, const char* lpszInterchangeSenderIdentification);
char* edisdk_edifactwriter_getinterchangesenderidqualifier(void* lpObj);
int edisdk_edifactwriter_setinterchangesenderidqualifier(void* lpObj, const char* lpszInterchangeSenderIDQualifier);
char* edisdk_edifactwriter_getinterchangesenderinternalidentification(void* lpObj);
int edisdk_edifactwriter_setinterchangesenderinternalidentification(void* lpObj, const char* lpszInterchangeSenderInternalIdentification);
char* edisdk_edifactwriter_getinterchangesenderinternalsubidentification(void* lpObj);
int edisdk_edifactwriter_setinterchangesenderinternalsubidentification(void* lpObj, const char* lpszInterchangeSenderInternalSubIdentification);
char* edisdk_edifactwriter_getinterchangesyntaxidentifier(void* lpObj);
int edisdk_edifactwriter_setinterchangesyntaxidentifier(void* lpObj, const char* lpszInterchangeSyntaxIdentifier);
char* edisdk_edifactwriter_getinterchangesyntaxversionnumber(void* lpObj);
int edisdk_edifactwriter_setinterchangesyntaxversionnumber(void* lpObj, const char* lpszInterchangeSyntaxVersionNumber);
char* edisdk_edifactwriter_getinterchangetestindicator(void* lpObj);
int edisdk_edifactwriter_setinterchangetestindicator(void* lpObj, const char* lpszInterchangeTestIndicator);
char* edisdk_edifactwriter_getinterchangetime(void* lpObj);
int edisdk_edifactwriter_setinterchangetime(void* lpObj, const char* lpszInterchangeTime);
QString getInterchangeAckRequest();
int setInterchangeAckRequest(QString qsInterchangeAckRequest); QString getInterchangeAgreementIdentifier();
int setInterchangeAgreementIdentifier(QString qsInterchangeAgreementIdentifier); QString getInterchangeApplicationReference();
int setInterchangeApplicationReference(QString qsInterchangeApplicationReference); QString getInterchangeCharacterEncoding();
int setInterchangeCharacterEncoding(QString qsInterchangeCharacterEncoding); QString getInterchangeCodeListVersionNumber();
int setInterchangeCodeListVersionNumber(QString qsInterchangeCodeListVersionNumber); QString getInterchangeDate();
int setInterchangeDate(QString qsInterchangeDate); QString getInterchangeProcessingPriorityCode();
int setInterchangeProcessingPriorityCode(QString qsInterchangeProcessingPriorityCode); QString getInterchangeRecipientIdentification();
int setInterchangeRecipientIdentification(QString qsInterchangeRecipientIdentification); QString getInterchangeRecipientIDQualifier();
int setInterchangeRecipientIDQualifier(QString qsInterchangeRecipientIDQualifier); QString getInterchangeRecipientInternalIdentification();
int setInterchangeRecipientInternalIdentification(QString qsInterchangeRecipientInternalIdentification); QString getInterchangeRecipientInternalSubIdentification();
int setInterchangeRecipientInternalSubIdentification(QString qsInterchangeRecipientInternalSubIdentification); QString getInterchangeRecipientPassword();
int setInterchangeRecipientPassword(QString qsInterchangeRecipientPassword); QString getInterchangeRecipientPasswordQualifier();
int setInterchangeRecipientPasswordQualifier(QString qsInterchangeRecipientPasswordQualifier); QString getInterchangeReferenceNumber();
int setInterchangeReferenceNumber(QString qsInterchangeReferenceNumber); QString getInterchangeSenderIdentification();
int setInterchangeSenderIdentification(QString qsInterchangeSenderIdentification); QString getInterchangeSenderIDQualifier();
int setInterchangeSenderIDQualifier(QString qsInterchangeSenderIDQualifier); QString getInterchangeSenderInternalIdentification();
int setInterchangeSenderInternalIdentification(QString qsInterchangeSenderInternalIdentification); QString getInterchangeSenderInternalSubIdentification();
int setInterchangeSenderInternalSubIdentification(QString qsInterchangeSenderInternalSubIdentification); QString getInterchangeSyntaxIdentifier();
int setInterchangeSyntaxIdentifier(QString qsInterchangeSyntaxIdentifier); QString getInterchangeSyntaxVersionNumber();
int setInterchangeSyntaxVersionNumber(QString qsInterchangeSyntaxVersionNumber); QString getInterchangeTestIndicator();
int setInterchangeTestIndicator(QString qsInterchangeTestIndicator); QString getInterchangeTime();
int setInterchangeTime(QString qsInterchangeTime);
Remarks
The interchange information is used when writing the interchange header (ISA) and trailer (IEA) segments. The properties of this object must be changed before calling StartInterchange to write the interchange correctly. After calling StartInterchange changing the properties of this object will change the values for the next interchange only.
This property is read-only and not available at design time.
Data Type
Message Property (EDIFACTWriter Class)
Contains the current message information for the EDI Document.
Syntax
EDISDKEDIFACTMessage* GetMessage();
char* edisdk_edifactwriter_getmsgassociationassignedcode(void* lpObj);
int edisdk_edifactwriter_setmsgassociationassignedcode(void* lpObj, const char* lpszMsgAssociationAssignedCode);
char* edisdk_edifactwriter_getmsgcodelistversionnumber(void* lpObj);
int edisdk_edifactwriter_setmsgcodelistversionnumber(void* lpObj, const char* lpszMsgCodeListVersionNumber);
char* edisdk_edifactwriter_getmsgcommonaccessreference(void* lpObj);
int edisdk_edifactwriter_setmsgcommonaccessreference(void* lpObj, const char* lpszMsgCommonAccessReference);
char* edisdk_edifactwriter_getmsgcontrollingagency(void* lpObj);
int edisdk_edifactwriter_setmsgcontrollingagency(void* lpObj, const char* lpszMsgControllingAgency);
char* edisdk_edifactwriter_getmsgfirstandlasttransfer(void* lpObj);
int edisdk_edifactwriter_setmsgfirstandlasttransfer(void* lpObj, const char* lpszMsgFirstAndLastTransfer);
char* edisdk_edifactwriter_getmsgmessageimplcontrollingagency(void* lpObj);
int edisdk_edifactwriter_setmsgmessageimplcontrollingagency(void* lpObj, const char* lpszMsgMessageImplControllingAgency);
char* edisdk_edifactwriter_getmsgmessageimplidentification(void* lpObj);
int edisdk_edifactwriter_setmsgmessageimplidentification(void* lpObj, const char* lpszMsgMessageImplIdentification);
char* edisdk_edifactwriter_getmsgmessageimplrelease(void* lpObj);
int edisdk_edifactwriter_setmsgmessageimplrelease(void* lpObj, const char* lpszMsgMessageImplRelease);
char* edisdk_edifactwriter_getmsgmessageimplversion(void* lpObj);
int edisdk_edifactwriter_setmsgmessageimplversion(void* lpObj, const char* lpszMsgMessageImplVersion);
char* edisdk_edifactwriter_getmsgmessagerelease(void* lpObj);
int edisdk_edifactwriter_setmsgmessagerelease(void* lpObj, const char* lpszMsgMessageRelease);
char* edisdk_edifactwriter_getmsgmessagesubsetcontrollingagency(void* lpObj);
int edisdk_edifactwriter_setmsgmessagesubsetcontrollingagency(void* lpObj, const char* lpszMsgMessageSubsetControllingAgency);
char* edisdk_edifactwriter_getmsgmessagesubsetidentification(void* lpObj);
int edisdk_edifactwriter_setmsgmessagesubsetidentification(void* lpObj, const char* lpszMsgMessageSubsetIdentification);
char* edisdk_edifactwriter_getmsgmessagesubsetrelease(void* lpObj);
int edisdk_edifactwriter_setmsgmessagesubsetrelease(void* lpObj, const char* lpszMsgMessageSubsetRelease);
char* edisdk_edifactwriter_getmsgmessagesubsetversion(void* lpObj);
int edisdk_edifactwriter_setmsgmessagesubsetversion(void* lpObj, const char* lpszMsgMessageSubsetVersion);
char* edisdk_edifactwriter_getmsgmessagetype(void* lpObj);
int edisdk_edifactwriter_setmsgmessagetype(void* lpObj, const char* lpszMsgMessageType);
char* edisdk_edifactwriter_getmsgmessagetypesubfunctionidentification(void* lpObj);
int edisdk_edifactwriter_setmsgmessagetypesubfunctionidentification(void* lpObj, const char* lpszMsgMessageTypeSubFunctionIdentification);
char* edisdk_edifactwriter_getmsgmessageversion(void* lpObj);
int edisdk_edifactwriter_setmsgmessageversion(void* lpObj, const char* lpszMsgMessageVersion);
char* edisdk_edifactwriter_getmsgreferencenumber(void* lpObj);
int edisdk_edifactwriter_setmsgreferencenumber(void* lpObj, const char* lpszMsgReferenceNumber);
char* edisdk_edifactwriter_getmsgscenariocontrollingagency(void* lpObj);
int edisdk_edifactwriter_setmsgscenariocontrollingagency(void* lpObj, const char* lpszMsgScenarioControllingAgency);
char* edisdk_edifactwriter_getmsgscenarioidentification(void* lpObj);
int edisdk_edifactwriter_setmsgscenarioidentification(void* lpObj, const char* lpszMsgScenarioIdentification);
char* edisdk_edifactwriter_getmsgscenariorelease(void* lpObj);
int edisdk_edifactwriter_setmsgscenariorelease(void* lpObj, const char* lpszMsgScenarioRelease);
char* edisdk_edifactwriter_getmsgscenarioversion(void* lpObj);
int edisdk_edifactwriter_setmsgscenarioversion(void* lpObj, const char* lpszMsgScenarioVersion);
char* edisdk_edifactwriter_getmsgsequenceoftransfers(void* lpObj);
int edisdk_edifactwriter_setmsgsequenceoftransfers(void* lpObj, const char* lpszMsgSequenceOfTransfers);
QString getMsgAssociationAssignedCode();
int setMsgAssociationAssignedCode(QString qsMsgAssociationAssignedCode); QString getMsgCodeListVersionNumber();
int setMsgCodeListVersionNumber(QString qsMsgCodeListVersionNumber); QString getMsgCommonAccessReference();
int setMsgCommonAccessReference(QString qsMsgCommonAccessReference); QString getMsgControllingAgency();
int setMsgControllingAgency(QString qsMsgControllingAgency); QString getMsgFirstAndLastTransfer();
int setMsgFirstAndLastTransfer(QString qsMsgFirstAndLastTransfer); QString getMsgMessageImplControllingAgency();
int setMsgMessageImplControllingAgency(QString qsMsgMessageImplControllingAgency); QString getMsgMessageImplIdentification();
int setMsgMessageImplIdentification(QString qsMsgMessageImplIdentification); QString getMsgMessageImplRelease();
int setMsgMessageImplRelease(QString qsMsgMessageImplRelease); QString getMsgMessageImplVersion();
int setMsgMessageImplVersion(QString qsMsgMessageImplVersion); QString getMsgMessageRelease();
int setMsgMessageRelease(QString qsMsgMessageRelease); QString getMsgMessageSubsetControllingAgency();
int setMsgMessageSubsetControllingAgency(QString qsMsgMessageSubsetControllingAgency); QString getMsgMessageSubsetIdentification();
int setMsgMessageSubsetIdentification(QString qsMsgMessageSubsetIdentification); QString getMsgMessageSubsetRelease();
int setMsgMessageSubsetRelease(QString qsMsgMessageSubsetRelease); QString getMsgMessageSubsetVersion();
int setMsgMessageSubsetVersion(QString qsMsgMessageSubsetVersion); QString getMsgMessageType();
int setMsgMessageType(QString qsMsgMessageType); QString getMsgMessageTypeSubFunctionIdentification();
int setMsgMessageTypeSubFunctionIdentification(QString qsMsgMessageTypeSubFunctionIdentification); QString getMsgMessageVersion();
int setMsgMessageVersion(QString qsMsgMessageVersion); QString getMsgReferenceNumber();
int setMsgReferenceNumber(QString qsMsgReferenceNumber); QString getMsgScenarioControllingAgency();
int setMsgScenarioControllingAgency(QString qsMsgScenarioControllingAgency); QString getMsgScenarioIdentification();
int setMsgScenarioIdentification(QString qsMsgScenarioIdentification); QString getMsgScenarioRelease();
int setMsgScenarioRelease(QString qsMsgScenarioRelease); QString getMsgScenarioVersion();
int setMsgScenarioVersion(QString qsMsgScenarioVersion); QString getMsgSequenceOfTransfers();
int setMsgSequenceOfTransfers(QString qsMsgSequenceOfTransfers);
Remarks
This property holds the current message information for the EDI document. It is used by the StartMessage method to create a new transaction set header. The properties of this object must be changed before calling StartMessage to write the transaction set correctly. After calling StartMessage changing the properties of this object will change the values for the next transaction set only.
This property is read-only and not available at design time.
Data Type
OutputData Property (EDIFACTWriter Class)
The output data that has been written so far.
Syntax
ANSI (Cross Platform) char* GetOutputData();
int SetOutputData(const char* lpszOutputData); Unicode (Windows) LPWSTR GetOutputData();
INT SetOutputData(LPCWSTR lpszOutputData);
char* edisdk_edifactwriter_getoutputdata(void* lpObj);
int edisdk_edifactwriter_setoutputdata(void* lpObj, const char* lpszOutputData);
QString getOutputData();
int setOutputData(QString qsOutputData);
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 Class)
The name of the output file to which the EDI data will be written.
Syntax
ANSI (Cross Platform) char* GetOutputFile();
int SetOutputFile(const char* lpszOutputFile); Unicode (Windows) LPWSTR GetOutputFile();
INT SetOutputFile(LPCWSTR lpszOutputFile);
char* edisdk_edifactwriter_getoutputfile(void* lpObj);
int edisdk_edifactwriter_setoutputfile(void* lpObj, const char* lpszOutputFile);
QString getOutputFile();
int setOutputFile(QString qsOutputFile);
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 Class)
The suffix that is appended to the end of a segment.
Syntax
ANSI (Cross Platform) int GetSegmentSuffix();
int SetSegmentSuffix(int iSegmentSuffix); Unicode (Windows) INT GetSegmentSuffix();
INT SetSegmentSuffix(INT iSegmentSuffix);
Possible Values
SS_NONE(0),
SS_CR(1),
SS_LF(2),
SS_CRLF(3)
int edisdk_edifactwriter_getsegmentsuffix(void* lpObj);
int edisdk_edifactwriter_setsegmentsuffix(void* lpObj, int iSegmentSuffix);
int getSegmentSuffix();
int setSegmentSuffix(int iSegmentSuffix);
Default Value
3
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 Class)
Closes the writer.
Syntax
ANSI (Cross Platform) int Close(); Unicode (Windows) INT Close();
int edisdk_edifactwriter_close(void* lpObj);
int 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.
Error Handling (C++)
This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)
Config Method (EDIFACTWriter Class)
Sets or retrieves a configuration setting.
Syntax
ANSI (Cross Platform) char* Config(const char* lpszConfigurationString); Unicode (Windows) LPWSTR Config(LPCWSTR lpszConfigurationString);
char* edisdk_edifactwriter_config(void* lpObj, const char* lpszConfigurationString);
QString config(const QString& qsConfigurationString);
Remarks
Config is a generic method available in every class. It is used to set and retrieve configuration settings for the class.
These settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the class, 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.
Error Handling (C++)
This method returns a String value; after it returns, call the GetLastErrorCode() method to obtain its result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message.
EndCompositeElement Method (EDIFACTWriter Class)
Finish writing the composite element.
Syntax
ANSI (Cross Platform) int EndCompositeElement(); Unicode (Windows) INT EndCompositeElement();
int edisdk_edifactwriter_endcompositeelement(void* lpObj);
int endCompositeElement();
Remarks
This method is used to close a CompositeElement. This method may only be called after a successful call to StartCompositeElement
Error Handling (C++)
This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)
EndFunctionalGroup Method (EDIFACTWriter Class)
Write the UNE(FunctionalGroup) segment to the output file/data/stream.
Syntax
ANSI (Cross Platform) int EndFunctionalGroup(); Unicode (Windows) INT EndFunctionalGroup();
int edisdk_edifactwriter_endfunctionalgroup(void* lpObj);
int endFunctionalGroup();
Remarks
This method is used to close a FunctionalGroup. This method may only be called after a successful call to StartFunctionalGroup
Error Handling (C++)
This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)
EndInterchange Method (EDIFACTWriter Class)
Write the UNZ(Interchange) segment to the output file/data/stream.
Syntax
ANSI (Cross Platform) int EndInterchange(); Unicode (Windows) INT EndInterchange();
int edisdk_edifactwriter_endinterchange(void* lpObj);
int endInterchange();
Remarks
This method is used to close an Interchange. This method may only be called after a successful call to StartInterchange
Error Handling (C++)
This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)
EndMessage Method (EDIFACTWriter Class)
Closes the current message.
Syntax
ANSI (Cross Platform) int EndMessage(); Unicode (Windows) INT EndMessage();
int edisdk_edifactwriter_endmessage(void* lpObj);
int 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.
Error Handling (C++)
This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)
EndSegment Method (EDIFACTWriter Class)
Finish writing the segment, add SegmentSuffix at the end of the segment.
Syntax
ANSI (Cross Platform) int EndSegment(); Unicode (Windows) INT EndSegment();
int edisdk_edifactwriter_endsegment(void* lpObj);
int endSegment();
Remarks
This method is used to close a Segment. This method may only be called after a successful call to StartSegment
Error Handling (C++)
This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)
Reset Method (EDIFACTWriter Class)
Resets all properties to their default values.
Syntax
ANSI (Cross Platform) int Reset(); Unicode (Windows) INT Reset();
int edisdk_edifactwriter_reset(void* lpObj);
int reset();
Remarks
This method resets all properties of the component to their default values as specified in the property definitions.
Error Handling (C++)
This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)
StartCompositeElement Method (EDIFACTWriter Class)
Starts a composite element within the current segment.
Syntax
ANSI (Cross Platform) int StartCompositeElement(); Unicode (Windows) INT StartCompositeElement();
int edisdk_edifactwriter_startcompositeelement(void* lpObj);
int 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.
Error Handling (C++)
This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)
StartFunctionalGroup Method (EDIFACTWriter Class)
Starts a new functional group in the EDI document.
Syntax
ANSI (Cross Platform) int StartFunctionalGroup(); Unicode (Windows) INT StartFunctionalGroup();
int edisdk_edifactwriter_startfunctionalgroup(void* lpObj);
int 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.
Error Handling (C++)
This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)
StartInterchange Method (EDIFACTWriter Class)
Starts a new interchange in the EDI document.
Syntax
ANSI (Cross Platform) int StartInterchange(); Unicode (Windows) INT StartInterchange();
int edisdk_edifactwriter_startinterchange(void* lpObj);
int 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.
Error Handling (C++)
This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)
StartMessage Method (EDIFACTWriter Class)
Starts a new message in the EDI document.
Syntax
ANSI (Cross Platform) int StartMessage(); Unicode (Windows) INT StartMessage();
int edisdk_edifactwriter_startmessage(void* lpObj);
int 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.
Error Handling (C++)
This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)
StartSegment Method (EDIFACTWriter Class)
Starts a new segment with the specified tag.
Syntax
ANSI (Cross Platform) int StartSegment(const char* lpsztag); Unicode (Windows) INT StartSegment(LPCWSTR lpsztag);
int edisdk_edifactwriter_startsegment(void* lpObj, const char* lpsztag);
int startSegment(const QString& qstag);
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.
Error Handling (C++)
This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)
WriteComponent Method (EDIFACTWriter Class)
Writes a class element value to the current composite element.
Syntax
ANSI (Cross Platform) int WriteComponent(const char* lpszval); Unicode (Windows) INT WriteComponent(LPCWSTR lpszval);
int edisdk_edifactwriter_writecomponent(void* lpObj, const char* lpszval);
int writeComponent(const QString& qsval);
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.
Error Handling (C++)
This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)
WriteElement Method (EDIFACTWriter Class)
Writes an element value to the current segment.
Syntax
ANSI (Cross Platform) int WriteElement(const char* lpszval); Unicode (Windows) INT WriteElement(LPCWSTR lpszval);
int edisdk_edifactwriter_writeelement(void* lpObj, const char* lpszval);
int writeElement(const QString& qsval);
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 Handling (C++)
This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)
Error Event (EDIFACTWriter Class)
Fires when an error occurs during message processing. Normally, the class fails with an error.
Syntax
ANSI (Cross Platform) virtual int FireError(EDIFACTWriterErrorEventParams *e);
typedef struct {
int ErrorCode;
const char *Description; int reserved; } EDIFACTWriterErrorEventParams;
Unicode (Windows) virtual INT FireError(EDIFACTWriterErrorEventParams *e);
typedef struct {
INT ErrorCode;
LPCWSTR Description; INT reserved; } EDIFACTWriterErrorEventParams;
#define EID_EDIFACTWRITER_ERROR 1 virtual INT EDISDK_CALL FireError(INT &iErrorCode, LPSTR &lpszDescription);
class EDIFACTWriterErrorEventParams {
public:
int errorCode();
const QString &description();
int eventRetVal();
void setEventRetVal(int iRetVal);
};
// To handle, subclass EDIFACTWriter and override this emitter function.
virtual int fireError(EDIFACTWriterErrorEventParams *e) {...}
// Or, connect one or more slots to this signal.
void error(EDIFACTWriterErrorEventParams *e);
Remarks
The Error event is fired in case of exceptional conditions during message processing. Normally, the class fails with an error.
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 Class)
Fires when output data is written.
Syntax
ANSI (Cross Platform) virtual int FireOutput(EDIFACTWriterOutputEventParams *e);
typedef struct {
const char *Data; int lenData; int reserved; } EDIFACTWriterOutputEventParams;
Unicode (Windows) virtual INT FireOutput(EDIFACTWriterOutputEventParams *e);
typedef struct {
LPCSTR Data; INT lenData; INT reserved; } EDIFACTWriterOutputEventParams;
#define EID_EDIFACTWRITER_OUTPUT 2 virtual INT EDISDK_CALL FireOutput(LPSTR &lpData, INT &lenData);
class EDIFACTWriterOutputEventParams {
public:
const QByteArray &data();
int eventRetVal();
void setEventRetVal(int iRetVal);
};
// To handle, subclass EDIFACTWriter and override this emitter function.
virtual int fireOutput(EDIFACTWriterOutputEventParams *e) {...}
// Or, connect one or more slots to this signal.
void output(EDIFACTWriterOutputEventParams *e);
Remarks
This event is fired when output data is written. The Data parameter contains the segment that was written.
EDIFACTDelimiters Type
The delimiters used in the EDIFACT document.
Syntax
EDISDKEDIFACTDelimiters (declared in edisdk.h)
Remarks
This type contains fields specifying the various delimiters used within the EDIFACT document.
Fields
Component
char*
Default Value: ":"
The character used to separate the components in a composite element.
Decimal
char*
Default Value: "."
The character used to separate the integer portion of a numeric value from the fractional portion.
Element
char*
Default Value: "+"
The delimiter used to separate elements within a segment.
Release
char*
Default Value: "?"
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.
Repetition
char*
Default Value: "*(syntax 4) or empty(syntax 3)"
The character used to indicate a repeating element or component.
Segment
char*
Default Value: "'"
The character used to terminate a segment.
Constructors
EDIFACTDelimiters()
EDIFACTFunctionalGroup Type
A functional group of messages.
Syntax
EDISDKEDIFACTFunctionalGroup (declared in edisdk.h)
Remarks
This type represents a functional group of messages, with fields describing the values from the UNG segment.
- AppPassword
- AppRecipientIdentification
- AppRecipientIDQualifier
- AppSenderIdentification
- AppSenderIDQualifier
- AssociationAssignedCode
- ControllingAgency
- Date
- GroupIdentification
- MessageRelease
- MessageVersion
- ReferenceNumber
- Time
Fields
AppPassword
char*
Default Value: ""
The application password as specified in the functional group header.
This is an alphanumeric field with a value up to 14 characters long.
AppRecipientIdentification
char*
Default Value: ""
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.
AppRecipientIDQualifier
char*
Default Value: ""
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.
AppSenderIdentification
char*
Default Value: ""
The name or code of the message group's sender.
This is an alphanumeric field with a value up to 35 characters long.
AppSenderIDQualifier
char*
Default Value: ""
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.
AssociationAssignedCode
char*
Default Value: ""
The assigned code for the message type.
This is an alphanumeric field with a value up to 6 characters long.
ControllingAgency
char*
Default Value: ""
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.
Date
char*
Default Value: ""
The date that the group of messages was prepared.
GroupIdentification
char*
Default Value: ""
The identification value for the functional group.
This is an alphanumeric field with a value up to 6 characters long.
MessageRelease
char*
Default Value: ""
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.
MessageVersion
char*
Default Value: ""
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.
ReferenceNumber
char*
Default Value: ""
The reference number for the functional group.
This is an alphanumeric field with a value up to 14 characters long.
Time
char*
Default Value: ""
The time that the group of messages was prepared.
Constructors
EDIFACTFunctionalGroup()
EDIFACTInterchange Type
An interchange containing functional groups and messages.
Syntax
EDISDKEDIFACTInterchange (declared in edisdk.h)
Remarks
This type represents an EDIFACT interchange, with fields describing the values from the UNB segment.
- AckRequest
- AgreementIdentifier
- ApplicationReference
- CharacterEncoding
- CodeListVersionNumber
- Date
- ProcessingPriorityCode
- RecipientIdentification
- RecipientIDQualifier
- RecipientInternalIdentification
- RecipientInternalSubIdentification
- RecipientPassword
- RecipientPasswordQualifier
- ReferenceNumber
- SenderIdentification
- SenderIDQualifier
- SenderInternalIdentification
- SenderInternalSubIdentification
- SyntaxIdentifier
- SyntaxVersionNumber
- TestIndicator
- Time
Fields
AckRequest
char*
Default Value: ""
If this field is '1', an ACK was requested in response to this interchange.
AgreementIdentifier
char*
Default Value: ""
The identifier for the communication agreement used by the interchange.
This is an alphanumeric field with a value up to 35 characters long.
ApplicationReference
char*
Default Value: ""
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.
CharacterEncoding
char*
Default Value: ""
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.
CodeListVersionNumber
char*
Default Value: ""
The identifier for the communication agreement used by the interchange.
This is an alphanumeric field with a value up to 6 characters long.
Date
char*
Default Value: ""
The date that the interchange was prepared.
ProcessingPriorityCode
char*
Default Value: ""
A 1-character code that requests a specific processing priority for the interchange.
RecipientIdentification
char*
Default Value: ""
The identification for the interchange's recipient.
This is an alphanumeric field with a value up to 35 characters long.
RecipientIDQualifier
char*
Default Value: ""
The qualifier for the recipient identification code.
This is an alphanumeric field with a value up to 4 characters long.
RecipientInternalIdentification
char*
Default Value: ""
More specific recipient identification for internal use.
This is an alphanumeric field with a value up to 35 characters long.
RecipientInternalSubIdentification
char*
Default Value: ""
A sub-identification string for the receiver for internal use.
This is an alphanumeric field with a value up to 35 characters long.
RecipientPassword
char*
Default Value: ""
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.
RecipientPasswordQualifier
char*
Default Value: ""
A qualifier for the recipient password.
This is an alphanumeric field with a value up to 2 characters long.
ReferenceNumber
char*
Default Value: ""
A reference number for the interchange.
This is an alphanumeric field with a value up to 14 characters long.
SenderIdentification
char*
Default Value: ""
The identification for the interchange's sender.
This is an alphanumeric field with a value up to 35 characters long.
SenderIDQualifier
char*
Default Value: ""
The qualifier for the sender identification code.
This is an alphanumeric field with a value up to 4 characters long.
SenderInternalIdentification
char*
Default Value: ""
More specific sender identification for internal use.
This is an alphanumeric field with a value up to 35 characters long.
SenderInternalSubIdentification
char*
Default Value: ""
A sub-identification string for the sender for internal use.
This is an alphanumeric field with a value up to 35 characters long.
SyntaxIdentifier
char*
Default Value: ""
A identifier specifying the controlling agency and valid character set.
This is an alphanumeric field with a value up to 4 characters long.
SyntaxVersionNumber
char*
Default Value: ""
A 1-character numeric value indicating the syntax version.
TestIndicator
char*
Default Value: ""
If this field is '1', the interchange is a test interchange.
Time
char*
Default Value: ""
The time that the interchange was prepared.
Constructors
EDIFACTInterchange()
EDIFACTMessage Type
An EDIFACT message.
Syntax
EDISDKEDIFACTMessage (declared in edisdk.h)
Remarks
This type represents an EDIFACT message, with fields describing the values from the UNH segment.
- AssociationAssignedCode
- CodeListVersionNumber
- CommonAccessReference
- ControllingAgency
- FirstAndLastTransfer
- MessageImplControllingAgency
- MessageImplIdentification
- MessageImplRelease
- MessageImplVersion
- MessageRelease
- MessageSubsetControllingAgency
- MessageSubsetIdentification
- MessageSubsetRelease
- MessageSubsetVersion
- MessageType
- MessageTypeSubFunctionIdentification
- MessageVersion
- ReferenceNumber
- ScenarioControllingAgency
- ScenarioIdentification
- ScenarioRelease
- ScenarioVersion
- SequenceOfTransfers
Fields
AssociationAssignedCode
char*
Default Value: ""
A code assigned to the message by the controlling organization.
This is an alphanumeric field with a value up to 6 characters long.
CodeListVersionNumber
char*
Default Value: ""
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.
CommonAccessReference
char*
Default Value: ""
A reference value to associate this message with related messages.
This is an alphanumeric field with a value up to 35 characters long.
ControllingAgency
char*
Default Value: ""
A code that identifies the controlling agency for this message type.
This is an alphanumeric field with a value up to 3 characters long.
FirstAndLastTransfer
char*
Default Value: ""
A single-character field that indicates the first and last messages in a related set.
MessageImplControllingAgency
char*
Default Value: ""
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.
MessageImplIdentification
char*
Default Value: ""
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.
MessageImplRelease
char*
Default Value: ""
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.
MessageImplVersion
char*
Default Value: ""
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.
MessageRelease
char*
Default Value: ""
Identifies the release number for the message.
This is an alphanumeric field with a value up to 3 characters long.
MessageSubsetControllingAgency
char*
Default Value: ""
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.
MessageSubsetIdentification
char*
Default Value: ""
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.
MessageSubsetRelease
char*
Default Value: ""
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.
MessageSubsetVersion
char*
Default Value: ""
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.
MessageType
char*
Default Value: ""
A code identifying the message's type.
This is an alphanumeric field with a value up to 6 characters long.
MessageTypeSubFunctionIdentification
char*
Default Value: ""
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.
MessageVersion
char*
Default Value: ""
Identifies the version number for the message.
This is an alphanumeric field with a value up to 3 characters long.
ReferenceNumber
char*
Default Value: ""
A unique reference number for the message.
This is an alphanumeric field with a value up to 14 characters long.
ScenarioControllingAgency
char*
Default Value: ""
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.
ScenarioIdentification
char*
Default Value: ""
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.
ScenarioRelease
char*
Default Value: ""
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.
ScenarioVersion
char*
Default Value: ""
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.
SequenceOfTransfers
char*
Default Value: ""
Specifies the message's position in a sequence.
This is an alphanumeric field with a value up to 2 characters long.
Constructors
EDIFACTMessage()
Config Settings (EDIFACTWriter Class)
The class 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 class, access to these internal properties is provided through the Config method.Trappable Errors (EDIFACTWriter Class)
Error Handling (C++)
Call the GetLastErrorCode() method to obtain the last called method's result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. Known error codes are listed below. If an error occurs, the GetLastError() method can be called to retrieve the associated error message.
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. |