Repeater
You use this action to cycle through an XML node set, which consists of any XML nodes that are members of the same hierarchical level in the XML document. The Repeater
action does the following:
Starts with the first member of the node set
Performs a task using information from the first node
Moves to the next node
The action cycles through the nodes until all members of the node set are addressed.
The properties for this action are listed in the following table:
Property | Data Type | Access | Use |
| Boolean | In and out | The XPath expression that performs the iteration through the desired XML node set. For example, to cycle through each row of data returned from a tag query, the following expression is used: You do not need to understand XPath expressions to create this action. To automatically create the proper XPath, you can search for available transaction properties and documents and select the For example, if you use You must define the |
| XML | Out | The current XML segment of this action. |
| Boolean | In and out | Stops execution of this action. The action cycles until the break condition is true or it iterates through all node sets. If the value is true, it breaks. If it is false, it continues repeating. |
| Integer | In and out | Defines the loop counter value. |
| Integer | In and out | Indicates the item that is being read. |
| Boolean | In and out | Determines whether the action passed or failed. If it failed, error information is displayed in the server trace log. |
If you use a query action, an XML document is returned as the result. If you want to perform a set of tasks for each row in the result set, you can use the Repeater
action to loop through each row. All actions that follow the Repeater
action are executed for each node set.
In another example, a Repeater
action is configured based on the Aggregate Query action. For each dataset row returned in that query, the following occurs:
A calculation is performed and the result is written to a database through a SQL query.
An XML document is saved.
A blue connector line with the circle between the Repeater
action and the Calculation action indicates that all child sequences of that connection are repeated for each row of data the Repeater
action processes.
A gray line to the XML Saver action indicates that the XML Saver
action runs only once.
Since all transactions run top to bottom and left to right, the XML Saver
action does not run until the Calculation
and SAP KPI Update actions have run for each repeating element.