ERP Integrator V2 - Online Help
ERP Integrator V2
Questions / Feedback?

IDocReader Class

Properties   Methods   Events   Configuration Settings   Errors  

The IDocReader component is used to parse IDoc documents.

Class Name

InERP_IDocReader

Procedural Interface

 inerp_idocreader_open();
 inerp_idocreader_close($res);
 inerp_idocreader_register_callback($res, $id, $function);
 inerp_idocreader_get_last_error($res);
 inerp_idocreader_get_last_error_code($res);
 inerp_idocreader_set($res, $id, $index, $value);
 inerp_idocreader_get($res, $id, $index);
 inerp_idocreader_do_abortconnection($res, $errormessage);
 inerp_idocreader_do_closeconnection($res);
 inerp_idocreader_do_config($res, $configurationstring);
 inerp_idocreader_do_doevents($res);
 inerp_idocreader_do_exportxmlschema($res, $filepath);
 inerp_idocreader_do_flush($res);
 inerp_idocreader_do_getattributes($res);
 inerp_idocreader_do_getcurrentidocstatus($res);
 inerp_idocreader_do_importschemafromsap($res, $idoctype, $enhancement);
 inerp_idocreader_do_importxmlschema($res, $filepath);
 inerp_idocreader_do_input($res, $text);
 inerp_idocreader_do_interrupt($res);
 inerp_idocreader_do_openconnection($res);
 inerp_idocreader_do_parse($res);
 inerp_idocreader_do_reset($res);
 inerp_idocreader_do_send($res);

Remarks

The IDocReader class allows you to easily parse an IDoc from a file, a stream, or from memory. You can parse documents that are formatted in either plain text or XML. To do so, you need to follow the steps below:

  1. Import schema, this can be done one of two ways:
  2. Load the IDoc Data into the class using one of the following methods:
    • Specify the file to read in the InputFile property
    • Provide the data directly from memory using the InputData property
  3. Call the Parse parse method

During parsing, the class performs basic validation of the incoming document. If validation fails, a warning is generated, and the Error event will fire, populating the ErrorOffset property with the offset in the document where the error occurred.

In order to navigate the document, you will need to use the XPath property, like so:

/segmentA[1]/childSegmentC[2]/grandChildSegmentA[1]

This example path means that the class will select the first grandChildSegmentA in the second childSegmentC in the first segmentA.

Property List


The following is the full list of the properties of the class with short descriptions. Click on the links for further details.

ConnectedIndicates whether or not the component is connected to the SAP system.
IDocControlRecordARCKEYKey for the external message archive.
IDocControlRecordCIMTYPCustom extension that is defined by user.
IDocControlRecordCREDATThe creation date of the IDoc.
IDocControlRecordCRETIMThe creation time of the IDoc.
IDocControlRecordDIRECTThe direction of the IDoc, indicates if the IDoc is inbound or outbound.
IDocControlRecordDOCNUMThe unique number assigned to the IDoc.
IDocControlRecordDOCRELThe SAP release number for IDoc.
IDocControlRecordEXPRSSOverride during inbound processing.
IDocControlRecordIDOCTYPThe name of the basic type of the IDoc.
IDocControlRecordMANDTThe client number.
IDocControlRecordMESCODThe message code.
IDocControlRecordMESFCTThe message Function.
IDocControlRecordMESTYPThe message type.
IDocControlRecordOUTMODThe output mode.
IDocControlRecordRCVLADThe logical address of recipient.
IDocControlRecordRCVPFCThe partner function of recipient.
IDocControlRecordRCVPORThe receiver port.
IDocControlRecordRCVPRNThe partner Number of Receiver.
IDocControlRecordRCVPRTThe partner Type of Receiver.
IDocControlRecordRCVSADThe recipient's address.
IDocControlRecordREFGRPThe message group (EDI Message Group).
IDocControlRecordREFINTThe transmission file (EDI Interchange).
IDocControlRecordREFMESThe message (EDI Message).
IDocControlRecordSERIALEDI serialization property.
IDocControlRecordSNDLADThe logical address of sender.
IDocControlRecordSNDPFCThe partner function of the sender.
IDocControlRecordSNDPORThe sender's port.
IDocControlRecordSNDPRNThe partner number of the sender.
IDocControlRecordSNDPRTThe partner type of the sender.
IDocControlRecordSNDSADThe sender's address.
IDocControlRecordSTATUSThe status of the IDoc.
IDocControlRecordSTDA flag indicating the EDI standard.
IDocControlRecordSTDMESThe EDI message type.
IDocControlRecordSTDVRSThe EDI standard, version and release.
IDocControlRecordTABNAMThe name of the table structure.
IDocControlRecordTESTTest flag.
ErrorOffsetCurrent offset of the document being parsed.
ExtraDataExtra data that has not been parsed by the component.
IDocStatusRecordCreationDateDate when the status record was created.
IDocStatusRecordCreationTimeTime when the status record was created.
IDocStatusRecordDescriptionDescription of the status record.
IDocStatusRecordStatusCodeThe status code of the IDoc status record.
ImportFormatThe format of the import data.
InputDataThe IDoc data to be read.
InputFileThe file to be read.
MaxSegmentsThe maximum number of occurrences for this segment.
MinSegmentsThe minimum number of occurrences for this segment.
SapAttributeApplicationNameThe name of the calling program.
SapAttributeClientThe client authenticating to the SAP system.
SapAttributeDestinationDestination that you are currently connected to.
SapAttributeKernelVersionThe release version of the kernel.
SapAttributeLanguageOne character code indicating the language of the system.
SapAttributeLanguageCodeTwo-character ISO 639-1 code indicating the language of the system.
SapAttributeOwnCodePageThe code page of your system.
SapAttributeOwnHostThe name of the host you're connected to.
SapAttributeOwnTypeThe type of your own system.
SapAttributeOwnVersionThe release version of your system.
SapAttributePartnerCharSizeThe length of a character on the partner's system.
SapAttributePartnerCodePageThe code page of your partner's system.
SapAttributePartnerHostPartner host name.
SapAttributePartnerTypeThe type of the partner's system.
SapAttributePartnerVersionThe release version of the partner's system.
SapAttributePasswordStateThe state of the password.
SapAttributeReservedThis property may contain an additional 160 bytes of data which is reserved for future new attributes returned by the R/3 server.
SapAttributeRoleIndicates whether you're connected as a client or server application.
SapAttributeSystemNameThe name or id of the R/3 system you're currently connected to.
SapAttributeSystemNumberThe system number of the R/3 server you're connected to.
SapAttributeTraceOnIndicates whether debug tracing is active or not.
SapAttributeUserThe login credential which was used to connect to the R/3 server.
SapConnectionClientThe client authenticating to the SAP system.
SapConnectionTypeSpecifies how the connection is made to the SAP server.
SapConnectionDestinationReference to an existing destination that is specified in a local saprfc.
SapConnectionGatewayHostThe gateway host you wish to connect to.
SapConnectionGatewayServiceThe gateway service you wish to connect to.
SapConnectionHostHost name of the target system.
SapConnectionLanguageThe language value to be used when connecting SAP system.
SapConnectionPasswordThe password used to authenticate to the SAP system.
SapConnectionSoapURLThe URL of the SOAP service on the SAP system.
SapConnectionSystemNumberThe number by which the target system is defined.
SapConnectionUserThe user that is authenticating to the SAP system.
SegmentCountThe number of segments available.
SegmentDataLengthThe data length of the current segment.
SegmentDescriptionThe description of the current segment.
IDocSegmentFieldCountThe number of records in the IDocSegmentField arrays.
IDocSegmentFieldDataTypeThe data type of the IDoc segment property.
IDocSegmentFieldDescriptionThe description of IDoc segment property.
IDocSegmentFieldLengthThe output length of the data in the IDoc segment property.
IDocSegmentFieldNameThe name of IDoc segment property.
IDocSegmentFieldOffsetThe data offset of the IDoc segment property.
IDocSegmentFieldValueThe value of the IDoc segment property.
SegmentHierarchyLevelHierarchy level of the current segment.
SegmentIndexThe index of the current segment.
SegmentNameCurrent segment name.
SegmentParentNameThe name of the parent of the current segment.
SegmentSequenceNumberSequence number of the current segment.
SSLAcceptServerCertEncodedThe certificate (PEM/base64 encoded).
SSLCertEncodedThe certificate (PEM/base64 encoded).
SSLCertStoreThe name of the certificate store for the client certificate.
SSLCertStorePasswordIf the certificate store is of a type that requires a password, this property is used to specify that password in order to open the certificate store.
SSLCertStoreTypeThe type of certificate store for this certificate.
SSLCertSubjectThe subject of the certificate used for client authentication.
SSLServerCertEncodedThe certificate (PEM/base64 encoded).
TimeoutLength of time in seconds the component waits for a response from the SAP system.
TransferModeMode for sending the IDoc data to SAP System.
XChildrenNumber of child segments of the current segment.
FieldCountThe number of records in the Field arrays.
FieldDataTypeThe data type of the IDoc segment property.
FieldDescriptionThe description of IDoc segment property.
FieldLengthThe output length of the data in the IDoc segment property.
FieldNameThe name of IDoc segment property.
FieldOffsetThe data offset of the IDoc segment property.
FieldValueThe value of the IDoc segment property.
XPathProvides a way to point to a specific segment in the document.
XSegmentThe name of the current 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.

AbortConnectionUsed to terminate a connection to the SAP system.
CloseConnectionCloses a connection to the SAP system.
ConfigSets or retrieves a configuration setting .
DoEventsProcesses events from the internal message queue.
ExportXMLSchemaExports an IDoc XML schema file.
FlushFlushes the parser and checks its end state.
GetAttributesRetrieves attributes about the SAP system you're currently connected to.
GetCurrentIDocStatusGet status record of the current IDoc.
ImportSchemaFromSAPLoads the schema for an IDoc type.
ImportXMLSchemaImports an XML schema file describing an IDoc type.
InputProvides input to the reader.
InterruptInterrupt the current method.
OpenConnectionOpens a connection to the SAP system.
ParseParse the IDoc data.
ResetResets the parser.
SendSend the generated IDoc to the SAP System.

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.

ControlRecordFires when the control record data is read.
EndSegmentFires when the data record segment has been read.
ErrorInformation about errors during data delivery.
SegmentFieldFires when a field of the segment is read.
SSLServerAuthenticationFired after the server presents its certificate to the client.
SSLStatusShows the progress of the secure connection.
StartSegmentFires when a new data record segment is being read.
StatusDetailed status messages for debugging purposes.

Configuration Settings


The following is a list of configuration settings for the class with short descriptions. Click on the links for further details.

LogPerformanceDataLogs the performance information when a function is called.
LogRawDataLogs the raw data being sent and received.
ParseTablesIndicates 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.
GroupThe logon group.
MessageServerService name of load balancer service.
SncLibPathThe external security product's library.
SncModeThe SNC activation indicator.
SncNameThe Initiator's SNC name.
SncPartnerNameThe communication partner's SNC name.
SncQopThe quality of protection level.
SystemIDThe system ID of the SAP system.
LocalHostThe IP address of the local interface.
ProxyAutoDetectWhether or not to automatically detect and use proxy system settings, if available.
ProxyAuthorizationThe authorization string to be sent to the proxy server.
ProxyAuthSchemeThe authorization scheme to be used for the proxy.
ProxyPasswordA password if authentication is to be used for the proxy.
ProxyPortPort for the proxy server (default 80).
ProxyServerName or IP address of a proxy server (optional).
ProxyUserA user name if authentication is to be used for the proxy.
FirewallAutoDetectTells the component whether or not to automatically detect and use firewall system settings, if available.
FirewallHostName or IP address of firewall (optional).
FirewallPasswordPassword to be used if authentication is to be used when connecting through the firewall.
FirewallPortThe TCP port for the FirewallHost;.
FirewallUserA user name if authentication is to be used connecting through a firewall.
FirewallTypeDetermines the type of firewall to connect through.
CodePageThe system code page used for Unicode to Multibyte translations.

 
 
Copyright (c) 2017 /n software inc. - All rights reserved.
Build 2.0.6240.0