SAP Function Modules

RSDMDD_DELETE_MASTER_DATA SAP Function module - Packetized delete master data







RSDMDD_DELETE_MASTER_DATA is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name RSDMDD_DELETE_MASTER_DATA into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: RSDMDD
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM RSDMDD_DELETE_MASTER_DATA - RSDMDD DELETE MASTER DATA





CALL FUNCTION 'RSDMDD_DELETE_MASTER_DATA' "Packetized delete master data
  EXPORTING
    i_iobjnm =                  " rsdiobjnm     Name of characteristic whose master data should be deleted
*   i_t_chavl =                 " rsd_t_chavl   Table with CHAVL values of the master data to be deleted
*   i_flag_delete_all = RS_C_FALSE  " rs_bool   Should all master data (independent of _t_chavl) should be deleted?
*   i_flag_delete_sids = RS_C_FALSE  " rs_bool  Should the SIDs be deleted also?
*   i_flag_dialog = RS_C_TRUE   " rs_bool       Should a deletion dialog be opened?
*   i_flag_delete_texts = RS_C_TRUE  " rs_bool  Should the texts be deleted also?
*   i_flag_force_delete = RS_C_FALSE  " rs_bool  Should not-used master data be deleted, if parts are used?
*   i_flag_simulation = RS_C_FALSE  " rs_bool   Should deletion be only simulated?
*   i_flag_log = RS_C_TRUE      " rs_bool       Should log information be written during deletion?
*   i_usage_protocol = RS_C_TRUE  " rs_bool     Should a detailed where-used-list be created?
    i_search_mode = 'O'         " rsmd_uc_checkmode  Mode: Where-used list check for master data
*   i_t_expr =                  " rsds_texpr    Select conditions for selective deletion
*   i_storage_selection = '*'   " rsda_storage_selection  Read access NLS ONLINE DB or both
*   i_store_usage_list = RS_C_FALSE  " rs_bool
*   i_reuse_usage_list = RS_C_FALSE  " rs_bool
  IMPORTING
    e_prot_object =             " balhdri-object  Application Log: Object Name (Application Code)
    e_prot_subobject =          " balhdri-subobject  Application Log: Sub-object
    e_prot_extnum =             " balhdri-extnumber  Application Log: External Identification
    e_t_msg =                   " rsdmd_t_balmi  Messages created during the deletion
    e_t_valsid_used =           " rrsi_t_valsid  CHAVL+SID of the not-deleted values
    e_count_used =              " i             Number of not-deleted values
    e_result =                  " i             Result
    .  "  RSDMDD_DELETE_MASTER_DATA

ABAP code example for Function Module RSDMDD_DELETE_MASTER_DATA





The ABAP code below is a full code listing to execute function module RSDMDD_DELETE_MASTER_DATA including all data declarations. The code uses the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the original method of declaring data variables up front. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8).

DATA:
ld_e_prot_object  TYPE BALHDRI-OBJECT ,
ld_e_prot_subobject  TYPE BALHDRI-SUBOBJECT ,
ld_e_prot_extnum  TYPE BALHDRI-EXTNUMBER ,
ld_e_t_msg  TYPE RSDMD_T_BALMI ,
ld_e_t_valsid_used  TYPE RRSI_T_VALSID ,
ld_e_count_used  TYPE I ,
ld_e_result  TYPE I .

DATA(ld_i_iobjnm) = 'Check type of data required'.
DATA(ld_i_t_chavl) = 'Check type of data required'.
DATA(ld_i_flag_delete_all) = 'Check type of data required'.
DATA(ld_i_flag_delete_sids) = 'Check type of data required'.
DATA(ld_i_flag_dialog) = 'Check type of data required'.
DATA(ld_i_flag_delete_texts) = 'Check type of data required'.
DATA(ld_i_flag_force_delete) = 'Check type of data required'.
DATA(ld_i_flag_simulation) = 'Check type of data required'.
DATA(ld_i_flag_log) = 'Check type of data required'.
DATA(ld_i_usage_protocol) = 'Check type of data required'.
DATA(ld_i_search_mode) = 'Check type of data required'.
DATA(ld_i_t_expr) = 'Check type of data required'.
DATA(ld_i_storage_selection) = 'Check type of data required'.
DATA(ld_i_store_usage_list) = 'Check type of data required'.
DATA(ld_i_reuse_usage_list) = 'Check type of data required'. . CALL FUNCTION 'RSDMDD_DELETE_MASTER_DATA' EXPORTING i_iobjnm = ld_i_iobjnm * i_t_chavl = ld_i_t_chavl * i_flag_delete_all = ld_i_flag_delete_all * i_flag_delete_sids = ld_i_flag_delete_sids * i_flag_dialog = ld_i_flag_dialog * i_flag_delete_texts = ld_i_flag_delete_texts * i_flag_force_delete = ld_i_flag_force_delete * i_flag_simulation = ld_i_flag_simulation * i_flag_log = ld_i_flag_log * i_usage_protocol = ld_i_usage_protocol i_search_mode = ld_i_search_mode * i_t_expr = ld_i_t_expr * i_storage_selection = ld_i_storage_selection * i_store_usage_list = ld_i_store_usage_list * i_reuse_usage_list = ld_i_reuse_usage_list IMPORTING e_prot_object = ld_e_prot_object e_prot_subobject = ld_e_prot_subobject e_prot_extnum = ld_e_prot_extnum e_t_msg = ld_e_t_msg e_t_valsid_used = ld_e_t_valsid_used e_count_used = ld_e_count_used e_result = ld_e_result . " RSDMDD_DELETE_MASTER_DATA
IF SY-SUBRC EQ 0. "All OK ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_e_prot_object  TYPE BALHDRI-OBJECT ,
ld_i_iobjnm  TYPE RSDIOBJNM ,
ld_e_prot_subobject  TYPE BALHDRI-SUBOBJECT ,
ld_i_t_chavl  TYPE RSD_T_CHAVL ,
ld_e_prot_extnum  TYPE BALHDRI-EXTNUMBER ,
ld_i_flag_delete_all  TYPE RS_BOOL ,
ld_i_flag_delete_sids  TYPE RS_BOOL ,
ld_e_t_msg  TYPE RSDMD_T_BALMI ,
ld_e_t_valsid_used  TYPE RRSI_T_VALSID ,
ld_i_flag_dialog  TYPE RS_BOOL ,
ld_e_count_used  TYPE I ,
ld_i_flag_delete_texts  TYPE RS_BOOL ,
ld_e_result  TYPE I ,
ld_i_flag_force_delete  TYPE RS_BOOL ,
ld_i_flag_simulation  TYPE RS_BOOL ,
ld_i_flag_log  TYPE RS_BOOL ,
ld_i_usage_protocol  TYPE RS_BOOL ,
ld_i_search_mode  TYPE RSMD_UC_CHECKMODE ,
ld_i_t_expr  TYPE RSDS_TEXPR ,
ld_i_storage_selection  TYPE RSDA_STORAGE_SELECTION ,
ld_i_store_usage_list  TYPE RS_BOOL ,
ld_i_reuse_usage_list  TYPE RS_BOOL .

ld_i_iobjnm = 'Check type of data required'.
ld_i_t_chavl = 'Check type of data required'.
ld_i_flag_delete_all = 'Check type of data required'.
ld_i_flag_delete_sids = 'Check type of data required'.
ld_i_flag_dialog = 'Check type of data required'.
ld_i_flag_delete_texts = 'Check type of data required'.
ld_i_flag_force_delete = 'Check type of data required'.
ld_i_flag_simulation = 'Check type of data required'.
ld_i_flag_log = 'Check type of data required'.
ld_i_usage_protocol = 'Check type of data required'.
ld_i_search_mode = 'Check type of data required'.
ld_i_t_expr = 'Check type of data required'.
ld_i_storage_selection = 'Check type of data required'.
ld_i_store_usage_list = 'Check type of data required'.
ld_i_reuse_usage_list = 'Check type of data required'.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name RSDMDD_DELETE_MASTER_DATA or its description.