cancel
Showing results for 
Search instead for 
Did you mean: 

About cl_salv_wd_fe_button_choice........

Former Member
0 Kudos

Hi all,

I created a button choice in ALV toolbar of the type...cl_salv_wd_fe_button_choice ..

But i m unable to make a choice list for it....

I have doubt about the syntax...to use this class object...

Plz help me out.

Thks nd Regards,

Runali.

Accepted Solutions (0)

Answers (1)

Answers (1)

Madhu2004
Active Contributor
0 Kudos

Hai,

You just create an object for it as follows:

data:lr_button_choice type ref to cl_salv_wd_fe_button_choice.

create object lr_button_choice.

next with refernce to the methods available in the class you make a choice,

suppose u use a method to add choice as foolows:

lr_button_choice~add_choice( ) etc

madhu

Former Member
0 Kudos

Hey thks,

But i cant use '~' to access the method...coz its not an interface and also add_choice has parameter of type cl_salv_wd_menu_action_item, where i m gettin a probm...how to use the method add_choice...also

If at all i created da object of type cl_salv_wd_menu_action_item...i again need to use method set_item...where we fill da list to be displayd in button_choice...

Its really creatin lotz of probm...

Hope i wll get da reply soon....

Thks and Regards,

Runali.

Madhu2004
Active Contributor
0 Kudos

u can do it this way:

DATA:

lr_choice TYPE REF TO cl_salv_wd_menu_action_item.

CREATE OBJECT lr_choice

EXPORTING

id = 'WORD'.

lr_choice->set_text( 'Word' ).

lr_button_choice->add_choice( lr_choice ).

CREATE OBJECT lr_choice

EXPORTING

id = 'EXCEL'.

lr_choice->set_text( 'Excel' ).

lr_button_choice->add_choice( lr_choice ).