2009 Jul 02 2:56 PM
Hi,
How can we delete data from dynamic internal table...
I have a dynamic internal table <fs_dyn_table> which is of type any and can have any fields...
I want to delete all those records which have a value of '10' in a field named field1
I have written my delete statement in the following manner..
DELETE <fs_dyn_table> WHERE field1 = '10'.....but it is not working...it gives me an error...stating that the line type of table must be statically defined.
2009 Jul 02 3:01 PM
Hi,
Loop on the internal table into a field-symbol of line type same as the internal table.
Use assign component statement and then delete the corresponding record.
Regards,
Ankur Parab
Hi,
How can we delete data from dynamic internal table...
I have a dynamic internal table <fs_dyn_table> which is of type any and can have any fields...
I want to delete all those records which have a value of '10' in a field named field1
I have written my delete statement in the following manner..
DELETE <fs_dyn_table> WHERE field1 = '10'.....but it is not working...it gives me an error...stating that the line type of table must be statically defined.
2009 Jul 02 3:01 PM
Hi,
Loop on the internal table into a field-symbol of line type same as the internal table.
Use assign component statement and then delete the corresponding record.
Regards,
Ankur Parab
2009 Jul 02 3:02 PM
Ankur...thanks for the reply...
What you have suggested is DELETE statement inside LOOP...which is not feasible as there might be more than lacs of record...
2009 Jul 02 3:11 PM
2009 Jul 02 3:21 PM
2009 Jul 03 6:40 AM
Thanks Avinash...the answer given by Rich Heilman is same as Ankur's...
It gives me a feeling that this is the only way...we cannot avoid the delete statement inside the LOOP.
2009 Sep 08 8:16 PM
Hi,
Try this
data : key(4) value 'field1'.
DELETE <fs_dyn_table> WHERE (key) = '10'
Regards
Ramakrishna L
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |