Showing posts with label generated objects. Show all posts
Showing posts with label generated objects. Show all posts

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.

Monday, March 9, 2015

BW upgrade: not possible to display generated program for Transformation

After physical import of support packages into the BW system in case of SAP BW upgrades there may all kinds of errors occur. One of very common ones are related to the transformations. During the upgrade the transformations are reset which means generated programs behind them need to be regenerated. This can be done via ABAP report called RSDG_TRFN_ACTIVATE. This report can be used to reactivation of transformations which means the GP* will be reactivated or to just check what transformations are inactive.


There is a functionality within the UI of transformation (weather it is TA RSA1 or RSTRANGUI) which allows to see the GP* which is behind the particular transformation. It is accessible via menu Extras -> Display Generated Program.








While accessing this function for transformation which is broken we can run into the following error:

Unable to find a tool to process the request
Message No. SEU_MANAGER026

To solve this first it is necessary to have a look at what stage the transformation is. If there are errors (e.g. Transformation XYZ contains invalid rules Message No. RSTRAN344) with the transformation indicated by Check function then most likely the TRFN has no GP* generated and it even can’t be generated because there is no entry in table TRDIR for the transformation. In this case solve the issue within source and target objects of the transformation. Afterwards see the transformation itself.

In case all objects around the transformation look okay see if there are any SAP Notes applicable. This is especially valid for lower releases of BW than 7.0.

Monday, October 7, 2013

How to get rid of GP* reports

So called GP or Generated Programs are behind some BW functionalities like transformations or BW queries. Existence of obsolete GP reports in SAP BW systems may cause problems. Here I’ providing a one example. Imagine a case of transformations when business logic is coded in ABAP includes. If for some reason name of ABAP include changes e.g. because of change in ABAP naming convention a new ABAP include is included in GP. As transformations get reactivated and as it changes it GP* report name we have in system also old GP* where still old ABAP include is included. If we want to delete old ABAP include it is not possible as there is still an old GP* report where old include is included. So we are in in stalemate situation.

What are possibilities to get rid of obsolete GP* report?

1. Run report SAP_DROP_TMPTABLES. However this report has also downside. It will delete all GP* reports in the system. This will cause that almost everything (see 1139396 - Temporary database objects in BW 7.X, 449891 - Temporary database objects in BW 3.x) w/o taking into account whether or not they are still in your system. So you will be in need of regeneration of a lot of objects. Therefor usage of this report is no-go.

2. You can write small ABAP report which will delete obsolete GP*. As template you can use code below. You can have similar program in all the systems in your landscape. But at least put GP* name on selection screen to make this small program re-usable.
DATA: lv_rep TYPE REPID.
lv_rep = 'GP4TV9WHSM6L4CTUFESVKHU9AN8'.
DELETE REPORT lv_rep.
IF sy-subrc = 0.
  WRITE: / 'GP* deletion OK'.
ELSE.
  WRITE: / ' GP* deletion NOK'.
ENDIF.


What would be other options? Hmm… good question. Actually I raised this topic to SAP via tool called Idea Place. So far no progress on this topic. Apparently it was not promoted by enovty people L