‎2007 Jul 16 7:32 AM
Hi guys,
could anybody help me in this.
There are 5 records in this internal table. (1,2,3,4,5)
loop at itab.
check itab-number = '3'.
delete table itab.
write: itab-number.
endloop.
Here the out put is: 3.
what 'DELETE' statement will do here.
‎2007 Jul 16 7:35 AM
Hi,
Note that itab is a table with Headerline. and itab means headerline and itab[] is the table.
In your case DELETE statements has removed that row or record from the table.
But it is still there in the Headerline <b>itab</b> so it gets displayed with WRITE.
But the table will not have that record.
Check by executing this code.
LOOP AT ITAB.
WRITE: itab-number.
ENDLOOP.
<b>You can use CLEAR ITAB. after DELETE statement to clear the headerline.</b>
Regards,
Sesh
‎2007 Jul 16 7:35 AM
Hi,
Note that itab is a table with Headerline. and itab means headerline and itab[] is the table.
In your case DELETE statements has removed that row or record from the table.
But it is still there in the Headerline <b>itab</b> so it gets displayed with WRITE.
But the table will not have that record.
Check by executing this code.
LOOP AT ITAB.
WRITE: itab-number.
ENDLOOP.
<b>You can use CLEAR ITAB. after DELETE statement to clear the headerline.</b>
Regards,
Sesh
‎2007 Jul 16 7:42 AM
‎2007 Jul 16 7:37 AM
hi Venkat ,
The delete stmt will delete the record , but in your case u r displaying the work area values , so u r getting the out put as 3 .
Regards,
Ranjita
‎2007 Jul 16 8:05 AM
loop at itab.
check itab-number = '3'.
delete itab. " Modified
write: itab-number.
endloop.
This will serve your purpose . This will delete the third line of your internal table .
Earlier you were deleting the table and displaying the entries of Work area