Skip to Content
author's profile photo Former Member
Former Member

Regard Node methods?

Hi All,

in my application,1st i want to display a alv report having checkboxes in one column.

if user select any checkbox the recoerd must be a time user can select any no checkboxes.after that we have to coollect all the selected records.for those i have to update in database.

DATA: lr_node_ep_sch_info TYPE REF TO IF_WD_CONTEXT_NODE,

lr_el_ep_sch_info TYPE REF TO if_wd_context_element,

lt_ep_sch_info TYPE if_resultview->elements_ep_sch_info,

ls_ep_sch_info TYPE if_resultview->element_ep_sch_info,

lv_checked LIKE ls_ep_sch_info-chk_box.

lr_node_ep_sch_info = wd_context->get_child_node( wd_this->wdctx_ep_sch_info ).

lr_el_ep_sch_info = lr_node_ep_sch_info->get_element( ).

*get single attribute



name = `CHK_BOX`


value = lv_checked ).

IF lv_checked = 'X'.

lr_el_ep_sch_info->SET_SELECTED( EXPORTING ABAP_BOOL = 'YES' ).

lr_node_ep_sch_info->GET_SELECTED_ELEMENTS( ).

i write like above,what i am asking how can get the selected records in to internal table.and can i use GET_ELEMENTS( ) in place of GET_ELEMENT( ).we r not looping anywhere,then how should it check attribute of all the selected records.?



Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Apr 11, 2008 at 05:43 AM

    Hi Ravi,

    Just try the following:


    lt_table TYPE wd_this->elements_ep_sch_info.


    <ls_table> TYPE wd_this->element_ep_sch_info.



    table = lt_table.

    LOOP AT lt_table ASSIGNING <ls_table> WHERE CHK_BOX EQ 'X'.

    *-Here you can perform whatever action you like.


    You see that here there is no need to update the selection, just retrieve the table and go over all records that have a checked checkbox.



    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.