cancel
Showing results for 
Search instead for 
Did you mean: 

Automate copying and deletion of data

Former Member
0 Kudos

BW Gurus,

We have Actual and Previous year cube. When the Fiscal year about to finish, we slowly move all the actual data from actual cube to pevious year cube and then do seletive deletiion from actual year cube. I want an automatic process (process chain) to move data daily, weekly or monthly basis from actual cube to previous year cube and subsequently delete those from actual year cube.

Gurus please through your ideas to achieve this.

Cheers

Mithu

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Let say X1 cube as an actual year cube data and X2 cube as an previous year cube data and let say you want to move the data monthly from actual (x1)to previous year cube (x2).

1. In the infopackage 8X1-> X2, write a routine for the calmonth to load the lastmonth data to X2 cube.

2. Using a std report RSRD_DELETE_FACTS, delete the lastmonth data in X1 cube.

The process will be

1. start variant

2. Load infopackage(8X1-X2)

3. Delete data using report ( if 2nd step is successful).

Check out the below weblog ..

/people/sergio.locatelli2/blog/2006/11/14/delete-records-in-data-target-of-bi-different-options-available (check out the first step in the above weblog).

Hope it will give some ideas to achieve ur steps.

Regards,

Siva.

Former Member
0 Kudos

Hi Siva,

Your reponse is very helpful. Can you please discuss load a bit from actual to previous year cube. Sample code will be appreciated.

Cheers

Mithu

Former Member
0 Kudos

Hi,

In the infopackage(8X1->X2), write a routine for the field 0calmonth as below.

data: l_idx like sy-tabix,

l_date type d,

l_month(6) type n.

read table l_t_range with key

fieldname = 'CALMONTH'.

l_idx = sy-tabix.

*lastmonth

l_date = sy-datum.

l_date+6(2) = '01'.

l_date = l_date - 1.

l_month = l_date(6).

l_t_range-low = l_month.

modify l_t_range index l_idx.

p_subrc = 0.

Regards,

Siva.