ImportSchemaFromSAP Method
Loads the schema for an IDoc type.
Syntax
idocreader.importSchemaFromSAP(IDocType, enhancement, [callback])
Callback
The 'callback' parameter specifies a function which will be called when the operation completes (or an error is encountered). If the 'callback' parameter is not specified, then the method will block and will not return until the operation completes (or an error is encountered).
The callback for this method is defined as:
function(err){ }
'err' is the error that occurred. If there was no error, then 'err' is 'null'.
'err' has 2 properties which hold detailed information:
err.code err.message
Remarks
Imports the IDoc schema for the IDoc type specified by the parameters IDocType and Enhancement from the SAP system into the class.
Note that the IDocType parameter should be the same as the IDOCTYP in the ControlRecordData of the document you intend to read. Likewise the Enhancement parameter should be the same as the CIMTYP in the ControlRecordData record. If the Enhancement is set and defined as an IDoc type on the SAP system, then the corresponding schema will be returned.