ScriptEigener Objekttyp in der Automation Engine Function: Opens an XML document for processing purposes.
Syntax
XML_OPEN (DOCU, [Object Name], @Documentation)
XML_OPEN (REPORT, [RunID], Report)
XML_OPEN (STRING, String)
Syntax |
Description/Format |
---|---|
Source |
Source of the XML document. Allowed values: DOCU, REPORT, and STRING DOCU - Structured documentation. |
For structured documentations |
|
Object Name |
Name of the object. This parameter is optional if this is the own object's tab. |
Documentation |
Name of the documentation tab with a preceding "@". |
For reports |
|
Run number (RunID) of the task whose report should be opened. This parameter is optional if the report of the own object is concerned. |
|
Report |
|
For strings: | |
String |
String that contains the XML.
|
Return code |
---|
Reference to the XML document. |
Comments
The script function opens an XML document for processing purposes. This can be the structured documentation or the report of an SAP job.
In order to add further descriptions and explanations, you can use tabs for documentation purposes. You can define them for the individual object types in the variable UC_OBJECT_DOCU. The structured documentation is a specific type of description which is characterized by a preceding "@". Structured documentation can be processed with specific script elements.
Reports of SAP jobs are stored as XML documents. For XI_GET_CHANNEL, they contain a list of selected communication channels.
The return code of this script function is a handle which refers to the XML document. Some script elements that are used to process the XML document use this handle as a parameter.
You can close the XML document by using XML_CLOSE.
You cannot open more than one XML document at a time.
In previous Automation EngineDiese Komponente steuert ein Automation Engine-System. Besteht aus verschiedenen Serverprozessen. releases, this script function XML_OPEN_DOCU was renamed to XML_OPEN. You can still use the old notation.
Examples
In this example, the Details tab of the object MM.DAY is opened for further processing.
:SET &XMLDOCU# = XML_OPEN(DOCU,"MM.DAY", "@Details")
This example opens an XML document with a string.
:set &ref# = xml_open('STRING','<xmlstring>')
:set &ref# = sys_last_err_nr()
:if &ret > 0
: set &txt# = sys_last_err_ins()
! implement error handling here
:endif
A bad XML string either leads to run time error, or returns a return code which can be read with sys_last_err_nr().
See also:
Script element | Description |
---|---|
Closes XML documents. |
Script Elements - Read or Modify Objects
Sample Collection:
Retrieving Error Message and Number
About Scripts
Script Elements - Alphabetical Listing
Script-Elements - Ordered by Function