cancel
Showing results for 
Search instead for 
Did you mean: 

Delete Old ODS content in process Chain.

Former Member
0 Kudos

I am loading an ODS and then to an Infocube. The problem is that I need to delete the ODS data which is more than 30 days old.

Anybody have any suggestions how to do this in process chain?

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

I am using this ODS as a Delta for the Infocube. Will deleting last months data disturb the DELTA ??

Former Member
0 Kudos

Please let me know if someone has a sample code for this.

Former Member
0 Kudos

hi,

try this:

$$ begin of routine - insert your code only below this line -

data: monthago like sy-datum.

if sy-datum+4(2) = '01'.

monthago(4) = sy-datum(4) - 1.

monthago+4(2) = '12'

else.

monthago(4) = sy-datum(4).

monthago4(2) = sy-datum4(2) - 1.

endif.

monthago6(2) = sy-datum6(2).

delete from /BIC/AZODS_BU000 where DATE < monthago .

ABORT = 0.

$$ end of routine - insert your code only before this line -

hope that helps,

Andrzej

ps. you can make an ABAP report using this code and use it in process chains as well

Former Member
0 Kudos

hi,

why you do not write code to delete it in start routine of this ODS update rules?

Andrzej