Skip to Content
0
Apr 23, 2009 at 01:47 PM

How do I delete rows from an internal table?

32 Views

Hi,

I have a simple block of code that reads rows from an internal table (already populated from a database table) and displays the data on the screen with a WRITE statement.

Just for practice I am trying to delete the rows from the internal table after I have displayed them.

Here is the code that I have so far, but this is not correct. Can someone please tell me how to code the DELETE statement?

Thank you!

Andy

LOOP AT it_zmember01 INTO wa_zmember01.

WRITE: / wa_zmember01-mnumber UNDER 'NUMBER',

wa_zmember01-mname UNDER 'NAME',

wa_zmember01-mdob UNDER 'DOB'.

WRITE / '----


'.

DELETE it_zmember01 FROM wa_zmember01.

ENDLOOP.