Tuesday, May 19, 2009

Switching off SAP BW reports from production

First note that technique described in this post is not advisable to follow. Take it as a pure cheating of system and be aware that this activity might cause inconsistencies within your BW queries. Anyway sometimes it is necessary to do not allow users to access reports. Of course normal way would be that you lock users in SAP system in order to prevent them to log to system. This can be done via basis transaction. In case you running BW as global system with some other SAP solution running in same system even in different clients (like ECC+BW+SCM+PLM… etc) you cannot effort to do this. Therefore I tried to play with BW stuff in order to switch off reports from production.
There are 2 changes that you need to make:

Table RSZCOMPDIR contains directory of all report’s components and it has field OBJSTAT (referring to domain RSOBJSTAT) describing status of query or component of query. It can have following values:

ACT    Active, executable
INA    Inactive, not executable
OFF    Switched off
PRO    Productive

Once you change value of this field from ACT to INA value you achieve that report will NOT be run able anymore.

Table RSRREPDIR contains directory of reports and it has field same OBJSTAT (referring to same domain) describing status of query or component of query.

Once you change value of these 2 fields from ACT to INA value for Active version of objects (OBJVERS = ‘A’) you achieve that report will NOT be run able anymore. E.g. BEx Analyzer shows your report while you try to search it but if you attempt to run it you receive message:

Query cannot be generated here. Correct it in Query Designer. R9E 977
Query definition D5OLML1YXH9DEMU34HWGJ0XX0 could not be read. BRAIN  252D..
Query ZMM_Q03_3X_VERSION could not be opened. BRAIN 635
>> Row: 37 Inc: CONSTRUCTOR Prog:CL_RSR_OLAP_VAR RS_EXCEPTION 301CL_RSR_OLAP_VAR






You can write some small and handy ABAP routine to do this in batch mode for a range of reports.

No comments: