05-09-2006 12:20 PM
Hi Experts,
In my SAP Script form inside a window and teh element I need to have a counter variable that counts how many times that element is being called.
The calling program cannot be changed since it is a Standard SAP program.
I need to have it in the SAP script.
How can I do that.
Regards,
Arul jothi A
05-09-2006 12:24 PM
hi
&SAPSCRIPT-COUNTER_x& (x = 0.. 9):
These fields represent ten counter variables that you can use in your text and forms for any counting purposes. You can use the + and - formatting options to increment or decrement a counter before its value is printed. You can use the DEFINE control command to assign any specific value to a counter.
check the link
http://help.sap.com/saphelp_47x200/helpdata/en/d2/cb3d07455611d189710000e8322d00/frameset.htm
cheers,
Abdul
05-09-2006 12:38 PM
Hi Abdul,
It's giving an error message Text element 'SAPSCRIPT-COUNT not found.
05-09-2006 12:41 PM
hi use &SAPSCRIPT-COUNTER_x&.go thru the document in the above link as well..
It will work fine..
Cheers,
Abdul
05-09-2006 1:58 PM
05-09-2006 2:21 PM
Hello Arul,
DEFINE &SAPSCRIPT-COUNTER_1& = 0.
when u want to increment the counter then use + to increment.