ABAP Generation Limit

Every program that we create in ABAP has to be converted to machine readable format. The conversion process is called as Compiling/Generation of the program. This compilation process happens when we activate any object and after activation it gets saved to database.
Programs are always converted in their entirety, a conversion unit is always one program (report, module pool, function group, class pool, subroutine pool). During the conversion, the includes used by the program are expanded. An include itself is not a conversion unit, but only ever part of a conversion unit. The load generated for a conversion unit is a load unit. It is always transported to the main memory in its entirety. Therefore, if a function module is called, the whole load for its respective function group must be loaded. The same applies when calling methods and external subroutines.
When we run any ABAP program some part of it loaded into memory from the database which is the case for many programming languages you may know if you have any programming background.
SAP has provided programmers with a tool to check for the Generation limit.
For any of the above mentioned conversion unit you can goto menu path as per screen shown below and check for the limits.
There is no actual technical limit for the load size, but overlarge load units do have a negative effect on the performance of the entire system.
SAP has given some guidelines on the limits of the load size.
Depending on the load size, the system displays different icons:
Icon Load size
Green Light          < 500 K
Yellow Light 500 K - 1 MB
Red Light 1 MB - 2 MB
Danger > 2 MB
If the load is larger than 1MB it would be sensible to restructure the program.
There are technical constraints for following resources in a ABAP unit:

  • Global Variables
  • Generic Global Field Symbols
  • Components (of structures etc)
  • Literals
  • Entry Points
  • Jumps
  • Defined Classes
  • Defined Interfaces
  • Nested Interfaces
  • Defined Events
  • Defined Methods
  • Exception Classes in Raising Clauses
  • FRIEND Specifications
  • Implemented Interfaces
  • Classes Used
  • Interfaces Used
  • Attribute Accesses Using Reference Chains
  • Accesses using Chains with Interfaces
  • Access in Boxed Components

There is also a restriction for the local data of a procedure (method, function module, form routine).
  • Local Data
You can see the results for any ABAP units generation limits shown in below screen shot.