Changing the Value of a Counter

Procedure

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.

&SAPSCRIPT-COUNTER_x(+)&

Increases the counter variable x (x=0.. 9) by 1

&SAPSCRIPT-COUNTER_x(-)&

Reduces the counter variable x (x=0.. 9) by 1

If you want to change the value of a counter variable without actually printing the new value, use the additional option of setting the output length to 0. If you want to set a counter variable to a specific value, use the DEFINE control command to assign this value.