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

Question about 'write' statement

Former Member
0 Likes
404

Hi,

A question on write statement.

I have a internal table itab which has field var. I am looping at this itab and writing horizontal heading output like below.

example on the output heading:

(3 spaces) itab-var (20 spaces) itab-var (20 spaces) itab-var.

the coding is:

loop at itab.

write: 3 itab-var.

endloop.

I want to increase the space by 20 for every loop. How to increase this 3 by 20? Can we accomplish this way?

Thank you for your time.

1 ACCEPTED SOLUTION
Read only

naimesh_patel
Active Contributor
0 Likes
384

Try like this:


DATA: L_POS TYPE I.
L_POS = 3.

DO 3 TIMES.
  WRITE: AT L_POS(20) 'Test'.
  L_POS = L_POS + 20.
ENDDO.

Regards,

Naimesh Patel

2 REPLIES 2
Read only

naimesh_patel
Active Contributor
0 Likes
385

Try like this:


DATA: L_POS TYPE I.
L_POS = 3.

DO 3 TIMES.
  WRITE: AT L_POS(20) 'Test'.
  L_POS = L_POS + 20.
ENDDO.

Regards,

Naimesh Patel

Read only

Former Member
0 Likes
384

hi krishen,

just add 20 inside the loop , so that after every loop its value increases by 20

for example:

data: v type i.

v=3.

do 3 times.

write: at v(20).

v=v+20.

end do.

hope it will help you

regards

Rahul sharma

Edited by: RAHUL SHARMA on Sep 4, 2008 7:47 AM