cancel
Showing results for 
Search instead for 
Did you mean: 

Disabling buttons

Former Member
0 Kudos

Hello All,

I have a view "Display_Order" which has one input field for the Order number and a button labeled "Display". When you click the button outbound plug is fired to go to the view "Order_Details" which has few buttons.

Now if the order does not exists I need to disable all these buttons on the "Order_Details" view.

Guys, I am confused as to where do write this disabling code...whether in WDDOINIT or WDDOMODIFYVIEW.

Con you please help me clarify my confusion.

Warm Regards,

Smita

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

What you can do is you can make use of Varaible of type boolean . Declare it in your View and bind it to your button. once whn you check for the existence of the order set the boolean variable to false and do this in the WDDOINIT() of your View

Cheers

Former Member
0 Kudos

Actually the component I am trying to enhance is standard component so ideally I am not suppose to touch the layout of this component. Whatever I need to code, needs to be written in the enhancement points i.e. post-exit of WDDOINIT or WDDOMODIFY.

Former Member
0 Kudos

hi,

you do it in the method WDDOINIT because you will be using the Boolean type variables and when you navigate from one view to another view this is the first method that will be ecxuted and you can initlaise the Context variable(boolean Varible) here

cheers

Former Member
0 Kudos

Write the code in the inbound plug handler of the order details view. Bind a context attribute to the 'enabled' property of all the buttons. If there are no orders, set the attribute as abap_false.

Regards

Nithya