cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to delete data selectively from Business content cubes

Former Member
0 Kudos

Dear Experts,

Requesting you to help me out to know, is it possible to delete data selectively from Business content cubes.

When I'm trying to delete selectively from Business content cubes, the background job gets cancelled with ST22 logs stating

A RAISE statement in the program "SAPLRSDRD" raised the exception condition "X_MESSAGE".

Since the exception was not intercepted by a superior program, processing was terminated.

and i tried with few more Technical content cubes but the same thing happens.

Pls let me know how to selectively delete data from Business content cubes if it's possible?.

Thanks in advance for your favorable assistance.

Regards,

Ramesh-Kumar.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Ramesh,

Follow below steps for selective deletion:

1. Transaction code: Use the Transaction code DELETE_FACTS.

2. Generate selective deletion program:

A report program will be generated of the given name, here .

3. Selection screen:

Take the deletion program u201CZDEL_EPBGu201D to the transaction code SE38 to see/execute the program.

After executing it will take you to a selection screen:

As we need to carry out deletion selective on Calendar week, we need to get the screen field for the field Calendar week. For this, click on the Calendar week field and press F1.

Click on the technical information button (marked in red box above) you will get below screen:

ABAP program to carry out the Calendar week calculation

Problem scenario: As stated earlier the requirement is to delete the data from the cube based on the calendar week. Thus a code must be developed such that the number of weeks should be taken as input and corresponding calendar week should be determined. This calendar week should be then passed to the deletion program in order to carry out the data deletion from the InfoCube.

Transaction code: Use T-code SE38 in order to create a program.

Logic: Suppose we need to delete the data older than 100 weeks.

a. Get the number of weeks and system date in variables and calculate the total number of days :

lv_week = 100. *number of weeks

lv_dte = sy-datum. *system date

v_totaldays = lv_week * 7. *total days

b. Get the corresponding calendar day from the total days. This is obtained by simply subtracting the total no. of days from the system date.

lv_calday = lv_dte - v_totaldays. *corresponding calday.

c. Now in order to get the calendar week corresponding to the calculated calendar day we must call a function module 'DATE_TO_PERIOD_CONVERT'. This function module takes input as Calendar day and Fiscal year variant and returns the appropriate fiscal period.

  • Get the sales week time elements

call function 'DATE_TO_PERIOD_CONVERT'

exporting

i_date = lv_calday

i_periv = lc_sales

importing

e_buper = lv_period

e_gjahr = lv_year

exceptions

input_false = 1

t009_notfound = 2

t009b_notfound = 3.

if sy-subrc = 0.

ls_time-calweek(4) = lv_year.

ls_time-calweek+4(2) = lv_period.

endif.

v_week = ls_boots_time-calweek.

Note: We can pass the fiscal year variant which can be obtained from the table T009B.For e.g. here fiscal year variant lc_sales = Z2. LS_TIME will be any table with suitable time units.

d. Now we have obtained the required calendar week in the v_week variable. This calendar week is the week till which we need to keep the data. And older data than this week will be deleted. This deletion will be done by the deletion program

  • Submitting the Data deletion program for ZEPBGC01 and key field

SUBMIT ZDEL_EPBG WITH C039 LT v_week.

Here the calendar week value is submitted to the deletion program ZDEL_EPBG with the screen field of calendar week.

Hope ... this will help you..

Thanks,

Jitendra

former_member182470
Active Contributor
0 Kudos

Hi,

Try to display data of your cube in LISTCUBE transaction.

You can try analyzing the short dump by seeking ABAPer help. If any inconsistent requests found, delete from the DB tables.

Selective deletion procedure is common for both Standard and Customized Cubes.

Hope this helps.......

Regards,

Suman

Former Member
0 Kudos

I think ur trying to delete compressed request data from the cube .Please check whether ur cube request or compressed.

we use normal step to delete data from BI content cubes as well.