Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

array concept

Former Member
0 Likes
648

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

5 REPLIES 5
Read only

former_member386202
Active Contributor
0 Likes
621

Hi,

use like this var = var +1. to increment the variable

Regards,

Prashant

Read only

Former Member
0 Likes
621

yes it can be possiable.

data i type i.

do 10 times

i = i + 1.

write i.

enddo.

Read only

Former Member
0 Likes
621

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.

Read only

Former Member
0 Likes
621

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...!!!!

Read only

Former Member
0 Likes
621

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*