| Purpose | With Include you can include a further script file. |
|
Examples
Further examples |
Include
"radiobuttons_company.txt" The file "radiobuttons_company.txt" is searched in the current script directory. It is then interpreted in the same manner as if its content were part of the original script. |
| Format |
Include
"includename"
The file "includename" is searched in the current script directory. If it is not found, a syntax error message is displayed in the GuiXT script window, and the main script is continued. If it is found, first the lines of the include file are interpreted, and then the original script is continued. You can also specify the full path, e.g. Include "\\server12\guixt\inlcudes\r105.txt" Files in the SAP Web Repository or on http/ftp servers can also be used, e.g. Include "SAPWR:ZGUIXT.r105.txt" Include "http://www.synactive.com/includes/r105.txt" A nested Include is possible up to level 10. Please note that a search is always made in the active script directory, not relatively in the directory where the parent include file is located. |
| Using variables in include file names |
When you use variables in include statements, such as in: Include "inc.&V[company].txt" it is important to consider the context of the script:
Recommendation: Only use variables in include file names in GuiXT scripts. In InputScripts or process functions, this can lead to unexpected behavior – in such cases, GuiXT issues a warning in the trace. |
| Conditional inclusion |
The conditional inclusion of include files also works reliably in GuiXT scripts. A typical example: if Q[Transaction=IW33] Include "IW33mainscript.txt" endif
Recommendation: Use conditional includes preferably in GuiXT scripts to avoid unwanted preloading in InputScripts and process functions. |
| Components | GuiXT |