The looping capability are planned to be shipped with SAP Solution Manager 7.1 SP13
Alternatively you can implement following notes in advance:
A test script may need to perform actions against an unknown number of entries in a table. The script may therefore need to:
It can be used to iterate over several steps. It defines where the loop starts.
The CounterName parameter provides the name of the iteration counter. This counter is incremented automatically at runtime while iterating over the included steps. The actual value of the counter can be retrieve using the regular token syntax.
For instance, when CounterName is set to "COUNTER" its value can be reused in the subsequent steps using %COUNTER% (or $COUNTER$ for specific situations where the percent character is ambiguous).
If you plan to use nested loops please make sure to declare a different counter names.
CounterName: Specifies the the name of the iteration counter.
It must be used within a loop that has been defined using the DO and the LOOP keywords. The EXIT_DO keyword interrupts the loop as soon as the condition is met.
A typical use case is to check the value of iteration counter that has been declared via the CounterName parameter of the DO keyword.
For instance, when CounterName is set to "COUNTER" its value can be checked using the %COUNTER% token.
The operators supported are the ones below:
An additional operator is supported when testing WEB applications (i.e.: applications running in the browser):
The options parameter lets you perform some adaptations or conversions of both the left and right operand before comparing them.
The supported options are:
It defines the end of the loop and must be used together with the DO keyword which defines where the loop starts.
The following scripts was created for transaction VA02 (Change Sales Order) to add shipping information for each line item of an existing sales order.
With DO Keyword the loop starts and the counter is set to ‘1’.
To be able address the row number starting at ‘0’ we take the counter number minus ‘1’ using the CBTA_A_SETINEXECUTIONCTXT component.
Then the scripts reads the value of the first row in the first column to check if an entry exists.
If the value is empty we exit the loop with the EXIT_DO keyword.
Otherwise the scripts performs the required actions for the current row
With the LOOP keyword the script goes back to the DO keyword while increasing the counter and processing further line items of that sales order.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
12 | |
10 | |
10 | |
7 | |
7 | |
7 | |
6 | |
6 | |
5 | |
4 |