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

hello

Former Member
0 Likes
345

suppose in an internal table in one field i have value 20.now i want to write that value like :-

1

2

3

4

.

.

.

like this. in a column of a internal table..whats the procedure.

1 ACCEPTED SOLUTION
Read only

abapdeveloper20
Contributor
0 Likes
327

Hi,

Check this simple code... It will work.

Loop at itab.

clear : count.

do itab-field1 times.
count = count + 1.
itabnew-field1 = count.
append itabnew.
enddo.

endloop.

Reward if useful

~Lakshmiraj~

2 REPLIES 2
Read only

Former Member
0 Likes
327

Try doing this... not sure if it's going to work, for I didn't test.



loop at gt_table into wa_table.

  clear v_counter.

  do wa_table-field times.
    Add 1 to v_counter.
    move v_counter to wa_destiny.
    append wa_destiny to gt_destiny.  
  endloop.

endloop.

Read only

abapdeveloper20
Contributor
0 Likes
328

Hi,

Check this simple code... It will work.

Loop at itab.

clear : count.

do itab-field1 times.
count = count + 1.
itabnew-field1 = count.
append itabnew.
enddo.

endloop.

Reward if useful

~Lakshmiraj~