Maximum Size of Dynamic Data Objects
- An upper limit for the amount of digits in strings and rows in internal tables results from the fact that they are adressed internally and in ABAP statements via 4 byte integers, which limits them to 2147483647.
- The size of strings and hash tables is limited by the biggest memory block that can be requested in one chunk. This is a maximum of 2 GB and is usually further limited via the profile parameter ztta/max_memreq_MB. For strings, the value of the profile parameter directly represents the maximum size that can be occupied. The maximum amount of rows in hash tables depends on the required size of the hash administration that has to be stored there. Currently, it can be calculated from the largest power of two that fits into the value of the profile parameter divided by 8. For example, if the profile parameter specifies 250 MB, a hash table can contain a maximum of roughly 16 million entries (128 times 1024 to the power of two divided by 8).
The actual maximum size is generally smaller than given by the above limits, since the overall available memory is normally not only used by a string or an internal table.
If there is only little memory space available, it may be better to use an internal table, because its memory space is requested in blocks, while the entire memory space required for a string must always be free as a whole.