cancel
Showing results for 
Search instead for 
Did you mean: 

Agrregates ant Hierarchy Level

0 Kudos

Hello All.

I want to create an aggregate by a Hierarchy level (type H), this is easy. Now,once the aggregate is roll_up, I would like to deactivate the aggregate once the specific hierarchy used in the aggregate is modified by a user, in order to recalculate the aggregates at night time. Is there any way to do this?

Thanks a lot.

regards,

Javier.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Are they maintaining the hierarchy in BW or pulling it from R/3 ?

Because if they are mannually changing it in BW how will you initiate the inactivation of the hierarchy. When Hierarchies are loaded from R/3 or changed in BW they become inactive and have to be reactivated for that version to be considered.

Here is the function module I use in and abap program I put in a process chain. It activates the hierachy being loaded from R/3 each night.

CALL FUNCTION 'RSHIER_HIER_CHECK_AND_ACTIVATE'

EXPORTING

i_hieid = rshiedir_ACT-hieid

If you are loading from R/3 just set the infopackage to not activate when load is completed and then run the above function in a process chain. If they are manually changing it in BW it will automatically be inactive and your good to go.

I hope this helps and actually makes sense.....

Richard

0 Kudos

Hello Richard.

We are almost getting to an understanding but still have some work to do.... je je je...

The hierarchy will be updated manually in BW, and will be activated directly. This will make the aggregate to be erroneous becuase it must be rolled up in order to get the latest hierarchy´s status. This is why I would like to automaticly deactivate the aggregate, so that the queries don´t use the erroneous aggregate. And finnaly at night, the agregate will be rolled up and every body will be happy

The only thing that will solve my problem is some kind of event when the hierarchy is activated or user exit at activation or somthing like that, whoch I can use to write an abap and deactivate (I don´t know how yet) the aggregate.

I hope the scenario is more clear now.

Thank´s a lot any way.

Answers (3)

Answers (3)

Former Member
0 Kudos

I do understand now. If the users were managing the hierarchy in BW then I'm not aware of any exit you have when they click save.

If they were loading thru a process chain from R/3 or a flat file what you need could be done.

I would be concerned about the performance impact of "switching off" the aggregate since you must of created the aggregate for a performance issue. If I understand correctly you are allowing users to initiate turning these off at anytime during the day?

I would never allow that. Soon as its turned off thats when the manager runs the reports and its dog slow.

Good luck

Richard

Former Member
0 Kudos

These two links may be helpful. You can define aggregate events within a process chain. Deactivating the aggregate may be an event.

One way is to use the debugger and capture the code behind the "Deactivate" button.

<a href="
cps04928\BW-EN\PLAIN\helpdata\EN\En\ad\6b023b6069d22ee10000000a11402f\frameset.htm">
cps04928\BW-EN\PLAIN\helpdata\EN\En\ad\6b023b6069d22ee10000000a11402f\frameset.htm</a>

<a href="
cps04928\BW-EN\PLAIN\helpdata\EN\En\ad\6b023b6069d22ee10000000a11402f\frameset.htm">
cps04928\BW-EN\PLAIN\helpdata\EN\En\ad\6b023b6069d22ee10000000a11402f\frameset.htm</a>

Former Member
0 Kudos

You can go to the Admin workbench with RSA1, under tools select Hierarchy/Attribute Change Run and schedule it here. You can use process chain to link all you nightly jobs.

There are function modules you can call with an ABAP program running within a process chain but that seems to be the hard way to do it.

Richard

0 Kudos

Hello Richard.

First of all thanks for your answer.

Any way, the change run is to recalculate the agregates, but my question is, Can i deactivate in someway (user exit) with out manual action, the aggregate in order to avoid data inconsistencies?

Let me show yuo an example:

Initial situation: aggregates are calculates.

.- user changes the hierarchy. This causes teh aggregates to be incorrect. HERE, is where i would like to run automaticly somekind of process in order to deactivate aggregates.

.- At night I reactivate aggregates and run change run.

Regards,