cancel
Showing results for 
Search instead for 
Did you mean: 

dynamically change tool bar on multiple row select in alv

0 Kudos

Hi,

I have an ALV table with tool bar contains three buttons ( Ex: Copy, Assign and delete ).

Here the two buttons Copy and Assign buttons, i want to disable when i select multiple rows in ALV table.

Only 'delete' can be done on multiple row selection.

I tried ON_LEAD_SELECT of alv event, but this is only triggering for lead selection change(not for multiple row select, mean if i press CTRL and select other rows, this event is not triggering as the lead selection is not changed).

Even WDMODIFYVIEW and WDDOAFTERACTION are also not triggering for multiple row select.

Suggest  if any solution.

Thanks,

Ramakrisna

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member184578
Active Contributor
0 Kudos

Hi,

Try using ON_SELECT event instead of on_lead_select. you can set the ON_SELECT event using method IF_SALV_WD_TABLE_SETTINGS~SET_ON_SELECT_ENABLED .

Am not sure whether it works, just give a try. check this help for reference:

http://help.sap.com/saphelp_erp60_sp/helpdata/en/38/c5bacc91a345eda17f2903491c391d/content.htm

Regards,

Kiran

0 Kudos

Hi Kiran,

Thanks for the reply, i could not find SET_ON_SELECT_ENABLED in  IF_SALV_WD_TABLE_SETTINGS interface.

And the event ON_SELECT is not part of standard ALV events.

Can u explain me in detail.

Thanks,

Ramakrishna

Former Member
0 Kudos

if you implement component  SALV_WD_TABLE in your view  then go in method tab and select event from dropdown and on column F4 there is search help assign on clicking search help you will be able to see this event

former_member184578
Active Contributor
0 Kudos

Hi,

Which NW version you are on..? I can see set_on_select_enabled method. In properties tab of view create the ALV interface controller usage.

Then, In methods tab, create an evenhandler method and click F4 in the Event column and select ON_SELECT event.

In DOINIT method, set_on_select_enabled to true.

try this code:

DATA lr_salv_wd_table TYPE REF TO iwci_salv_wd_table,

DATA lr_config TYPE REF TO cl_salv_wd_config_table.

       lr_salv_wd_table = wd_this->wd_cpifc_compuse_ALV( ).

       lr_config             = lr_salv_wd_table->get_model( ).

lr_config->if_salv_wd_table_settings~SET_ON_SELECT_ENABLED( abap_true ).

Regards,

Kiran

0 Kudos

Hi kiran,

Im on netweaver 7. i tried all the ways F4 help does not showing me the event ON_SELECT

and

lr_config->if_salv_wd_table_settings~SET_ON_SELECT_ENABLED( abap_true ).

giving a syntax error says that method not available.

Thanks,

Ramakrishna

0 Kudos

Hi Kiran,

I just checked it in Netweaver 7.02, the method and event are available, but my dev system is on Netweaver 7.0. can we solve this issue in some how in NW 7.0?

Thanks,

Ramakrishna

former_member184578
Active Contributor
0 Kudos

Hi,

Yes. It is supported from 7.02. This SAP Note 1281200 may help you.

Regards,

Kiran

0 Kudos

But this not cant be applied on 7.0. it is applicable from SAP BASIS 701 onwards, and our system is on SAP BASIS 700.

Anyways thanks for all replies.