onError= |
A function code that is executed in case of an error message, as
response to the first function code. See
File Handling in InputScripts,
Example 2 for an example. Typically, the
onError=
function
code is
"/N"
(Cancel transaction) or
"/12"
(Cancel). The Script is continued with the Screen command that is
active after executing the OnError function code. The
variable
V[_lasterror]
contains the error text.
onError="Continue"
This
is the most flexible way to handle error messages, but you have
to program all further actions in your InputScript. In the case
of an error message, the script is continued with the statement
after the
Enter
statement.
The variable
V[_lasterror]
contains the error text. Among other things you can now correct
certain values with "Set", and then enter a new function code.
Please observe:
- Some of the
normal entry fields might be read-only in the case of an error.
- All statements
between
Enter ...
onError="Continue"
and the
next
Screen
command
are executed only if an error message is produced by
Enter.
Otherwise they are skipped.
- It is also possible
to use
Enter ...
onError="Continue"
several
times within one
Screen
block,
e.g. to try several input values. Example:
Screen
...
Set
F[Material]
"abc"
Enter
"/5"
onError="Continue"
// The
following statements are executed in the case of an error message
Message
"Material abc
not found"
Set
F[Material]
"xyz"
Enter
"/5"
onError="Continue"
// The
following statements are executed in the case of a 2nd error message
Message
"Material xyz
not found"
Set
F[Material]
"M-01"
Enter
"/5"
|
wait= |
Parameter in milliseconds between 0 and 60000 (1 minute). The Enter is performed
after the specified number of milliseconds. |
-visible
|
The current screen is displayed. Most often used in conjunction
with
wait=. |
Enter "/scrollToLine=..."
table=
|
Scrolling in a table on the screen. Specify the table name and a
line number, starting with 1.
In list output, scrolling
is possible as well; no table name needs to be specified in this
case.
|
Enter control="controlName"
item="itemId" event="eventNo"
|
Clicking a button or selecting a menu in a special control (like
object services). Please use the "Input Recording" to create the
control, item and event. Example:
Enter control="DIALOGCTRL.Toolbar"
item="CREATE_ATTA"
event="2"
For simple actions,
this command allows to automate some of SAP's special controls.
More complex control handling is possible with "SAP GUI scripting";
please see
Overview SAP GUI Scripting
|
Enter
"/searchHelp"
techName=...
|
Calls SAP searchhelp.
Additional parameters as in InputField. |