‎2007 May 04 2:21 PM
ho to all my querry is as follows
i want the report output as follows
i have 3 fields in report output
custno
123 345 345 678 456 213
custname
suman kumar sunil sudhir suresh sudha
location
skl chennai pune mumbai hyd vsp
i mean i have 3 fields in my int table and total 6 records in int table how shold i handle get the output as above
pls send me the code
its urgent
‎2007 May 04 2:23 PM
Hi
Loop at itab.
Write:/ internal table fields.
endloop.
Regards,
Sreeram
‎2007 May 04 2:26 PM
Hi, try this.
WRITE:/ 'CUSTNO'.
SKIP 1.
LOOP AT ITAB.
WRITE: ITAB-CUSTNO, ' '.
ENDLOOP.
SKIP 2.
WRITE:/ 'CUSTNAME'.
SKIP 1.
LOOP AT ITAB.
WRITE: ITAB-CUSTNAME, ' '.
ENDLOOP.
SKIP 2.
WRITE:/ 'LOCATION'.
SKIP 1.
LOOP AT ITAB.
WRITE: ITAB-LOCATION, ' '.
ENDLOOP.
This might help you.
Regards,
Hemant.
‎2007 May 04 3:23 PM
Hi,
Try the follwing code.
loop at itab.
write : itab-custno.
give a new line.
endloop.
follow the above same lines for remaining fields.
Reward if helpful.
Bye.
‎2007 May 04 4:05 PM
Hi sunil,
loop at table 3 times, speed-optimized
field-symbols:
<line> type any,
<field> type any.
do 3 times.
loop at itab assigning <line>
at first.
case sy-index.
when 1.
write: 'custno', /.
when 2.
write: 'custname', /.
when 3.
write: 'location', /.
endcase.
endat.
assign component sy-index of structure <line> to <field>.
Write <field>.
endloop.
enddoRegards,
Clemens