Changing the Value of a Counter

You can increase or decrease the value of a SAPSCRIPT-COUNTER_x (x=0.. 9) counter variable by 1, before the current counter value is printed.

Syntax:

&SAPSCRIPT-COUNTER_x( + )& Increases by 1 the contents

of the counter variable x

(x=0.. 9)

&SAPSCRIPT-COUNTER_x( - )& Decreases by 1 the contents

of the counter variable x

(x=0.. 9)

If you want to change the value of a counter variable without actually printing the new value, use this formatting option together with an additional option to set the output length to 0 (see above). If you want to set a counter variable to some specific value, use the DEFINE control command.