on 09-30-2008 7:40 AM
Hi All,
I have a table in my view.
i want to select the entire row when i click anywhere on the table.
i am using
event_element = wdevent->get_context_element( 'CONTEXT_ELEMENT' ) to get the particular row.but i am getting ' Access via 'NULL' object reference not possible'.
Could anyone pls give me the exact code ..how to proceed for this? where shall i write the code in select event handler or onleadselection event handler method?
Regards,
Lakshmi.
Hi,
DATA:lv_outputelement TYPE REF TO if_wd_view_element,
lr_table TYPE REF TO cl_wd_table,
lt_el_userenty TYPE wdr_context_element_set,
lt_el_user TYPE wdr_context_element_set.
DATA lo_nd_userenty TYPE REF TO if_wd_context_node.
DATA lo_el_userenty TYPE REF TO if_wd_context_element.
DATA ls_userenty TYPE wd_this->element_userenty.
DATA lo_el_user TYPE REF TO if_wd_context_element.
clear lt_el_user[].
CASE iv_ui_element_name.
WHEN 'TABLE'.
navigate from <CONTEXT> to <USERENTY> via lead selection
lo_nd_userenty = wd_context->get_child_node( name = wd_this->wdctx_userenty ).
CALL METHOD lo_nd_userenty->get_elements
RECEIVING
set = lt_el_userenty.
lt_el_user = lt_el_userenty.
endcase.
LOOP AT lt_el_user INTO lo_el_user.
CALL METHOD lo_el_user->set_selected
EXPORTING
flag = abap_true.
ENDLOOP.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Lakshmi,
Use Lead selection Event of table to get the selected row information.
Write the below code to get the selected row data..
method onactionselect .
data:
node_sflight type ref to if_wd_context_node,
elem_sflight type ref to if_wd_context_element,
stru_sflight type if_main=>element_sflight .
* navigate from <CONTEXT> to <SFLIGHT> via lead selection
node_sflight = wd_context->get_child_node( name = if_main=>wdctx_sflight ).
* get element via lead selection
elem_sflight = node_sflight->get_element( ).
* get all declared attributes
elem_sflight->get_static_attributes(
importing
static_attributes = stru_sflight ).
endmethod.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.