Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Calculating key figures in demand planning all the way down.


I have a data view in Demand planning where i give input on aggregated level for a key figure (A). This figure is then disaggregated to the lower levels.

I have two other key figures that are derived from A, let's call them B & C.

The business logic dictates that these two key figures are only calculated when on detailed level for 4 different characteristics. So we have to be at a fairly detailed level to calculate them.

I would like to see the aggregated values of B & C when at high level. The problem is that i can't figure out how to recalculate these key figs from my dataview when i am at high level. It's not feasible to manually go down to detailed level for all the CVCs and calculate B & C,so i need a macro to do it.

I can do it with a background job where i run the recalculation for the detailed level, that works fine.

What i would like to do though is to make a macro that can go down to a given detailed level and calculate my key figures, i could then assign this macro to a hotkey in my data view.

Does anyone have any idea about how to do this? Is it even possible?

Thanks & points in advance.

Former Member
Former Member replied

Hi Simon.

Check out the macro functions DRILL_DOWN() and DRILL_UP(). You can use this in separate macros as part of a collective macro. There is a fine example in the macro workbench, in the SAP provided book 'SAP example and template macros (part2)' macro 'Col macro: Drilldown, Calc, Drillup'

Beware though, this can be performance intensive.

Your idea of a hot key is a good one, I advise not to use this in a default macro.

Hope this helps, M.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question