on 02-06-2012 12:30 PM
Hi ,
i'm using check-box group. i want to get the values of the checked or selected check boxes in a variable if possible.
reply asap.
Edited by: sarthakar on Feb 6, 2012 1:31 PM
Hi,
You just read the attribute under node to which you binded the check box group values using method get_attribute .
It will give the selected value text.
Hope this helps u.,
Thanks & Regards,
Kiran.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks all,
for your valuable answers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sarthakar,
use following code to get selected elements for checkbox group.
DATA lo_nd_chkgrp TYPE REF TO if_wd_context_node.
DATA lo_el_chkgrp TYPE REF TO if_wd_context_element.
DATA ls_chkgrp TYPE wd_this->element_chkgrp.
DATA lt_chkgrp TYPE wd_this->elements_chkgrp.
* navigate from <CONTEXT> to <CHKGRP> via lead selection
lo_nd_chkgrp = wd_context->get_child_node( name = wd_this->wdctx_chkgrp ).
* @TODO handle not set lead selection
IF lo_nd_chkgrp IS INITIAL.
ENDIF.
* get element via lead selection
lo_el_chkgrp = lo_nd_chkgrp->get_element( ).
* @TODO handle not set lead selection
IF lo_el_chkgrp IS INITIAL.
ENDIF.
data ele_set type wdr_context_element_set.
data wa like line of ele_set.
CALL METHOD lo_nd_chkgrp->get_selected_elements
* EXPORTING
* including_lead_selection = ABAP_FALSE
receiving
set = ele_set
.
loop at ele_set INTO wa.
CALL METHOD wa->get_static_attributes
IMPORTING
static_attributes = ls_chkgrp
.
append ls_chkgrp to lt_chkgrp.
endloop.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.