cancel
Showing results for 
Search instead for 
Did you mean: 

How to select multiple Checkboxs in Webdynpro ALV Grid.

0 Kudos

Hi All,

Actually I am displaying a cloumn with checkbox in ALV Grid.

And I am not able to select multiple checkboxes at a time.

My requirement is to select multiple rows by using Checkboxes in ALV and need to delete those selected rows permanently from database table.

Please help on this .

Thanks in Advance.

Regards,

Pawith.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi reddy,

If u want select multiple records from table  then u have to put node selection cardinality 0... n.

After selecting check boxes u have to get selected data  .. to do this

For check box u have created attribute of type char1...and u biind that node to alv...if it is correct then fallow below steps..

after displaying data  select check boxes ..

get data from node using get_static_attributes_table( ) method.

in LOOP statement check the check box attribute value is 'X'  then send to another internal table ..

and delete the records from database using internal table..

Regards,

Venkat.

0 Kudos

Hi All,

Actually my problem was how to get those multiple selected checkboxes from ALV.

Thanks in Advance.

Regards,

Pavithranad.

former_member222068
Active Participant
0 Kudos

Hi Pavithranad,

   To get the records of the selected checkboxes of ALV:

Data : lo_nd_alv type ref to if_wd_context_node,

          lt_alv         type ref to wd_this->elements_alv.(ALV is the name of the node )

lo_nd_alv = wd_context->get_child_node( 'ALV' )..

lo_nd_alv->get_static_attributes_table( importing table = lt_alv ).

delete lt_alv where check_box is intial. (Check box is the name of the attribute used for checkbox in alv )

1. Delete the records from the table using loop ---- endloop

loop at lt_alv into ls_alv.

delete <DB table name > where field_name = ls_alv-field name.

endloop.

2nd Way.

2. Delete <Data Base Table Name > from table lt_alv.

Thanks & Regards,

Sankar Gelivi