Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Deselect all in ALV tree

Former Member
0 Kudos

Hi There,

I have added a toolbar for select and deselect all in ALV tree..

I added the code to 'select all' button in the toolbar and is working perfectly fine...

When I use the same code for deselect all, it doesnt work..

Please assist..

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi ,

try this code:

*when 'the name of your deselect button'.

WHEN 'DESELECT'.

*change the corresponding itab.

LOOP AT it_ltak INTO wa_ltak.

CLEAR wa_ltak-sel.

MODIFY it_ltak FROM wa_ltak TRANSPORTING sel.

ENDLOOP.

rs_selfield-refresh = 'X'.

5 REPLIES 5

tarangini_katta
Active Contributor
0 Kudos

Hi Arif,

Check the function code for 'deselect all'. then it should for you.I think it is '&SAL' for select &ALL.

please let me know if you have any further issue

Thanks

viquar_iqbal
Active Contributor
0 Kudos

Hi

For deselecting all the change in your existing select all code would be

If checkbox eq 'X'

checkbox = ' ' .

modify line

endif.

Thanks

Viquar Iqbal

Former Member
0 Kudos

Hi ,

try this code:

*when 'the name of your deselect button'.

WHEN 'DESELECT'.

*change the corresponding itab.

LOOP AT it_ltak INTO wa_ltak.

CLEAR wa_ltak-sel.

MODIFY it_ltak FROM wa_ltak TRANSPORTING sel.

ENDLOOP.

rs_selfield-refresh = 'X'.

0 Kudos

no help..

Tried with checkbox-chosen = ' '. but internally in the method called the data for checkbox is saved so the deselect all does not work..

Is there a particular method to be used for deselect all please let me know..

0 Kudos
  • set checked flag

lds_item_layout-chosen = ''.

lds_item_layout-u_chosen = 'X'.

it works for deselect all.

i have tested it in my project