<< Click to Display Table of Contents >> Navigation: 4. AddOn Components > MR Connect for use with SAP® > WSP. - Wait for SAP® State |
MiniRobotLanguage (MRL)
WSP. Command
Wait For SAP® Event
Intention
This command is useful to have your script wait until certain conditions are met or not met.
Examples:
WSP.![Max. Wait]|connection exists
WSP.[Max. Wait]|sapgui exists
WSP.[Max. Wait]|version>700.32
WSP.[Max. Wait]|version=700.32
WSP.[Max. Wait]|version!700.32
Syntax
WSP.[Timeout in s]|Subcommand[P1]
Parameter Explanation
These general Rules apply:
1. If you omit the Variable for the Result of the command, the result will be stored on the stack.
2. Session numbers are counted from 1 to 6 as usual.
3. If you omit the connection number, a 1 is used as default number.
4. If there was a problem a session number of zero may be returned and the timeout flag will be set. Otherwise the timeout flag will be cleared.
5. All Subcommands have a long name that is better readable, and a short abbreviation that saves you typing. You can choose which one you prefer.
6. If the state does not change within a given time, the timeout-flag will be set.
7. If you prefix the time-value with a "!" then the condition value is negated and we are waiting for just the opposite condition.
The following subcommands are currently supported:
"Connection","Connection Exists","ce."
Waits for a connection to an SAP® system to exist.
Example:
' Wait endless time
WSP.|ce.
' Wait 25 seconds
WSP.25|ce.
' Wait that connection breaks within 25 seconds
WSP.!25|ce.
"Sapgui","Sapgui Exists","se."
Waits for SAP® Logon to be loaded/unloaded.Example:
WSP.|se.
' Wait 25 seconds
WSP.25|se.
' Wait that it is unloaded within 25 seconds
WSP.!25|se.
"SapGuiInstalled","si."
Checks if SAP® GUI for Windows® is installed.
Example:
WSP.|si.
' Wait 25 seconds
WSP.25|si.
' Wait that it is uninstalled within 23 seconds
WSP.!(20+5)|si.
"Version","ve."
Wait for the SAP® GUI Scripting to have a specified version compared against a given value. You can use the Operators:
= - Test for Equality (Version=)
! - Test for NOT Equal (Version NOT Equal to)
> - Test for Version higher then
< - Test for Version lower then
Example:
WSP.ve.>7300.248
Example
'*****************************************************
WSP.!34|connection exists
WSP.14|sapgui exists
WSP.$$TIM|version>700.32
WSP.$$SEC|version=700.32
WSP.(($$AUT+4)*$$FAK)|version!(700.32+$$NUM)
Remarks
-
Limitations:
If a session is busy, it can't executes SAP® GUI Scripting. Each procedure inside MCFS discovers the status of a session. If a session is busy, "Connect to SAP® " jumps over the command and will does nothing. In some cases you may get the timeout flag set.
See also:
• ! Smart Package Robot 's Addon for use with SAP® (Connect to SAP®)