Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Delete rows of IT using field symbol

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

You can either use a LOOP AT... ENDLOOP and the DELETE within the LOOP, or use DELETE .... INDEX.

Regards,

John.

3 REPLIES 3

Former Member
0 Kudos

Hi,

You can either use a LOOP AT... ENDLOOP and the DELETE within the LOOP, or use DELETE .... INDEX.

Regards,

John.

0 Kudos

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

0 Kudos

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.