Wednesday, March 19, 2014

How to remove unused items in cube dimension?

As BW developer you may need to remove some characteristics from cube’s dimension. This is needed in case e.g. you do remodel of your cube. You may even need to remove whole dimension(s) in same case. While you remove all characteristics from the dimension issue with while reactivating the cube can happen. In such a rare case you simply won’t be able to activate the cube. There will be error message asking to input some characteristics into the dimension.


Usually we turn to TA RSRT for help. While running test called "Entries Not Used in the Dimension of an InfoCube" in the RSRT you will get same message asking to input characteristics. Running the RSRT in repair mode will not help again. Fortunately there is a ABAP report which solves situation like this. The report is called ZSAP_DIM_CLEANER and is provided by SAP Note: 1622324 - Cleaning up BW Infocube Dimension Tables. For all the details how to use the tool refer to above mentioned note and also to following one: 1978286 - Cleaning up BW InfoCube dimension tables.

5 comments:

cyril raffin said...

Hello,

First of all congratulations for your blog that is a wonderful source of inspiration for me.

Concerning the topic, what is the difference between the tootl you describe and the tool already existing in RSRV --> All elementary Tests --> Transaction Data --> Entries not used in the dimension of an infocube.

Thanks again for your work.

Regards,

Cyril

sapper said...

Hi Cyril,

what I found out the RSRT -> All Elementary Tests -> Transaction Data -> "Entries Not Used in the Dimension of an InfoCube" run FM RSDRD_DIM_REMOVE_UNUSED. Then the FM called other standard FM modules which do teh removal.

On other hand the tool ZSAP_DIM_CLEANER runs operation of unsused dimension removal directly on database level (DELETE (dtablnm) FROM TABLE l_t_dim.) w/o any interface other to standard functionality like any other FM.

So all in all TA RSRT does it in more standard way and the tool does it in more dirty way if you will :-).

PS: I'm glad you enjoy my blog!

cheers
sapper

Cyril said...

Hi sapper,

Thanks for your explanation. I confirm this abap is very efficient !

Thanks again for your blog,

Cyril.

Luis Felipe Fernandez Moreno said...

Hi everyone!!!

How can i import that program ZSAP_DIM_CLEANER into BW? Or how can i delete the unused dimensions from an infocube executing the tx RSRV? after i follow the rute RSRV --> All elementary Tests --> Transaction Data --> Entries not used in the dimension of an infocube. It shows me a message 16:19:34 on 08.05.2015: Test run for user LFERNANDEZ completed. And the dimension is not deleted.

Please help me with this issue.

Luis Felipe

Martin Maruskin said...

Hi Luis,

Regarding import of the program: Just go to the Note: http://service.sap.com/sap/support/notes/1622324
and there you will find attachment called: ZSAP_DIM_CLEANER.zip - download it and unpack. Once you have an ABAP source code use tcode SE38 to create new ABAP report. Just copy&paste the source code. Once you activate the code; the ABAP report is ready to be used. To use it just follow instructions provided in the Note.

Actually while just using RSRV -> All elementary Tests -> Transaction Data this is only test which will tell you either there are some unused dimensions or not. To physically remove these you need to run ABAP report ZSAP_DIM_CLEANER.

cheers