cancel
Showing results for 
Search instead for 
Did you mean: 

Macro question

Former Member
0 Kudos

Greeting all

does any body know how can we force the keyfigure (by macro/ or any other function/methods) to view no value for the aggregated level of data while these records have data (in each line level)

it is similar to the safety stock key figure... if some body pull the data for group of products.. the safety stock Kf shows no value. however.. when you pull it for only 1 product it shows values

any idea how to do that?

Thank you!

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello Areege,

I am fully agree with James remarks. It's not possible to force zero or null value to aggregated values as the Live cache always displays the sum of all the products at the aggregated level.

But I am glad to see the workaround suggested by James

Regards,

Anurag

Former Member
0 Kudos

Hi,

you can't, liveCache will always show you the sum.

Possible workarounds would be (if we are talking about DP)

1- use a foreground color equal to background color, so you see nothing

2- hide the row, using ROW_VISIBLE(0), and detecting your aggregation level with AGG_LEVEL / DET_LEVEL, etc... inside your macro logic. If you are aggregating, hide, else show (something like that)

If your problem is in SNP, you can hide your keyfigure if ACT_PRODUCT='' (meaning you have more than one product, eventually doing the same with ACT_LOCATION if needed). If you don't want to hide it, create a new one with similar name and copy your keyfigure with an automatic macro ONLY if you are not aggregating, then just hide your original keyfigure.

hope this helps, I can try to write this more clearly tomorrow

J.

Former Member
0 Kudos

Hi James,

Thanks for the reply.

My problem is in SNP, I did tried what ever you have suggested but its not working for me.

Can you please explain in more detail or write the steps of macro. I have created a new key figure and when I load this KF for multiple locations, same material ie in the aggragated view, I want KF should show the value at the material loaction level but at the same time should show blank in the "total" row. This is the exact same behaviour as of Safety stock or Traget stock level standard key figures.

Thank you!

Areege

rajkj
Active Contributor
0 Kudos

Hi Areege,

If you load multiple objects, location product specific data won't be retrieved from the liveCache and hence, you see the blank rows against "Total" group row.

For implementation reference, pl check the standard macro "Layout Attributes" in your SNP macro book and add the custom key figure as shown below.

IF <product or location at detailed level>

Your customer key figure(Attributes)  ROW_VISIBLE( 1 )

ELSE

Your customer key figure(Attributes)  ROW_VISIBLE( 0 )

ENDIF.

Thanks,
Rajesh

Former Member
0 Kudos

Thank you this helped a lot ..

but I can't find the link (any more) to mark the question as answered and give you points .. any idea?!