2007 Dec 27 5:02 AM
i want to detect if the program evaluated has FREE'd all its internal table after use. but i just can't search for the word 'FREE itab' because there might be some subroutines in that program that can fill the internal table again. and subroutines are not arranged according to execution.
2007 Dec 27 5:55 AM
i want to detect if the program evaluated has FREE'd all its internal table after use. but i just can't search for the word 'FREE itab' because there might be some subroutines in that program that can fill the internal table again. and subroutines are not arranged according to execution.
2007 Dec 27 5:05 AM
Hi,
Usually REFRESH is used to clear contents of Internal table & FREE is used to release the memory id.
Please search for REFRESH.
Best regards,
Prashant
2007 Dec 27 5:30 AM
Ok. i can search for the word REFRESH. but what if somewhere after the REFRESH code, the table was filled up again in a PERFORM statement(subroutine).this subroutine can be placed anywhere in the program right? how can i detect at the end of the program that the internal table is really initial?
2007 Dec 27 5:44 AM
Sorry, i am not having problems with clearing or freeing i_tabs. My problem is how can i detect the codes of another program if his internal tables are cleared or freed at the end of his program.
2007 Dec 27 5:50 AM
It's because this can happen:
Form f_fill_itab.
Select belnr
from bsad
into i_tab.....
Endform
Refresh i_tab.
Perform f_fill_itab.
Even though there is a REFRESH statement, the i_tab can still be filled up
2007 Dec 27 5:15 AM
Hi Rico,
The FREE statement has the same effect as the CLEAR statement for any data objects except internal tables.
For internal tables, FREE has the same effect as the REFRESH statement, though the entire memory area occupied by the table rows is released, and the initial memory area remains unoccupied. If dobj is a structure with table-like components, the memory of each table-like component is released.
Regards
Nimesh S. Patel
2007 Dec 27 5:16 AM
Hi,
If the internal tables used are without Header Line then CLEAR ITAB would do the same work as that of Refresh Itab.
Search for Clear as well.
Regards,
Lalit
2007 Dec 27 5:37 AM
Well, in that case if its a Z program, then i would recommend to validate the same at the end of program.
if not itab[] is initial.
write :/ 'Internal table is not empty !' .
else.
write :/ 'Internal table is empty !'.
endif.
2007 Dec 27 5:55 AM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |