Skip to Content
0
Former Member
Jun 19, 2006 at 07:22 AM

How to delete rows from the internal table intab?

102 Views

I'm trying to delete rows from an internal table, but though the program gets activated the rows don't get deleted from the table! The rows that should not be deleted are the ones whose locno value is contained in select option p_sup, all others should be deleted.

SELECT-OPTIONS: p_sup FOR p_prdsel,

DELETE intab

WHERE locno NOT IN p_sup AND

COMMIT WORK.

When this didn't work I then also tryed to import the rows - with the values of locno that should be kept in intab - in an internal table intab1. The rows that should be deleted are the ones whose locno value is in intab1~locno.

DELETE intab

WHERE locno NOT IN intab1-locno.

This failed with the error: "intab1 is a table without a header line and therefore has no component called "LOCNO"".

Does anybody have an idea about why the above mentioned delete codes failed or how I should go about to delete rows from an internal table when select option or another internal table (intab1) contain rows that should not be deleted (NOT IN) from intab?