on 10-01-2008 12:52 PM
Hi...
I want to know which row is selected in my table.
since i m not using the lead selection i cant use get_index...
I m having a checkbox in my table when i check it, i want to know which row is selected...
How to solve this issue....
Thanks & Regards.
Kalpanashri Rajendran.
Found the Solution...
Dynamically pass the leadselection...
use method GET_LEAD_SELECTION_INDEX
get the index number & get the value using the index.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
this will solve your problem.
use this code in ontoggel event of ur check box
DATA LO_ND_NODE TYPE REF TO IF_WD_CONTEXT_NODE.
DATA LO_EL_NODETYPE REF TO IF_WD_CONTEXT_ELEMENT.
DATA LS_NODE TYPE WD_THIS->ELEMENT_NODE.
DATA LT_NODE TYPE STANDARD TABLE OF WD_THIS->ELEMENT_NODE
DATA WA_NODETYPE WD_THIS->ELEMENT_NODE.
DATA INT TYPE I.
navigate from <CONTEXT> to <NODE> via lead selection
LO_ND_NODE = WD_CONTEXT->GET_CHILD_NODE( NAME = WD_THIS->WDCTX_NODE).
get element via lead selection
LO_EL_NODE = LO_ND_NODE->GET_ELEMENT( ).
LO_EL_NODE= WDEVENT->GET_CONTEXT_ELEMENT( NAME = 'CONTEXT_ELEMENT' ). "here u get reference for the element, after that set the lead selection and get element data
IF LO_ND_NODE IS NOT INITIAL.
CALL METHOD LO_ND_NODE->SET_LEAD_SELECTION
EXPORTING
ELEMENT = LO_EL_NODE.
ENDIF.
@TODO handle not set lead selection
IF LO_EL_NODE IS NOT INITIAL.
LO_EL_NODE->GET_STATIC_ATTRIBUTES(
IMPORTING
STATIC_ATTRIBUTES = LS_NODE ).
ENDIF.
"in ls_node you have the row u click without lead selection
Edited by: Yogesh N on Oct 1, 2008 8:06 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
You can do something like this:
DATA:
lr_node TYPE REF TO if_wd_context_node,
lt_data TYPE zwdtmass,
lr_data TYPE REF TO zwdsmass,
lt_download TYPE zwdtdownload,
ls_download LIKE LINE OF lt_download.
lr_node = wd_context->get_child_node( name = wd_this->wdctx_node1 ).
lr_node->get_static_attributes_table( IMPORTING table = lt_data ).
LOOP AT lt_data REFERENCE INTO lr_data WHERE selected = abap_true.
ls_download-id = lr_data->id.
ls_download-ztype = lr_data->ztype.
ls_download-docid = lr_data->docid.
APPEND ls_download TO lt_download.
ENDLOOP.
In the code SELECTED is the field that contains the value from the checkbox.
Regards.
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 | |
10 | |
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.