on 06-25-2009 11:25 AM
hai all,
can any one plese tell me how to hide an UI Element at run time.
thanks & regards
SREEVATHSAVA.G
thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello SREEVATHSAVA,
to reach your aim you could use the standard hook method WDDOMODIFYVIEW of your view.
For example, to hide button "BUTTON_1" (ID), the following code should help you :
method WDDOMODIFYVIEW .
data: LR_BUTTON type ref to CL_WD_BUTTON.
LR_BUTTON ?= view->GET_ELEMENT( 'BUTTON_1' ).
LR_BUTTON->SET_VISIBLE( VALUE = '01' ).
endmethod.
Hope that helps,
Peter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Make use of WDUI_VISIBILITY.
take a context node attribute of type WDUI_VISIBILITY, bound the same to VISIBLE property of the UI element.
Use the below code.
call method elem_visible->set_attribute
exporting
name = 'VISIBLE'
value = '01'.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Is your uielement a static? If so, follow these steps;
1. Create an attribute say 'VISIBLE' type boolean
2. Bind this attribute to the visible property of the uielement
3. Now when you want to hide it , set the 'VISIBLE' attribute to abap_false
l_elem->set_attribute( exporting name = 'VISIBLE'
value = abap_false ).
Regards,
Radhika.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
For hiding any UI element, you have to create a context attribute of type WD_BOOLEAN(char 1), bind this context attribute to the 'VISIBLE' properly of UI element.
Now for hiding, you have to set the context attribute value to SPACE and if you want to get it back displayed, set the same to 'X'.
Regards,
Manne.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi SREEVATHSAVA ,
you can set the properties for UI element by calling set_attribute_property
* call method set attribute property and pass value as 'X' to ENABLE
DATA lo_el_radio_node2_1 TYPE ref to if_wd_context_element.
call method lo_el_radio_node2_1->set_attribute_property
exporting
attribute_name = 'FIRST_NAME_2'
property = 4
value = 'X'.
Thanks ,
chinnaiya P
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.