IDocWriter Bean
Properties Methods Events Configuration Settings Errors
The IDocReader component is used to write IDoc documents.
Syntax
InERP.Idocwriter
Remarks
The IDocWriter bean allows you to create a document from scratch. The bean allows you to create an IDoc document one segment at a time. Here's how a document would normally be created:
- First, load a schema file into the component. You can use ImportSchemaFromSAP to retrieve the schema from SAP or ImportXMLSchema if you have the XML schema saved locally.
- Specify where to write the document by setting the OutputFile property or calling the SetOutputStream method. If neither is set, the data will be written to the OutputData property.
- Start a new document by calling StartIDoc.
- Write the Control Record Data before writing any segments, call WriteControlRecord. Note that you will need to set the fields in the ControlRecordData property before calling this method.
- Create a new record data segment by calling StartSegment.
- Write all the data for the segment by creating new fields using the WriteFieldValue method. Note that each segment can contain one to many fields.
- Once you are done with the segment, call EndSegment.
- Repeat steps 5-7 until you are finished writing the document.
- Once you are done with the document, call EndIDoc.
Example IDocWriter Code:
idocwriter1.StartIDoc() idocwriter1.WriteControlRecord() idocwriter1.StartSegment("Segment1") idocwriter1.WriteFieldValue("Field1", "Value1") idocwriter1.WriteFieldValue("Field2", "Value2") ... idocwriter1.EndSegment() idocwriter1.StartSegment("Segment2") idocwriter1.WriteFieldValue("Field1", "Value1") ... idocwriter1.EndSegment() ... idocwriter1.EndIDoc()
Property List
The following is the full list of the properties of the bean with short descriptions. Click on the links for further details.
Append | Indicates whether or not the component should append to a file when writing IDoc data. |
Connected | Indicates whether or not the component is connected to the SAP system. |
ControlRecordData | Control record data of the IDoc. |
ExportFormat | The format of the export data. |
IDocStatus | The status of an IDoc. |
MaxSegments | The maximum number of occurrences for this segment. |
MinSegments | The minimum number of occurrences for this segment. |
OutputData | The IDoc data to be written. |
OutputFile | Specifies the name of the IDoc file to write to. |
Overwrite | Indicates whether or not the component should overwrite files when writing IDoc data. |
SapAttributes | Describes the SAP R/3 system you're connected to. |
SapConnection | These properties are used to connect to the SAP system. |
SegmentCount | The number of segments available. |
SegmentDataLength | The data length of the current segment. |
SegmentDescription | The description of the current segment. |
SegmentFields | A list of fields in the current segment. |
SegmentHierarchyLevel | Hierarchy level of the current segment. |
SegmentIndex | The index of the current segment. |
SegmentName | Current segment name. |
SegmentParentName | The name of the parent of the current segment. |
SegmentSequenceNumber | Sequence number of the current segment. |
SSLAcceptServerCert | Instructs the component to unconditionally accept the server certificate that matches the supplied certificate. |
SSLCert | The certificate to be used during SSL negotiation. |
SSLServerCert | The server certificate for the last established connection. |
Suffix | What to append after each segment delimiter. |
Timeout | Length of time in seconds the component waits for a response from the SAP system. |
TransferMode | Mode for sending the IDoc data to SAP System. |
Method List
The following is the full list of the methods of the bean with short descriptions. Click on the links for further details.
abortConnection | Used to terminate a connection to the SAP system. |
closeConnection | Closes a connection to the SAP system. |
config | Sets or retrieves a configuration setting . |
doEvents | Processes events from the internal message queue. |
endIDoc | Finish creating an IDoc. |
endSegment | Ends writing the current segment. |
getAttributes | Retrieves attributes about the SAP system you're currently connected to. |
getCurrentIDocStatus | Get status record of the current IDoc. |
importSchemaFromSAP | Imports the schema for an IDoc type. |
importXMLSchema | Imports an XML schema file describing an IDoc type. |
interrupt | Interrupt the current method. |
openConnection | Opens a connection to the SAP system. |
reset | Resets the parser. |
send | Send the generated IDoc to the SAP System. |
setOutputStream | An output stream to write the IDoc data to. |
startIDoc | Start to create an IDoc. |
startSegment | Creates a new IDoc data segment on the current IDoc document. |
writeControlRecord | Writ IDoc control record data to the file or stream. |
writeFieldValue | Write current segment field value. |
Event List
The following is the full list of the events fired by the bean with short descriptions. Click on the links for further details.
Error | Information about errors during data delivery. |
Output | Fires whenever a segment is complete. |
SSLServerAuthentication | Fired after the server presents its certificate to the client. |
SSLStatus | Shows the progress of the secure connection. |
Status | Detailed status messages for debugging purposes. |
Warning | Fires whenever a validation warning is encountered. |
Configuration Settings
The following is a list of configuration settings for the bean with short descriptions. Click on the links for further details.
LogPerformanceData | Logs the performance information when a function is called. |
LogRawData | Logs the raw data being sent and received. |
ParseTables | Indicates whether to parse tables into rows and columns. |
ResponseParamText[i] | The value of the PARAMTEXT for the specified reponse parameter. |
RequestParamText[i] | The value of the PARAMTEXT for the specified request parameter. |
Group | The logon group. |
MessageServer | Service name of load balancer service. |
SncLibPath | The external security product's library. |
SncMode | The SNC activation indicator. |
SncName | The Initiator's SNC name. |
SncPartnerName | The communication partner's SNC name. |
SncQop | The quality of protection level. |
SystemID | The system ID of the SAP system. |
LocalHost | The IP address of the local interface. |
ProxyAutoDetect | Whether or not to automatically detect and use proxy system settings, if available. |
ProxyAuthorization | The authorization string to be sent to the proxy server. |
ProxyAuthScheme | The authorization scheme to be used for the proxy. |
ProxyPassword | A password if authentication is to be used for the proxy. |
ProxyPort | Port for the proxy server (default 80). |
ProxyServer | Name or IP address of a proxy server (optional). |
ProxyUser | A user name if authentication is to be used for the proxy. |
FirewallAutoDetect | Tells the component whether or not to automatically detect and use firewall system settings, if available. |
FirewallHost | Name or IP address of firewall (optional). |
FirewallPassword | Password to be used if authentication is to be used when connecting through the firewall. |
FirewallPort | The TCP port for the FirewallHost;. |
FirewallUser | A user name if authentication is to be used connecting through a firewall. |
FirewallType | Determines the type of firewall to connect through. |
CodePage | The system code page used for Unicode to Multibyte translations. |