‎2007 Nov 13 9:57 AM
Hi
In C program we have concept of array a(i) where we can increment the i value
Similarly i want to increment my variable in abap program is tht possible if yes can any one explain me...
Thanks in advance.
Maya
‎2007 Nov 13 10:01 AM
Hi,
use like this var = var +1. to increment the variable
Regards,
Prashant
‎2007 Nov 13 10:02 AM
yes it can be possiable.
data i type i.
do 10 times
i = i + 1.
write i.
enddo.
‎2007 Nov 13 10:02 AM
HI,
here we don't have a concept like arrays.
use internal table instead of that.
internal table is also a group of different data types,in which we can store number of records.
rgds,
bharat.
‎2007 Nov 13 10:05 AM
in string u ahve concept called offset....check it....
data : a type string,
b(1) type c.
a = 'abcdef'.
b = a+0(1).
write 😕 b.
b = a+1(1).
write 😕 b.
*check this...!!!!
data : c type i.
c = 5.
b = a+c(1).
write 😕 b.
try using this...!!!
u can increment variable c in above program...!!!!
but for grouping different types of fields.......then <b>internal table</b> is option...!!!!
‎2007 Nov 13 10:16 AM
Hi,
There is no concept of arrays in ABAP, we use internal tables to hold application data. U can use access internal tables with index.
Read table itab index l_index this is same as u do in case of arrrays a(l_index)
*reward if helped*