‎2007 Oct 29 10:30 AM
Hi,
I have internal table with 30 records, but i need 1st record only. how to remove the remaining records. otherwise i want separate out the 1st record. plz give me the code how to do this.
gowri
‎2007 Oct 29 10:33 AM
Hi Gowri,
Use
read table itab index 1.
it will work fine.
Reward point if helpfull.
Srimanta
‎2007 Oct 29 10:31 AM
Hi
loop at itab into wa from index 1.
write wa.
endloop.
Thanks
Vasudha
Message was edited by:
Vasudha L
‎2007 Oct 29 10:33 AM
Hi Gowri,
use up to 1 row in your select query.
Reward points if it helps,
Satish
‎2007 Oct 29 10:33 AM
Hi Gowri,
Use
read table itab index 1.
it will work fine.
Reward point if helpfull.
Srimanta
‎2007 Oct 29 10:41 AM
Hi,
If you want to keep the first record of your internal table then do this way.
data: wa like itab.
read table itab into wa index 1.
if sy-subrc = 0.
clear itab.
refresh itab.
move wa to itab.
append itab.
endif.
‎2007 Oct 29 10:35 AM
hi,
Try this if it works for u
loop at itab.
if not sy-tabix eq 1.
DELETE ITAB INDEX SY-TABIX.
endif.
endloop.
‎2007 Oct 29 10:35 AM
‎2007 Oct 29 10:40 AM
Hi Gowri,
You solve your problem by writing the following code for your internal table.
loop at itab.
delete itab index 2.
endloop.
Reward if useful.
Regards,
Shilpi
‎2007 Oct 29 10:47 AM
loop at itab.
if sy-tabix ne 1.
DELETE ITAB INDEX SY-TABIX.
endif.
endloop.
try this code
reward if useful.