on 04-10-2008 8:13 AM
Hi,
I have one field in back end which type is Boolean.
I need to have two Radio button (Yes or No) in WDA UI and according to that I need to update that back end field (X for Yes and for No).
Example: Are you SAP Trained? Radio Button Yes and Radio Button No (Both Radio button should update the same back end Boolean field(X for Yes and for No).
I see in UI element Radio button by group and Key? Which one I use for requirement?
I would appreciate if you guide me with steps to achieve my requirement.
Do let me know, if you need more information
Regards,
...Naddy
Edited by: Naddy on Apr 10, 2008 12:43 PM
Hi Naddy,
Simple way is to create a Radio button group by Key.
Identify a dataelement in the data base which has a value range of Yes and No only. If not create one.
Create an attribute with type this data element.
Bind the 'SelectedKey' property of the radio button group with the above attribute. So On the screen it is displayed as
Yes
No
The selected value is stored in the attribute bound to it.
To read the value selected, do the following.
DATA lo_nd_radio_button TYPE REF TO if_wd_context_node.
DATA lo_el_radio_button TYPE REF TO if_wd_context_element.
DATA ls_radio_button TYPE wd_this->element_radio_button.
DATA lv_rbg_key LIKE ls_radio_button-rbg_key.
* navigate from <CONTEXT> to <RADIO_BUTTON> via lead selection
lo_nd_radio_button = wd_context->get_child_node( name = wd_this->wdctx_radio_button ).
* get element via lead selection
lo_el_radio_button = lo_nd_radio_button->get_element( ).
* get single attribute
lo_el_radio_button->get_attribute(
EXPORTING
name = `RBG_KEY`
IMPORTING
value = lv_rbg_key ).
Regards,
Sravan Varagani
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi naddy.....
you can simply use radiobutton ui element.
[link|http://help.sap.com/saphelp_nw2004s/helpdata/en/c0/e8884118aa1709e10000000a155106/content.htm]
---regards,
alex b justin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
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.