cancel
Showing results for 
Search instead for 
Did you mean: 

SAPSCRIPT-COUNTER

Former Member
0 Kudos

Hi All,

I want to use the &SAPSCRIPT-COUNTER_X& variable .

but when i give it

as

/: DEFINE &SAPSCRIPT-COUNTER_1& = 1

...

...

/: &SAPSCRIPT-COUNTER_1& = &SAPSCRIPT-COUNTER_1(+)&

i am getting the error command expected in the above line while checking.

please tell me whether the syntax is correct ..

or suggest some way to use the counter...

thanks in advance,

Sathanbabu Mathan Kumar

Accepted Solutions (1)

Accepted Solutions (1)

amit_khare
Active Contributor
0 Kudos

First use control command DEFINE to declare the counter

/: DEFINE &SAPSCRIPT-COUNTER_x&

and then use this command to increase by 1 the value of the variable

/: &SAPSCRIPT-COUNTER_x(+)&

Check this link to know more -

http://help.sap.com/saphelp_47x200/helpdata/en/d2/cb3d07455611d189710000e8322d00/frameset.htm

Regards,

Amit

reward all helpful replies.

Answers (2)

Answers (2)

Former Member
0 Kudos

no need to give like

/: &SAPSCRIPT-COUNTER_1& = &SAPSCRIPT-COUNTER_1(+)&

just give..

/: &SAPSCRIPT-COUNTER_1(+)&

this would increment the value.

reward if it helps u...

Former Member
0 Kudos

Hi!

If you want to add 1 to the counter:

/: &SAPSCRIPT-COUNTER_1& = &SAPSCRIPT-COUNTER_1& + 1

Regards

Tamá