11-26-2007 9:11 AM
Hi,
I have some records in internal table, i want to delete some records from the internal table how to do that?
For example in my internal table i have records with the key KSCHL. i want to del one record from the internal table if the kschl value = zfi4.
How to do this?
Mohana
11-26-2007 9:35 AM
Hi Mohana,
It is always not advisable to delete records from an itab,try to have a sepeate flag for deletion indicator and then you can use logic as per this.
regards,
kavitha
11-26-2007 9:12 AM
DELETE TABLE ITAB WITH TABLE KEY KSCHL = 'ZF14'.
Message was edited by:
Muthurajan Ramkumar
11-26-2007 9:13 AM
PARAMETERS p_carrid TYPE scarr-carrid.
DATA scarr_tab TYPE SORTED TABLE OF scarr
WITH UNIQUE KEY carrid.
SELECT *
FROM scarr
INTO TABLE scarr_tab.
DELETE TABLE scarr_tab WITH TABLE KEY carrid = p_carrid.
11-26-2007 9:15 AM
Hi,
delete itab where keyfield1 = <value>
and keyfield2 = <value2>..
regards,
Omkar.
11-26-2007 9:17 AM
Hi
Use the below code snippet.
DELETE itab where field1 < '0.010' and field2 < '0.010'.
<b>Reward if useful.</b>
11-26-2007 9:22 AM
Hi,
Do like this
DELETE TABLE ITAB WITH TABLE KEY KSCHL = 'ZF14'. otherwise
Loop at itab.
if itab-kschl = 'ZF14'.
delete itab.
endif.
endloop.
Regards,
Prashant
11-26-2007 9:35 AM
Hi,
sort the internal table and u can use DELETE ADJACENT DUPLICATES FROM itab.
hope this helps...
regards,
karthik.
11-26-2007 9:35 AM
Hi Mohana,
It is always not advisable to delete records from an itab,try to have a sepeate flag for deletion indicator and then you can use logic as per this.
regards,
kavitha