Incorrect Master Data Deletion
In this document I’ll discuss about an efficient method suggested by SAP to delete incorrect or obsolete master data from the system.
Need
There are many scenarios, in which we will get incorrect master data in the BW system due to incorrect entries maintained in the source systems or wrong configurations during the data load.
Consider a business scenario in which it has quite large amount of vendors for service. After a period of time, these vendors may have opted out for this business. So, these vendors are become obsolete.
The BW system maintains all the vendor master data most of which has become obsolete. So, it’s a good practice to delete incorrect master data as and when needed.
Program to delete Incorrect Master data
SAP has suggested a program to delete incorrect master data from the system. This program can be executed in SIMULATE mode also where in we can keep a tab on what are all the master data that are deleted.
Program: RSDMDD_DELETE_BATCH
Detailed Description
Step 1: Go to transaction SE38 and execute the program RSDMDD_DELETE_BATCH
Step 2: Enter your InfoObject name for which the incorrect master data has to be deleted. Once you have entered the name of the infoObject, you can choose the selection conditions using ‘Filter Data’ for which the master data has to be deleted.
Besides, there are some options which we should be aware of.
- P_DELSID
- P_DELTXT
- P_SIMUL
- P_LOG
- P_PROT
- P_SMODE
P_DELSID – Checking this option will delete the entries in the SID table of the characteristic. This is optional. If we have to reload the particular master data, SID will be generated again and hence consuming more time during data load.
It is always a good practice not to delete the entries in the SID table as deletion of SID table may in some cases lead to data inconsistencies.
P_DELTXT – Checking this option will delete the texts of the corresponding master data
P_SIMUL –This option allows to run the program in a simulation mode. Checking this option will not actually delete the master data, but will give a result of master data that are deleted or not deleted due to references in any other infoproviders and not found.
We can run a simulate mode by which the master data that are deleted for our selection criteria.
This option avoids accidental deletion of used master data.
P_LOG – This option will generate logs for the deletion of master data
P_PROT – This option will generate logs for the detailed usage of the protocol, that is in what manner, the master data has been deleted.
P_SMODE : Where-used check mode. The available modes are
- O – One usage per value is enough
- E – Existence Check
- A – All usage of the values
- C – Consistency check
We can choose option O, (One usage per value is enough). If a master data is used in any of the infoprovider, the first search hit will be taken for logs and will not search in any other infoproviders. This saves time in searching the used master data again in other infoproviders.
The rest options for P_SMODE is self explanatory.
Deletion of Master Data
Once selecting the infoObject with filter conditions and choosing appropriate options for deletion, we can go for deletion of the master data. We can run it in foreground or can be scheduled in background also.
Checking logs for the Master data deletion
Goto transaction SLG1 and give object type and subobject type as below with appropriate date/time parameters.
After giving the needed input, the logs will be displayed as below.
Clicking the details icon in the Details column from the below log will give the list of master data deleted by the program.
Very good doc...
Thanks Sathya! However this has become rarely used when you're in BW 7.3 or higher.
Br, H
Why it should be rarely used in BW 7.3?
Hi Jonathan,
In BW 7.3 onwards, most of the above functions are directly available when you directly delete master data from an infoobject. (Simulation, where-used check etc.,)
Br, H
Hi Harish,
Useful information..thanks for sharing 🙂 .
Regards,
Ganesh Bothe
Thanks Ganesh
Thanks for Sharing Harish.
Regards,
Poorna
Thanks for the comments Poorna 🙂
Thanks Haris great explication; it's very complete.
Regards.
Thanks Eric for your valuable comments.
Br, H
Its good document about master data deletion.
Thanks,
Phani.
Appreciate your comments Phani 🙂
Br, Harish
Hello Harish,
First of all Congratulations for this very good document. Thanks for sharing !
On question on Simulation : P_SIMUL -- If I have to delete the Master Data, then I have to uncheck this option. Correct ??? If Checked (flaf ON) then check boxes to P_DELSID / P_DELTXT are still relevant or hold value ???
Thanks in Adv !
Regards
YN
Thanks for your comments Yogesh.
Your're correct. When P_SIMUL flag is checked, it'll just give the list of master data that are going to be deleted based on your seletion condition.
You can run simulation mode, if you're not sure about the entries that are going to be deleted.
Br, Harish
Good one.
Since I'm replacing the use of rsdmd_del_background in a financially sensitive process chain, I need to be careful. Can someone tell me what these old parameters translate to in the new program?
P_CHABNM (was set to same as iobjnm)
P_OBJ (was set to rsdmd)
P_SUB (was set to md_del)
It looks like to me these three old settings are moot when using the new program, but I want to be sure.