cancel
Showing results for 
Search instead for 
Did you mean: 

Help with hiding key figures at aggregate level

Caterpillar
Explorer
0 Kudos

Experts,

I need help with one of my DP macros please. I have searched this forum for both DET_LEVEL and AGG_LEVEL but none seem to be relevant for what I am trying to accomplish.

I have key figures that I would like to hide when a user is at an aggregate level, such as product or location when in interactive demand planning book. The reason is that these key figures do not make sense at an aggregated level, for example a %. In 4.0, we just grayed out the values (but they were still there when a user exported), so I would like to actually hide these rows in 7.0.

The issue I am having is after loading multiple products, I use the header to drill down to 1 product, the row does not display as it should. The macro works when I select and load multiple products (I am at 1 location), the key figure is not displayed, but when I use the arrow in the product header to go to 1 individual product, the row is still not displayed.

Here is my macro:

IF DET_LEVEL( 'product' ) = 0 OR DET_LEVEL( 'location' ) = 0

Key figure attributes = ROW_VISIBLE( 0 )

END IF

I have tried multiple things...

1. I had an 'else' to set it back to visible, and it seemed to work as long as I don't mess with the key figures selected in the planning book. But when a user changes the key figures via key figure selections and does not choose the key figure in this macro, the macro was showing it regardless of what the user selected when at lowest level.

2. I have tried both DET_LEVEL and AGG_LEVEL

3. I have tried 'Details only', 'All planning objects' and 'Certain levels -> Agg. level' with no differences

4. I have the macro as a default macro and as a level change macro

Thanks,

Kristin

Accepted Solutions (0)

Answers (2)

Answers (2)

Caterpillar
Explorer
0 Kudos

Thanks for the help. I find it surprising that no one else has had to hide / unhide key figures based on certain criteria in addition to not overriding what has been selected by the user in the key figure selection options.

Caterpillar
Explorer
0 Kudos

Does anyone have any ideas? Am I not providing enough information? It would be great if someone knew what I am missing.

Thanks

Former Member
0 Kudos

Hi Kristin,

In the past we have experience irratic behaviour of macros when using det_level functions and using them at default or level change.

I was able to simulate this problem in our test system successfully and here is the solution.

I see you are going thru only one condition check, I was able to display key figure again when I use arrow to drill down to one material or location.

Here is my macro,

IF

Condition check

DET_LEVEL ( 'LOC' ) = 0

Keyfigure (ATTR) =

ROW_VISIBLE ( 0 )

ELSEIF

Condition Check

DET_LEVEL ( 'LOC') <> 0

Keyfigure (ATTR) =

ROW_VISIBLE ( 1 )

ENDIF

The only thing is we are telling macro again to display keyfigure.

I use this macro as default only and it worked. You can also try adding it as level change macro.

Hope this helps.

Regards,

Harshil Desai

Caterpillar
Explorer
0 Kudos

Harshil,

Thank you for your reply! I did have the ELSE condition in my macro, but this presents a second problem. Now in your planning book, select a couple key figures, and do not include the ones you are hiding with the macro. Then when you use the arrow to drill down to one material / location, those key figures from the macro get displayed. However, you want them hidden based on what you selected via the key figure selection! How do I get around that?

Former Member
0 Kudos

Alright,

What you are saying is all the keyfigures are displayed that are not selected in key figure selection along with key figure hidden by macro. Is that right?

Let me know if I am doing anything different,

- Load multiple location/product. One keyfigure is hidden based on macro definition.

- Now I am selection only two key figure in my view for display and I am not selecting the keyfigure that is already hidden by macro. So only two keyfigures are there in data view now.

- now when I drill down to one material/location, the key figure, that is hidden by macro is displayed and now there are only 3 key figures dispayed. which seem correct since all other key figures we do not want to display and are deselected in key figure selection.

Now if you say that macro hidden key figure also should not display since that is not selected in key figure selection that would be contradicting the macro since in macro we are forcing key figure to display and that overrides keyfigure selection.

Regards,

Harshil Desai

Caterpillar
Explorer
0 Kudos

Hence my dilemma!

I don't want to trump what's been selected via the key figure selector. Is there no way to decipher what key figures have been selected?

Former Member
0 Kudos

This should not be the major obstacle. You should explain users of limitation of macro usage and standard SAP.