‎2007 Mar 22 7:17 PM
I need to start a counter
counter ++ does not work
any other way to assign it besides count = count + 1 ?
‎2007 Mar 22 7:20 PM
No, that is the way to code unlike C language. You can use statements like ADD 1 TO counter.
‎2007 Mar 22 7:19 PM
Hi,
What is wrong with this code?
data: count type i.
loop at itab.
count = count + 1.
endloop.
Please paste your code ....
Regards,
Ferry Lianto
‎2007 Mar 22 7:20 PM
‎2007 Mar 22 7:20 PM
No, that is the way to code unlike C language. You can use statements like ADD 1 TO counter.
‎2007 Mar 22 7:27 PM
Hi Megan, there is nothing like that in ABAP as of yet. But you can simulate it using a macro. AGain the use of special characters such as ++ is not suggested(it will give a syntax warning).
report zrich_0001 .
data: counter type i.
define counter++.
counter = counter + 1.
end-of-definition.
do 10 times.
counter++.
enddo.
write:/ counter.
Regards,
Rich HEilman
‎2007 Mar 22 7:25 PM
Hi,
data: begin of numbers,
one type i value 1,
two type i value 1,
end of numbers,
counter type i.
add numbers-one then numbers-two until numbers-two to counter.
aRs