on 11-11-2008 1:48 PM
hi all,
i have an issue.I had designed a screen using WD4A.In the screen i have two radio button.I had to code for these radio buttons.When the user clicks on one radio button and click on save button,the entries to be stored in one table.If the user clicks on another button,the entries from the table get deleted.
please help me......
useful answers get rewarded.
with regards
Sandeep Sharma
Hi Sandeep,
Read the context value attached to the radio button.
which so ever value is ABAP_TRUE, populate the table accordingly.
Hope this helps.
Regards,
Kinshuk
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
On the event handler of the save button, inside the method write the code like this...
DATA lo_nd_flag1 TYPE REF TO if_wd_context_node.
DATA lo_el_flag1 TYPE REF TO if_wd_context_element.
DATA ls_flag1 TYPE wd_this->element_flag1.
DATA lv_flag LIKE ls_flag1-flag.
* navigate from <CONTEXT> to <FLAG1> via lead selection
lo_nd_flag1 = wd_context->get_child_node( name = wd_this->wdctx_flag1 ).
* get element via lead selection
lo_el_flag1 = lo_nd_flag1->get_element( ).
* get single attribute
lo_el_flag1->get_attribute(
EXPORTING
name = `FLAG`
IMPORTING
value = lv_flag ).
Here flag1 is the node and flag is the attribute, so in ur case go to the code wizard (ctrl + f7) and click on the radio button read context...there provide the name of ur radio button,,,you will get the value is say lv_flag variable.
So just read like
if lv_flag = 'X'.
* Write ur code
else.
* Write ur code
endif.
Hope it works..
Hi Sandeep,
you pls refere to View: RADIOBUTTON in web dynpro component WDR_TEST_EVENTS .
This will helps you to understand the logic behind this.
in Group1 of this screen you can see actions triggered for radio button selection.
-Kiran Singh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.