on 03-15-2014 11:24 AM
Hi Gurus,
I have a Radio Button By Key Filed (Coming from domain) three radio buttons such as a) Rad1 b) Rad2 c) Rad3 ....In my requirement I have to hide Rad2 radio button based on some condition.Kindly help me
Hi,
Create 3 radio buttons independently instead of creating radio button group and set the visible property based on condition..hope this will help ..
Regards,
Vasavi.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Maybe you should also consider using fixed radiobuttons (not radiobutton group). That way you would be able to bind an visible property with each one separately and would not need to use SET_ATTRIBUTE_VALUE_SET.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Use SET_ATTRIBUTE_VALUE_SET method of IF_WD_CONTEXT_NODE_INFO to achieve this.
Use FM DD_DOMA_GET/ GET_DOMAIN_VALUES to get the domain values, then based on condition remove the second value and bind the value set.
data: lt_valueset type table of wdr_context_attr_value,
lr_node type ref to if_wd_context_node,
lr_node_info type ref to if_wd_context_node_info.
lr_node = wd_context->get_child_node( '<NODE_NAME>' ).
lr_node_info = lr_node->get_node_info( ).
*get the domain values.. in to lt_valueset,
*based on condition delete the second record from lt_valueset.
lr_node_info->set_attribute_value_set(
exporting
name = '<RADIO_KEY>' " attribute name
value_set = lt_valueset ).
hope this helps u,
Regards,
Kiran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Use the Function modules mentioned above( there are many other ways to get the domain values)
sample code:
data: lt_dom_values type standard table of dd07v,
ls_dom_values type dd07v,
lt_valueset type table of wdr_context_attr_value,
ls_valueset type wdr_context_attr_value.
CALL FUNCTION 'GET_DOMAIN_VALUES'
EXPORTING
DOMNAME = 'DOMN' " Your domain name
TEXT = 'X'
TABLES
VALUES_TAB = lt_dom_values.
IF SY-SUBRC <> 0.
* Implement suitable error handling here
ENDIF.
loop at lt_dom_values into ls_dom_values.
*here you can write the condition and donot append the second record.
ls_valueset-value = ls_dom_values-domvalue_l.
ls_valueset-text = ls_dom_values-ddtext.
append ls_valueset to lt_valueset.
clear ls_valueset.
endloop.
Now you can bind the value set.
Hope this helps u,
Regards,
Kiran
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.