cancel
Showing results for 
Search instead for 
Did you mean: 

How to find out keyfigures which are selected in a view

peter_wgerle
Explorer
0 Kudos

Dear experts,

I have a macro which hides a certain keyfigure (let's say keyfigure A) depending on its aggregation level (the macro is setting row_visible(1) or (0). This is working.

But if the user selects some other keyfigures (let's say keyfigura B and C) in the interactive planning, then makes a drilldown and later on a drillup, then the hidden keyfigure A is visible, because the makro only checks the aggregation level but not whether the keyfigure at all is visible or not.

Do you know a possibility to ask the attribute of being hidden (or visible) or not? Maybe this is not possible by means of standard macro language. In this case, did you develop a abap-function to solve such a problem?

Thanks

Peter

Accepted Solutions (1)

Accepted Solutions (1)

former_member187488
Active Contributor
0 Kudos

Hi Peter,

You can use the same macro function row_visible() to get the current value of this attribute.
If you want the key figure to be always hidden, you'd better make the setting in /sapapo/sdp8b instead of using macros.

Best Regards,
Ada

peter_wgerle
Explorer
0 Kudos

Hi Ada, hi Douglas,

many thanks for your answers.

I have tried to get the attribute of the keyfigure with following statement:

IF

ROW_VISIBLE(

Line of KEYFIGURE

) = 1

Action box

....Statement A

ELSE

Action box

... Statement B

ENDIF

But the function ROW_VISIBLE only Returns 0.

So it seems, that it is not possible to get the current value of the attribute.

@Ada: how do you ask the value?

That is the first Problem.

The second is, that the button to hide or to show the keyfigures does not create an event.

In my makro I put an output_popup to see the value. But this popup only appears after start of selection or changing level but not after using the button for selection or hiding the keyfigures.

Do you have an idea?

Best regards

Peter

former_member187488
Active Contributor
0 Kudos

Hi Peter,

Did you set "Row Attribute" for the key figure line?
As you noticed, changing key figure visibility does not create an event. This is per design of the system.

Best Regards,
Ada

peter_wgerle
Explorer
0 Kudos

Hi Ada,

yes, I set "row attributes". Maybe something else is wrong in my macro. I will check again.

But if there is no chance to get an event when changing key figure visibility then I'm afraid I have to find another solution or I have to tell the user, that he will not get the macro he wishes to receive.

Many thanks and best regards

Peter

former_member187488
Active Contributor
0 Kudos

Hi Peter,

Do you still need further help?
The last option to troubleshoot macro issue is via debugging ...

I also suggest you to refer to my wiki page to get further information about macros and see if it helps.

3-3. Technical Information about Macro - Supply Chain Management (SCM) - SCN Wiki


Best Regards,
Ada

Answers (2)

Answers (2)

peter_wgerle
Explorer
0 Kudos

Hi Ada,

thanks for your answer and your link to your wiki page. Please excuse my late answer. I've been in holidays.

Are you sure, that it is possible to get back the attribute of function row_visible. I tried different codings, but I don't get the attribute. Do you have an example coding?

Best regards

Peter

former_member187488
Active Contributor
0 Kudos

Hi Peter,

I looked into this and unfortunately it does cannot retrieve the attribute
I'll try to look further when I have time if there's any way here ...
Sorry for that.

Best Regards,
Ada

peter_wgerle
Explorer
0 Kudos

Hi Ada,

no problem. Thanks for all your answers. I think the users can work also without this functionality.

Best regards

Peter

0 Kudos

Hi Peter,

I believe that you are talking about macro function ROW_MARKED(), you can check more about this macro in this link.

Basically, you are asking to know if a certain row is marked/selected, and this is what this function is meant to. You would have to check each row to see if it is marked and do the same logic in case is true.

Hope that helps you.

Best Regards,

Douglas