‎2006 May 16 2:38 PM
i have itab , and i want to delete the first column how i do it?
‎2006 May 16 2:45 PM
If you want to clear the contents, then it can be done.
loop at itab.
clear itab-field1.
modify itab.
endloop.
but it is not possible to delete it.
What you can do is move all the contents of itab to itab2 which has all the fields exept the first colum.
loop at itab.
move-corresponding itab to itab2.
append itab2.
endloop.
delete table itab.
Regards,
Ravi
‎2006 May 16 2:39 PM
‎2006 May 16 2:48 PM
‎2006 May 16 2:56 PM
‎2006 May 16 2:39 PM
‎2006 May 16 2:41 PM
Loop at int_table.
clear itab-VBELN.
modify int_table.
endloop.
‎2006 May 16 2:45 PM
If you want to clear the contents, then it can be done.
loop at itab.
clear itab-field1.
modify itab.
endloop.
but it is not possible to delete it.
What you can do is move all the contents of itab to itab2 which has all the fields exept the first colum.
loop at itab.
move-corresponding itab to itab2.
append itab2.
endloop.
delete table itab.
Regards,
Ravi
‎2006 May 16 2:53 PM
2 problems?
1.i work with WA.
2.it delete the mandt but i have 3 space at the beging
‎2006 May 16 2:57 PM
You can delete the data, but the column will still be there, showing the space. If you don't want that column in your internal table, then remove it from the internal table structure.
You mentioned that you are using WA. Here is some sample.
Loop at itab into wa.
clear wa-field1.
modify itab from wa.
endloop.Regards,
Rich Heilman
‎2006 May 16 6:09 PM
hi,
as our friend Suresh said,
if its the first record that you want to delete...
*----
delete itab index 1.
loop at itab.
<display recors>
endloop.
*----
cheers,
Aditya.