cancel
Showing results for 
Search instead for 
Did you mean: 

Master data Where-used

Former Member
0 Kudos

Hi,

Has anybody used function module RSDDCVER_USAGE_MDATA_BY_SID, any info you can provide will be helpful.

I need to delete a few million unused records from a master data table and am thinking of writing ABAP to do that. In the program I would like to check if the records are being used anywhere before I pass them to RSDMD_DEL_MASTER_DATA for deletion. I think this function module can be used for this purpose but I am having a little trouble with the parameters and all the different return values.

Thanks,

S.M

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

SM,

Why don’t you select the records you want to delete from the InfoObject->Maintain Master data option and choose delete, and it shall complain in case if it used?

_RJA

Former Member
0 Kudos

Deletion through maintain master data option times out because it runs the deletion in dialogue. Also I do not want to delete all unused records. There are some that are not used but are valid and I would like to keep those.

I was hoping I could select all the obsolete records based on some selection criteria and delete only those.

edwin_harpino
Active Contributor
0 Kudos

hi,

try following parameter for RSDMD_DEL_MASTER_DATA ?

I_IOBJNM [object name]

I_FLG_DELETE_ALL X

I_FLG_DELETE_SIDS X

I_FLG_DELETE_SIDS_ASK

I_FLG_DELETE_TEXTS X

I_T_CHAVL 0 Entries

I_FLG_DIALOG

I_FLG_FORCE_DELETE X

I_FLG_SIMULATION

I_WITHOUT_PROTOCOL

Former Member
0 Kudos

So can I just call this function directly and it will check to see if any of the values are referenced and skip those. Also do you know what the following parameters do

I_FLG_FORCE_DELETE

I_WITHOUT_PROTOCOL

edwin_harpino
Active Contributor
0 Kudos

hi,

you can just call this function directly or try attach code (program se38, can be scheduled in background and multiple infoobjects).

I_FLG_FORCE_DELETE = Delete Parts When Everything Cannot Be Deleted.

- i think it means if not all master data can be deleted then 'force' to delete that can be deleted master data.

I_WITHOUT_PROTOCOL = No Log for 'X' as to Where What is Being Used

- sorry, have no idea with this, maybe related with log, let it blank there may be log generated

REPORT Z_DEL_MASTER .

tables : RSDIOBJ.

select-options:

s_iobj for RSDIOBJ-IOBJNM.

start-of-selection.

loop at s_iobj.

call function 'RSDMD_DEL_MASTER_DATA'

exporting

I_IOBJNM = s_iobj-low

I_FLG_DELETE_ALL = 'X'

I_FLG_DELETE_SIDS = 'X'

  • I_FLG_DELETE_SIDS_ASK

I_FLG_DELETE_TEXTS = 'X'

  • I_T_CHAVL 0 Entries

  • I_FLG_DIALOG = ''

I_FLG_FORCE_DELETE = 'X'.

  • I_FLG_SIMULATION = ''

  • I_WITHOUT_PROTOCOL = ''

endloop.

Answers (2)

Answers (2)

Former Member
0 Kudos

Were you able to get the function RSDDCVER_USAGE_MDATA_BY_SID working? I think I am missing something in my parameters since the function keeps aborting. Any help would be appreciated?

Former Member
0 Kudos

Thanks A.H.P, this really helps!!

Former Member
0 Kudos

Hi SM: Could you delete the Master Data...Please let me know as I have to do this work....Thanks