Monday, April 12, 2010

Delete not used master data



You can delete the values that are not used from a characteristic using the report RSDMD_DEL_BACKGROUND.You have to execute the report with the following parameters:
P_IOBJNM = (Technical name of time characteristic)
P_CHABNM = (Technical name of time characteristic)
P_DELSID = ‘X’
P_DELTXT = ‘ ‘
P_OBJ = RSDMD
P_SUB = MD_DEL
P_EXT = ‘ ‘
P_NOPROT = ‘ ‘
It takes a long time if you have lots data in the table.
Another way, delete and reload all seems better, but never try.
While it is true that the reason why you cannot delete master data is because of referential integrity checks between MD and data in the infoproviders it should be noted that these are surrogate keys and not the actual key values (ie. customer id, employee #, etc). Assuming that you are not looking to change these but rather the attributes hanging off of these you can do the following:
adjust the /BI0/Q and /BI0/P tables using SE14 (activate and adjust  database - drop contents). This will delete the contents of the time dep and time indep master data tables.
do the same for the text tables assuming that you have this, you may have to also do this for the navigational attributes tables, again assuming that these have been turned on at the infoobject level.
Do NOT touch the /BI0/S table since this provides the link to your infoproviders.
 reload your master data.

0 comments: