In an IF statement, a logical expression with the IS INITIAL parameter is used to check whether ITAB is empty. In this program, an internal table ITAB is filled and then initialized with REFRESH. You can check whether an internal table is empty by using the following logical expression: The system then reserves memory space again. Like REFRESH, FREE works on the table body, not on the table work area.Īfter a FREE statement, you can address the internal table again. You can also use the FREE statement to reset an internal table and to release its memory directly, without using REFRESH or CLEAR beforehand. You can release the memory with the FREE statement as follows: The square brackets after the name of the internal table refer to the body of the internal table.Īfter using REFRESH or CLEAR to initialize an internal table, the system keeps the space in memory reserved. To reset the whole internal table without clearing the table work area, use either the REFRESH statement or the CLEAR statement as follows: If you are working with an internal table with a header line, the CLEAR statement clears only the table work area as explained in Resetting Values to Default Values. If you are working with an internal table without table work area, you can use the CLEAR statement instead of the REFRESH statement as follows: This means that the table contains no lines. This statement resets an internal table to the state before it was filled. To initialize an internal table with or without a header line, you use the REFRESH statement as follows:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |