SAP Function RSDMD_DEL_MASTER_DATA - Deleting Master Data

Parameter Reference Type Length Default Optional Text
I_FLG_DELETE_ALL RS_BOOL C 1 ' ' X All Master Data Is To Be Deleted
I_FLG_DELETE_SIDS RS_BOOL C 1 'X' X SID Table Entries Are to Be Deleted
I_FLG_DELETE_SIDS_ASK RS_BOOL C 1 ' ' X Dialog for Request of Parameter I_FLG_DELETE_SIDS
I_FLG_DELETE_TEXTS RS_BOOL C 1 'X' X Delete Texts As Well
I_FLG_DIALOG RS_BOOL C 1 'X' X With Dialog
I_FLG_FORCE_DELETE RS_BOOL C 1 ' ' X Delete Parts When Everything Cannot Be Deleted
I_FLG_SIMULATION RS_BOOL C 1 ' ' X Boolean
I_IOBJNM RSDIOBJ-IOBJNM C 30 Characteristic
I_T_CHAVL RSD_T_CHAVL 0 X Table of Values to Be Deleted
I_WITHOUT_PROTOCOL RS_BOOL C 1 ' ' X No Log for 'X' as to Where What is Being Used

Parameter Reference Type Length Text
E_PROT_EXTNUM BALHDRI-EXTNUMBER C 100 Application Log: External number
E_PROT_OBJECT BALHDRI-OBJECT C 20 Application log: Object name (Application code)
E_PROT_SUBOBJECT BALHDRI-SUBOBJECT C 20 Application Log: Sub-object
E_RESULT I I 4 Result
E_T_PROTOCOL RSDMD_T_BALMI 0 Messages
E_T_SIDVAL_USED RRSI_T_VALSID 0 Master Data Used
E_T_ULIST_ATR_NAV RSDDV_T_ULIST_ATR 0 Master Data as Navigation Attribute
E_T_ULIST_DIM RSDDV_T_ULIST_DIM 0 Master Data in Dimensions (InfoCubes)
E_T_ULIST_HIE RSDDV_T_ULIST_HIE 0 Master Data in Hierarchies
E_T_ULIST_HIE_NODE RSDDV_T_ULIST_HIE_NODE 0 Master Data in Hierarchy Nodes
E_T_ULIST_ODSO RSDDV_T_ULIST_ODSO 0 Master Data in ODS Objects
E_T_ULIST_QUERY RSDDV_T_ULIST_QUERY 0 Master Data in Queries

Exception Text
CHKTAB_NOT_GENERATED The Master Data Table Was Not Generated
ENQUEUED Master Data or Text Table Already Locked
ILLEGAL_INPUT Incorrect Input
IOBJ_ERROR Error in InfoObject
NO_AUTHORITY No Authorization to Delete Master Data
NO_CHKTAB No Master Data Table Available
PROGRAM_ERROR Error during Creation of Deletion Program
QUEUE_ERROR Error during Locking or Unlocking
RSDPW_ERROR
SID_ERROR Error during SID Drag

Functionality
This module deletes all master data belonging to an InfoObjectoptionally (if you set the flag I_FLG_DELETE_ALL) or a given amount(that given in I_T_CHAVL) as long as it is not being used elsewhere(for example in an InfoCube, in a hierarchie or as an attribute).Only unused master data is deleted.
The returned table specifies where which SIDs are being used. In orderto save time with the where-used list, only the first use found for eachSID is specified. If you delete it there, it is possible that it has notbeen deleted the next time. You can then look in the table again to seewhere the current SID is being used.
Furthermore, when all of the master data is to be deleted, only the
first 1000 pieces of data used are displayed since the process takesplace in the background afterwards.The return value e_result delivers the result of deleting.
Import parameters:
i_iobjnm: The characteristic for which the master data is to be deleted.
i_flg_delete_all: All of the master data for this characteristic are tobe deleted. If this flag is not set, the table i_t_chavl must be filled.
i_flg_delete_texts: These texts are also to be deleted.
i_t_chavl: A table of master data that should be deleted.Do not set Flag I_flg_delete_all if you only want to deleted thesevalues.
i_flg_dialog: If this flag is set, messages will tell you and after itis clear whether and how many can be deleted, you will be asked if youwant to do this. If this flag is not set, there will be no communicationin this regard. If all of the desired master data cannot be deleted thennone will be deleted.
Export parameters:
e_result: Return value:
0: All master data is deleted.
1: All unused master data was deleted.
2: The deleting process was started in the background.
3: There is no master data available.
4: No master data was deleted: Either because all of it was in use orbecause the user did not wish to delete when asked, or because themodule with i_flg_display = ' ' was called and parts of the master dataare still being used.
5: An error occurred during deleting.
e_t_ulist_dim: This table specifies the data that is being used indimension tables for InfoCubes.
e_t_ulist_atr_nav: This table specifies the data that is being used asa navigation attribute.
e_t_ulist_hie: This table specifies the master data that is being usedin hierarchies.
e_t_ulist_hie_node: In dieser Tabelle sind die Stammdaten, die inHierarchieknoten verwendet werden, angegeben.

Description
The result can accept the following values:
rsdmd_c_all_deleted: All of the desired master data was deleted
rsdmd_c_parts_deleted: Not all of the master data could be deleted,because some of it was still being used.
rsdmd_c_bg_started: The background process for deletion was started.This only occurs when all of the master data for the characteristic isto be deleted, but some of it is still being used.If all of it can be deleted, a background process is not started.A background process is also not started when a table of values to bedeleted was tranferred.
rsdmd_c_none_deleted: No master data was deleted. This is becausenot all of the data could be deleted and either the module was calledwithout dialog or the function was called with dialog and the user
decided against deleting.
rsdmd_c_none_deleteable: None of the master data was deleted becauseall of it was still being used.
rsdmd_c_error : An error occurred.

Description
is set when all master data is to be deleted.

Default
' ' (false)

Description
is set when the texts are also to be deleted

Default
'X'

Description
If this indicator is set, you will be told whether all of the masterdata can be deleted and asked whether you would like to do that. If theindicator is not set, no such communication will take place. If not allof the master data can be deleted in this case, none of it will bedeleted and e_result will be set to rsdmd_c_none_deleted

Default
'X'

Description
This indicator is for the case when a Chavl table is transferred andthe dialog indicator is off.
If it is set master data that is not in use will be deleted.If it is not set master data will only be deleted when no master recordis being used in the Chavl table.

Default
rs_c_false

Description
Characteristic for which master data are to be deleted

Description
Table with the values to be deleted. This table is only considered wheni_flg_delete_all has been set to FALSE.

1703799HANADB: Incorrect old master data deletion