Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
sachin_yadav3
Active Participant

1)      1) Create a table in view. Bind it with the context node.

2)      2) Write code in WDDOINIT to populate the table with data. Wizard can be used for the same.

3)      3) For multiple selection Please select the node properties as below

sfs    

          

1)      4)Set the below two properties of table.

       selectionChangeBehaviour as manual and selectionMode as Multi.

         5) Implement the action Onselect.

While creating the action doesn’t forget to select the check box “”Copy UI Event Parameters”

1)   6)   Implement below code in on_select action

DATA lv_index TYPE i,                        "Index of the selected row.
          lo_node
TYPE REF TO if_wd_context_node. "Conext Node

*New_lead_selection will come automatically once you select* “Copy UI Event Parameters" while creating action
*Get the index of the selected row
  lv_index  
= new_lead_selection->get_index( ).
*Get the referance for Node
  lo_node
= NEW_LEAD_SELECTION->get_node( ).

*If row is already selectd for that particular index*then unselect that row else select that row
 
IF lo_node->is_selected( index = lv_index ) = abap_true.
    lo_node
->set_selected( flag = abap_false index = lv_index ). " Deselect
 
ELSE.
    lo_node
->set_selected( index = lv_index ). " Select
 
ENDIF.

7) Output

1

3 Comments
Labels in this area