Tuesday, December 13, 2016

How big a generated ABAP program can be?

In some of ABAP applications that generate pretty heavy volume of ABAP code while generation there can be following ABAP dump observed:

GEN_BRANCHOFFSET_LIMIT_REACHED

The dump refers to fact that ABAP code is too large to get it generated. Means there are too many lines of code that generated program gets too big and thus cannot be compiled.
Messages observed here can be like following:

"Jump distance is too large and cannot be generated."
"Jump is too great and cannot be generated."

In BW this may happen in very large ABAP includes ZXRSRU01   (FM EXIT_SAPLRRS0_001) where all custom BEx variable are stored. Here is a large CASE/ENDCASE statement where all the BEx variables are stored. Solution is here is to split one big CASE/ENDCASE into several ones e.g. per different projects or inforareas available in the system.


What it is actually means from technical point of is that there are so called jumps within the generated code and in case there is not enough space to store whole content of jump then the ABAP code can’t be generated. The jump represent smallest logical unit of code that must be placed in one generated code (jump). E.g. IF/END or CASE/ENDCASE statement. Code inside of these statement must be exists within same jump. The jump should not be greater than 32768 bytes (32kB) for internal load format. The 32kB roughly corresponds to around 10,000 of ABAP statements.

No comments: