cancel
Showing results for 
Search instead for 
Did you mean: 

How to Set Multiple Lead Selection Programatically

Former Member
0 Kudos

Hi Experts ,

How to set the multiple Lead Selection in a table by programatically ,

in the doinit method before binding the table values i want to set multiple lead selection for the table entries based on my condition .

LOOP AT lt_node_select_employee INTO ls_node_select_employee.
        lv_cnt = sy-tabix .
        READ TABLE lt_node_pop_emp INTO ls_node_pop_emp WITH key POP_EMP_ID  = ls_node_select_employee-EMP_ID.
        IF sy-subrc eq 0.
          CALL METHOD WD_CONTEXT->SET_LEAD_SELECTION_INDEX
            EXPORTING
              INDEX  = lv_cnt .
        ENDIF.
        CLEAR lv_cnt
    lo_nd_node_select_employee->bind_table( new_items = lt_node_select_employee
                                                   set_initial_elements = abap_true ). 

my code is giving dump when its coming to the second loop . help me regarding this

regards

chinnaiya .P

Edited by: chinnaiya pandiyan on Apr 26, 2010 1:45 PM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

do you think it is possible to have multiple lead selections? I think only common selection can be multiple, but I can be wrong. Then you can use SET_SELECTED method.

Regards Jiri

Former Member
0 Kudos

hi Jiri Neuzil ,

thanks for your quick reply and correcting my mistake . i will try the method

regards

chinnaiya .P

Former Member
0 Kudos

The lead selection is not setting .

now i change the coding as per your advise

data lo_el_node_select_employee TYPE REF TO if_wd_context_node.
LOOP AT lt_node_select_employee INTO ls_node_select_employee.
  lv_cnt = sy-tabix.
        READ TABLE lt_node_pop_emp INTO ls_node_pop_emp WITH key POP_EMP_ID  = ls_node_select_employee-EMP_ID.
        IF sy-subrc eq 0.
*          CALL METHOD WD_CONTEXT->SET_LEAD_SELECTION_INDEX
*            EXPORTING
*              INDEX  = lv_cnt .
          CALL METHOD lo_nd_node_select_employee->SET_SELECTED
            EXPORTING
              FLAG   =  abap_true   
        INDEX  = lv_cnt .   .

ENDIF.

Edited by: chinnaiya pandiyan on Apr 26, 2010 3:07 PM

Edited by: chinnaiya pandiyan on Apr 26, 2010 3:17 PM

Former Member
0 Kudos

Problem Solved .

Regards ,

Chinnaiya P

Answers (0)