on 2007 Oct 30 9:38 AM
Hi all,
I encounter a little diffculty using BW (3.0) in my APO system (4.0) : I have a process chain that allow me to load daily R/3 datas into a BW/APO infocube, that works perfectly. The problem is that the volume of datas naturally keeps on growing, so I'd want to create a new step in the process chain, that would allow to make selective deletion in the cube.
For example, after every data loading in the infocube, datas of the cube that are dating of more than x days should be removed. I just can't find a process that allows me to do that, but only"complete deletion of data target contents", or "delete overlapping requests from infocube".
Maybe I could use a program or a routine but is there a standard program for selective deletion ?
I'm quite sure there's an easy way to do that but.... Anyone got an idea please ?
Many thanks !
Fabrice
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
Giving you a sample program, based on 'Rajan Surulivel's Suggestion.
& Description : Program to purge data from CUBE . All data whose &
& OCALDAY whichs is less than 3 years from Current&
& date will be deleted. &
&----
&----
Data Declarations
&----
DATA: w_maxdate TYPE d,
w_date(10),
w_ans.
TYPES: BEGIN OF ty_ods_list,
ods_name TYPE rsdodsobject,
text(20),
END OF ty_ods_list.
DATA: it_cube_list TYPE TABLE OF ty_ods_list,
wa_list TYPE ty_ods_list,
it_msg TYPE rs_t_msg,
it_thx_sel TYPE rsdrd_thx_sel,
it_sx_sel TYPE rsdrd_sx_sel,
wa_range TYPE rsdrd_s_range.
DATA: w_defdat TYPE d,
w_fiscal(7),
w_year(4),
w_month(3),
w_num_month(3) TYPE n,
w_fisper TYPE char7 ,
w_sydate8 TYPE char8,
w_last_day TYPE d,
W_GJAHR LIKE T009B-BDATJ, "FISCAL YEAR
W_POPER LIKE T009B-POPER. "POSTING PERIOD
CONSTANTS : c_yANUbpcc TYPE char30 VALUE 'YANUBPCC'.
&----
START OF SELECTION
&----
START-OF-SELECTION.
Get Fiscal Period
CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
EXPORTING
I_DATE = SY-DATUM
I_PERIV = 'KO'
IMPORTING
E_BUPER = W_POPER
E_GJAHR = W_GJAHR
EXCEPTIONS
INPUT_FALSE = 1
T009_NOTFOUND = 2
T009B_NOTFOUND = 3
OTHERS = 4.
CHECK SY-SUBRC = 0.
W_GJAHR = W_GJAHR - 1.
CONCATENATE W_GJAHR W_POPER INTO w_fiscal.
w_fisper = w_fiscal.
Only For CUBE 'YANU_ERRS'.
CALL FUNCTION 'LAST_DAY_IN_PERIOD_GET'
EXPORTING
I_GJAHR = W_GJAHR
I_PERIV = 'KO'
I_POPER = W_POPER
IMPORTING
E_DATE = w_last_day
EXCEPTIONS
INPUT_FALSE = 1
T009_NOTFOUND = 2
T009B_NOTFOUND = 3
OTHERS = 4.
Special Case for cube - YANU_ERRS(No 0IFSCPER)
CLEAR: wa_range,it_sx_sel,it_sx_sel-t_range.
REFRESH: it_thx_sel.
it_sx_sel-iobjnm = '0CALDAY'.
wa_range-sign = 'I'.
wa_range-option = 'LE'.
wa_range-low = w_last_day.
wa_range-high = '00000000'.
wa_range-keyfl = 'X'.
APPEND wa_range TO it_sx_sel-t_range.
INSERT it_sx_sel INTO TABLE it_thx_sel.
FM for deletion of CUBE data
CALL FUNCTION 'RSDRD_SEL_DELETION'
EXPORTING
i_datatarget = c_yANUbpcc
i_thx_sel = it_thx_sel
i_authority_check = 'X'
i_parallel_degree = 0
i_work_on_partitions = 'X'
CHANGING
c_t_msg = it_msg
EXCEPTIONS
x_message = 1
inherited_error = 2
invalid_type = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Need to genrate the deletion program using tcode Delete_Facts.
steps : 1 run the Delete_Facts tcode and give your cube name in the input parameter
step2 . select deletion program and execute . you will get the system genarated program
step 3 copy this prg and save as zprg.
step4 : run the program with selection
step 5. if your selection is date then you need to create dynamic varient needs to be populate the value for the date fields
step 6: you need to maintain the date values in the TVAR table if necessary
step 7. you need to use this custom prg in your process chain after completion of test
Thanks
Rajan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
12 | |
10 | |
10 | |
10 | |
9 | |
8 | |
7 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.