Improving the Quality of ABAP Code by Paul David Hardy

Improving the Quality of ABAP Code by Paul David Hardy

Author:Paul David Hardy
Language: eng
Format: epub
ISBN: 9781484267110
Publisher: Apress


Unhappy Medium

You can get the situation where the user asks for a large amount of data and the report just manages to get all of that data before timing out. The user will be presented with an ALV grid with thousands of rows and the really obscure message, “Memory Full. Leave the transaction before taking a break.” What that means is that the report has consumed so much memory it is causing the system as a whole grief and the system desperately wants the user to back out of the transaction and release all that memory. Thus, if the report finishes 30 seconds before lunch hour, the message suggests the user leave the transaction before going to lunch. However, I have seen people interpret the message the opposite way and think the computer is telling them to take a break, which they then do, and go off and have a cup of coffee or something. In any event, in your custom programs you can do something to help avoid this situation—if you have global (or member) internal tables that get merged into one main result table, then FREE them the instant you think they will never be needed again. A CLEAR or REFRESH on an internal table will not release the memory, but a FREE will. As someone on the internet observed, one programmer once called an internal table WILLY just so they could write FREE WILLY when the table was no longer needed.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.