NEWS 01/2013 --> Standard SAP Abap, apply note 1622324
In my case I want repair the entries in the dimensional table in order to remove these unused.
In the transaction RSRV isn't possible to run the repair in background.
I searched the abap code for this correction, and put these in the report; it's only a function module :)
From SE38 it's possible run the correction in background.
that's all
the code:
*&---------------------------------------------------------------------* *& Report ZRSDRD_DIM_REMOVE_UNUSED *& *&---------------------------------------------------------------------* *& *& From DelihiTech Blog by Pipex *&---------------------------------------------------------------------* REPORT ZRSDRD_DIM_REMOVE_UNUSED. TYPES: rsd_s_tbhd LIKE rsdtbhd. "table header TYPES: BEGIN OF rsd_s_cube. "infocubes INCLUDE STRUCTURE rsdcubev. TYPES: ddstate TYPE rsd_s_tbhd-ddstate, "state of View END OF rsd_s_cube. TYPES: rsd_infocube TYPE rsd_s_cube-infocube, rsd_ts_infocube TYPE SORTED TABLE OF rsd_infocube WITH UNIQUE KEY table_line. PARAMETERS: p_cube TYPE RSD_INFOCUBE, p_dim TYPE RSD_T_DIME , p_check as CHECKBOX DEFAULT 'X'. CALL FUNCTION 'RSDRD_DIM_REMOVE_UNUSED' EXPORTING I_INFOCUBE = p_cube I_T_DIME = p_dim I_CHECK_ONLY = p_check I_COMMIT_AFTER_N = 50000 I_REPORT_ONLY_N = 5 * IMPORTING * E_REPAIR_POSSIBLE = * CHANGING * C_T_MSG = EXCEPTIONS X_MESSAGE = 1 OTHERS = 2 . IF SY-SUBRC <> 0. MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. ENDIF.
Nessun commento:
Posta un commento