on 02-22-2012 8:10 PM
hi all,
I m trying to do the next ...
I have a select options with a button that trigger a method. In this method I want to set on the visibility of a table with the result of a SO .
I see that I can put 'visible' throgh properties of the table . but I dont know how i can do visible again the table.
any ideas?
regards
Hi,
For the visibillity of any element, there are two ways.
1. Binding with Context Attribute
- Create an attribute of type WDUI_VISIBILITY
- Bind this attribute with the 'Visible' Property of table
- set the value of this attribute from methods based on your condition
- To make visible, set the value of context attribute as '02' and to make invisible '01'.
2. In WDDOMODIFYVIEW method of the view
- Check if the condition for making the table visible is met
Check the post by rvanamala in the following thread for sample.
Link: http://forums.sdn.sap.com/thread.jspa?threadID=1763462
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks!!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Check the code which give you idea about visability of fields, but bind table and change according to your requirement.
DATA lo_nd_dctrl TYPE REF TO if_wd_context_node. " Node of DCTRL structure
DATA lo_el_dctrl TYPE REF TO if_wd_context_element. " Element of DCTRL structure
DATA ls_dctrl TYPE wd_this->element_dctrl. " Structure for DCTRL
DATA:lv_asn_ind TYPE wd_this->element_dctrl-asn_ind, " Variable of ASN fieldfor DCTRL
lv_bool TYPE wdy_boolean. " Variable of boolean field for DCTRL structure
DATA :wd_por_en TYPE REF TO cl_wd_checkbox. " Workarea to declare check box
navigate from <CONTEXT> to <DCTRL> via lead selection
lo_nd_dctrl = wd_context->get_child_node( name = wd_this->wdctx_dctrl ).
get element via lead selection
lo_el_dctrl = lo_nd_dctrl->get_element( ).
@TODO handle not set lead selection
IF lo_el_dctrl IS INITIAL.
ENDIF.
lv_bool = abap_true..
CALL METHOD lo_el_dctrl->set_attribute_property
EXPORTING
attribute_name = 'ASN_IND'
property = if_wd_context_element=>e_property-read_only"if_wd_context_element~e_property-read_only
value = lv_bool.
wd_por_en ?= view->get_element('SN_CHKBOX').
CALL METHOD wd_por_en->set_enabled
EXPORTING
value = abap_false.
Regards,
Goutam Kolluru.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI,
You need to create an antribute in the context , with type WDY_VISIBILE.
now bind the attribute with the table visible property , and the control its visibilty through code.
on click of the button event , call method set attribute ( name = 'abc' value = '1') for visible , and value -= 0 for hiding table.
Best Regards,
Anoop Gupta
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can create attribute and assign attribute to control and pass your values to the attribute in your component logic for visible and invisible.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.