Showing results for 
Search instead for 
Did you mean: 

Macro with pushbutton - Toggle functionality?

Former Member
0 Kudos


any ideas on how we can achieve Toggle functionality with a Macro assigned to a Pushbutton in the dataview.

What I want to do is the following:

1) Users drilldown on product.

2) Users can click a pushbutton to call a macro which hides some of the products in the drilldown (using function PLOB_DATA_VISIBLE, according to predefined criteria)

3) Now if the users click the same pushbutton again, I want all the products to be visible again.

=> Thus clicking the button, the users will toggle between Hiding some products and showing all products.

I don´t really know if this toggle thing can be achieved, grateful for any help. Otherwise we will just have to go for two pushbuttons, one to hide, one to show, but it is not as elegant.



Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Harish,

thanks for your ideas!

Some questions:

Do you know if it is possible to get the value from plob_data_visible? I think we can only set the value, but not get it??

Can you use LAYOUTVARIABLE for setting the flag? As I understand it LayoutVariable is cleared every time new data is loaded, which suits fine for our purpose.

My question:

is the layoutvariable unique for each session. Or if another user in parallel enters the demand planning view and loads some data, will it clear the layoutvariable for the first user?

Former Member
0 Kudos

just write a couple of lines that checks the status of the drill down and status of PLOB_DATA_VISIBLE

if PLOB_DATA_VISIBLE returns 0 it means its invisible and you make it visible by making it 1

if PLOB_DATA_VISIBLE returns 1 then its visible and you make it visible by makinig it 0

alternately usa a cell which is hidden as a flag - when you click the button to make it visible it makes it 1 and when its clicked again it becomes 0. based on the status of 1 and 0 in this cell you can do the required