02-15-2008 9:02 AM
Hi All,
I have a field symbol <fs_table> that points to a dynamically created internal table. And I have a field symbol <fs_wa> that points to each row in that table.
How do I delete a row from <fs_table> using <fs_wa>.
In short, I want to write something like
DELETE <fs_table> FROM <fs_wa>
But the above statement doesnot work.
Please suggest me a way of doing the same.
Any suggestions would be of great help.
Regards,
Ashish Walke
02-15-2008 9:10 AM
Hi,
You can either use a LOOP AT... ENDLOOP and the DELETE within the LOOP, or use DELETE .... INDEX.
Regards,
John.
02-15-2008 9:10 AM
Hi,
You can either use a LOOP AT... ENDLOOP and the DELETE within the LOOP, or use DELETE .... INDEX.
Regards,
John.
02-15-2008 9:24 AM
Hi John,
Thanks for replying !!!
I dont have the index. So I can loop through the table and delete. But if the no. of entries are too many then that would take a toll on the performance.
Can you suggest any alternative ... its really very urgent
Also, what would be the syntax of deleteing it within the loop ?
A code extract would be very helpful
Regards,
Ashish
02-15-2008 9:32 AM
Hi Ashish,
Don't worry about the performance as it is an internal table. I'm not able to test in on a system, but the code should be something like:
LOOP AT <table> INTO <wa>.
IF <condition>
delete <table> INDEX syst-tabix.
ENDIF.
ENDLOOP.
Regards,
John.