Skip to Content

Agrregates ant Hierarchy Level

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.

Add a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 01, 2005 at 06:59 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

    • 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.

  • author's profile photo Former Member
    Former Member
    Posted on Dec 01, 2005 at 06:24 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

    • 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,

  • author's profile photo Former Member
    Former Member
    Posted on Dec 01, 2005 at 07:16 PM

    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 href="
    cps04928\BW-EN\PLAIN\helpdata\EN\En\ad\6b023b6069d22ee10000000a11402f\frameset.htm">
    cps04928\BW-EN\PLAIN\helpdata\EN\En\ad\6b023b6069d22ee10000000a11402f\frameset.htm

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 01, 2005 at 07:35 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.