10-11-2007 9:31 AM
I got a internal table name g_itab1.
currently my g_itab1 has a FNAME(50) component.
Inside my component there is ADMINO, EYEAR, FIRSTNAME, LASTNAME and CONTACT.
I want to clear away ADMINO, EYEAR, FIRSTNAME, LASTNAME and CONTACT inside my internal table.
How do i clear it? i have tried using CLEAR g_itab1.
It doesn't work.. the data are still inside.
10-11-2007 9:33 AM
10-11-2007 9:33 AM
Hi,
Use Refresh Statement.
Refresh will clear the contents of both the header line and the body of the internal table. Free will clear both and release the memory allocated as well.
Syntax :
REFRESH itab.
Thanks.
10-11-2007 9:33 AM
10-11-2007 9:33 AM
10-11-2007 9:34 AM
10-11-2007 9:35 AM
Hi
You can use :
REFRESH g_itab1.
or
CLEAR g_itab1[] . "Delete the records from the BODY
Both statements will delete the Entire records from itab.
REWARD IF hELPFUL.
10-11-2007 9:35 AM
Hi
if you want remove total then go for <b>refresh itab.</b>
if you want to go for some fields then use <b>DELETE itab where</b>
<b>Reward if usefull</b>
10-11-2007 9:36 AM
use this.
CLEAR g_itab1[]. " FOR BODY CLEAR
REFRESH g_itab1. " FOR HEADER CLEAR
Message was edited by:
Amit Singla
10-11-2007 9:38 AM
hi
DELETE TABLE itab WITH TABLE KEY k1 = v1 ... kn = vn.
Example to delete all of the lines between 5 and 36 in a table of names where the entry begins with one of the letters 'A' to 'C'.
DELETE itab FROM 5 TO 36 WHERE NAME CA 'ABC'.
reward if useful
regards
sree
10-11-2007 10:53 AM