cancel
Showing results for 
Search instead for 
Did you mean: 

Hiding of Key Figure at two different Detailed Level .

Former Member
0 Kudos

Hi Expert ,

I need to build one macro who can possibly work for two cases : -

1st Case : When we load the data to planning book and go for one of the Navigational Characteristics to select one entry and load it , then two key Figure automatically get hide at that moment at the initial . Both key Figure are the time based disaggregration Key Figure .

Next selection

2nd Case : When we go to one of the Navigational Characteristics and selected " Detailed All level " condition  then again the above two key Figure shouldn't display . Currently without any selection both are appearing again and displaying the total value against these key Figure  at the Detailed all level conditon .

Please someone can look into this and reply with the expert comment .

Regards,

Sesh Kumar Sahu

Accepted Solutions (0)

Answers (1)

Answers (1)

satish_waghmare3
Active Contributor
0 Kudos

Hello Sesh

You should be able to achieve this using "Maintain User Settings" option in the planning book. Using this option,  for  'Selection ID' you have various options like Hide Key figure and many others. I had designed such planning book controlled by selection ID to display/hide set of key figures. Example -

If Selection ID = A1 :  Then KF1,KF2, KF3

If Selection ID = A2 :  Then KF2, KF3

If Selection ID = A3 :  Then KF1, KF3 and so on.

You can create selection IDs based on detailed level required by you.

Hope this will help.


Thank you

Satish Waghmare

Former Member
0 Kudos

Hi Satish ,

Actually we dont want to hide the Key Figure based on the different selection ID during loading data to Planning book .

Please everyone refer the attachment and provide me the expert comment on the macro build up . I

Regards,

Sesh

satish_waghmare3
Active Contributor
0 Kudos

Hello Sesh

Please try writing this macro and see if this works. Please let me know.

Replace "Attribute1,2,3," with technical name of the Navigational attribute.

Thank you

Satish Waghmare

Former Member
0 Kudos

Hi Satish ,

I developed the macro based on your suggestion by adding all the steps but while testing it doenst work for both the case which was i mentioned in the attachment

Could you please try once again at your end and let me know the workable solution .

Regards,

Sesh

satish_waghmare3
Active Contributor
0 Kudos

Hello Sesh,

So far problem statement still not stated clearly,  So let me try to summarize your requirement -

Region, Global Cust w Country, Country are navigational attributes of main characteristic ZFINCUST (Final Ext Customer).

Now your requirement is to hide these two keyfigures(Demand Forecast & Volume Prediction Plan ) if we drill down to detailed level for any of the above three navigational attributes.

Am I correct? Please let me know.

And if I am correct on your requirement then macro shared by me earlier will not work.

Note -

DET_LEVEL() function works If detailed level, then return value is 1; AND if aggregated level, then value is 0.
ROW_VISIBLE function sets the visibility of a row. If value is 1, then row is visible and If value is 0, then it is not visible.

Please let me know and then I can suggest the change in the macro logic.

Thank you

Satish Waghmare

Former Member
0 Kudos

Hi Satish ,

Yes , what you had written above is correct and we are trying to achieve the same .

If we choose demand forecast and volume prediction plan  & if we drill down to detailed level ( individual selection ) for any of the above three navigational attributes then these two key figure has to hide and in other case when we drill down to detailed all level ( Detail all selection )  for any of the above three navigational attribute then these two key figure has to hide .

Now , i explain it clearly about my issue . Please suggest the change in the macro logic .

Regards,

Sesh

satish_waghmare3
Active Contributor
0 Kudos

Perfect.

Since I have no access to APO now. Writing only the text. Here is macro logic :

IF

DET_LEVEL('Region') = '1'

OR

DET_LEVEL('Att2') = '1'

OR

DET_LEVEL('Att3') = '1'

Row: Demand Forecast = ROW_VISIBLE(0)

Row: Volume Prediction Plan = ROW_VISIBLE(0)

ELSE

Row: Demand Forecast = ROW_VISIBLE(1)

Row: Volume Prediction Plan = ROW_VISIBLE(1)

ENDIF

Basically logic is expected to do << IF at Detailed Level for any of the attribute THEN Hide KFs ELSE Do NOT Hide ENDIF >>

Please try this one and let me know.

Thank you

Satish Waghmare

Former Member
0 Kudos

Hi Satish ,

I tried this logic even , but it is not hiding any one of the key figure in both case .

Could you please look into different angle or think if any alternative for the solution.

Let me know if you need any further details.

Regards,

Sesh

satish_waghmare3
Active Contributor
0 Kudos

Hello Sesh,

Please make the macro as a Default and Level Change macro.

Please let me know where the logic fails.

Thank you

Satish Waghmare

Former Member
0 Kudos

Hello Satish ,

After your recommendation , I had put the same macro in default and level change condition and it is working as required .

After checking in detailed , It appeared that Final external customer is working as expected in both the cases of hiding two Key Figure but Country and Region ( Navigational Attribute ) are only satisfying first  case of hiding the Key Figure but when it goes at the detailed all level again both the key Figure got appeared and displayed in the planning book without any selection .

Still both Key Figure are not hiding at the detailed all level for Country and Region . Please let me know how to restrict this navigational attributes at this point .

Awaiting for your solution !

Regards,

Sesh

satish_waghmare3
Active Contributor
0 Kudos

Hello Sesh,

I am glad that your initial problem is resolved.

Now please make sure to use CORRECT technical name of navigational attributes(Country and Region infoobjects) in the macro.


Please check and let me know.

Thank you

Satish Waghmare

Former Member
0 Kudos

Hello Satish ,

Yes Initial problem is solved now it seems 70% job done but still once again I had checked the technical name of navigation attributes and written the same info object name into the macro still at the Detailed all level it is failing . Don't know why it is failing at this point . ( Refer the snapshot )

Please suggest something to solve this issue !

Regards,

Sesh

Former Member
0 Kudos

Hello All ,

I am expecting the solution for this problem . So far , based on satish recommendation it would be reached to 90% of the solution at last stage it got stuck for some cases the logic is failing of the mentioned macro .

If anyone can help me out at this point , it would be great help .I want someone experts comment on this issue .


Regards,

Sesh 

Former Member
0 Kudos

Hi Satish

Highlighting that Issue is still open and we had tried all possibilities but didn't get success to the macro .

Please provide your expert comment to this pending issue .

Awaiting for quicker response !

Regards ,

Sesh

satish_waghmare3
Active Contributor
0 Kudos

Hello Sesh

Please try doing following things -

Option#1) Hide KFs before entering IF condition. Please see below -

Macro :

Row: Demand Forecast = ROW_VISIBLE(0)

Row: Volume Prediction Plan = ROW_VISIBLE(0)

IF

DET_LEVEL('Region') = '1'

OR

DET_LEVEL('Att2') = '1'

OR

DET_LEVEL('Att3') = '1'

Row: Demand Forecast = ROW_VISIBLE(0)

Row: Volume Prediction Plan = ROW_VISIBLE(0)

ELSE

Row: Demand Forecast = ROW_VISIBLE(1)

Row: Volume Prediction Plan = ROW_VISIBLE(1)

ENDIF

OR  ELSE

Option#2) Write three different macros. A Macro individually for each Navigational Attribute, and make those macros as Default/Level Change.

Please check if this will help

Thank you

Satish Waghmare

Former Member
0 Kudos

Hello Satish ,

Thanks for your prompt reply to this issue ! I know you are putting good efforts to understand this issue at the different level but still after applying both solution it is not working as required .Again at the detailed all level the condition is failing and displaying both the navigational attribute.

In this issue , what is your actual thought about this two navigational attributes ( Customer & region ) . Ideally if we are putting DET_LEVEL condition to restrict the Key Figure demand forecast and Volume Prediction Plan it shouldn't display but i don't know where exactly it got failing .

Some assumption : -

1. Do you feel we need to use some different macro condition to restrict this kind of key Figure

2. Can it be possible by another method or via ABAP code to restrict this kind of key Figure .

3. Also please confirm if the desired solution is not possible itself in the practical terms and it is one of the limitation of the macro .

Regards,

Sesh Kumar Sahu .

satish_waghmare3
Active Contributor
0 Kudos

Hello Sesh

No problem, it is important to know why the logic is still not working. Hopefully we will learn/discover something while fixing the issue at hand.

Frankly I am still not sure why our macro did not work.  That logic should have worked.  Your requirement is very much possible using standard function available in Macro. We do not need to write any ABAP code for the same.

Now let us try another way by using AGG_LEVEL function instead of DET_LEVEL function. Here is the link to SAP Help for additional details.

Operators and Functions in Macros - Planning Area Administration - SAP Library

As per above SAP help,  The AGG_LEVEL() function analyzes whether the planning object being currently processed is detailed or aggregated with regards to the characteristic. If detailed, the return value is 0; if aggregated, the value is 1.

Create a copy of existing macro which you were working on,  then change macro code as below. (Do not delete previous macro with DET_LELEL function, just keep those macros in deactive(RED) status)  -

IF

AGG_LEVEL('TechnicalName_Att#1') = '0'

OR

AGG_LEVEL('TechnicalName_Att#2') = '0'

OR

AGG_LEVEL('TechnicalName_Att#3') = '0'

Row: Demand Forecast = ROW_VISIBLE(0)

Row: Volume Prediction Plan = ROW_VISIBLE(0)

ELSE

Row: Demand Forecast = ROW_VISIBLE(1)

Row: Volume Prediction Plan = ROW_VISIBLE(1)

ENDIF

Please make this macro as Level Change/Default.

Please give a try and let me know if it helps.

Thank you

Satish Waghmare

satish_waghmare3
Active Contributor
0 Kudos

Hello Sesh,

Also Make sure the technical name of attributes are correctly used in the macro.  So far you have been using incorrect technical names, which is the real cause why the macro was not working. Please fix those technical names(copy/paste from your MPOS screen) and then test the macro.

Please refer below screenshot where I try to explain.

Hope this will help.

Thank you

Satish Waghmare