Entering content frame

Background documentation repeat Statement Locate the document in its SAP Library structure

Purpose

Repeats a substitution a given number of times.

Syntax

repeat expression times statement end

Description

If a certain area in the HTML page is to be repeated several times, and the loop index is not involved, this can be done simply by using this statement.

Examples

`repeat 10 * c times` <td> `end`

Both the repeat and for statements allow you to perform repeated substitution in HTML Business expressions. They force the Internet Transaction Server (ITS) to perform a substitution multiple times. These statements allow you to include R/3 step loops in HTML pages and structure them as you like.

The following table shows some example uses:

repeat

for

`repeat 10 times`
<p></p>
`end`

`for(i=1;i<=10;i++)`
<p></p>
`end`

`repeat with i in FIELD_OP`
<option value="`i`">
`end`

(No equivalent for statement.)

`repeat with i from 1 to FIELD_OP.dim`
<option value="`FIELD_OP[i]`"> `FIELD_BZ[i]`
`end`

`for(i=1; i<=FIELD_OP.dim; i++)`
<option value="`FIELD_OP[i]`"> `FIELD_BZ[i]`
`end`

For further information on the repeat statement, see:

repeat with <reg> in <field>

repeat with <reg> from <expn> to <expn>

For information on the for statement, see:

for Statement

Leaving content frame