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

No comments: