‎2008 Sep 03 10:58 PM
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.
‎2008 Sep 03 11:05 PM
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
‎2008 Sep 03 11:05 PM
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
‎2008 Sep 04 6:47 AM
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