cancel
Showing results for 
Search instead for 
Did you mean: 

Renameing the standard ALV button

Former Member
0 Kudos

Hi friends,

I am using the below code to Rename the standard ALV button 'Delete row'.

but i am getting the error as 'Access to protected method "SET_TEXT(" is not allowed.

DATA:

lr_function_settings TYPE REF TO if_salv_wd_function_settings,

lr_function TYPE REF TO cl_salv_wd_function_std,

lv_text TYPE string.

lv_text = 'delete Line'.

lr_function_settings ?= lo_interfacecontroller->get_model( ).

lr_function = lr_function_settings->get_function_std( if_salv_wd_c_std_functions=>edit_delete_row ).

lr_function->set_text( lv_text ).

how do I rename the standard ALV button?

Regards,

Xavier.P

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi friends,

>

> I am using the below code to Rename the standard ALV button 'Delete row'.

>

> but i am getting the error as 'Access to protected method "SET_TEXT(" is not allowed.

>

>

> DATA:

> lr_function_settings TYPE REF TO if_salv_wd_function_settings,

> lr_function TYPE REF TO cl_salv_wd_function_std,

> lv_text TYPE string.

>

> lv_text = 'delete Line'.

> lr_function_settings ?= lo_interfacecontroller->get_model( ).

> lr_function = lr_function_settings->get_function_std( if_salv_wd_c_std_functions=>edit_delete_row ).

> lr_function->set_text( lv_text ).

>

>

> how do I rename the standard ALV button?

>

>

> Regards,

> Xavier.P

Try using

lr_function->text = lv_text .

Former Member
0 Kudos

hi senthil,

Now i get the error as : Write access to the READ-ONLY attribute "TEXT" is not allowed outside the class.

after insertuing the below code.

lr_function->text = lv_text.

Regards,

Xavier.P

saravanan_narayanan
Active Contributor
0 Kudos

Hello Xavier,

There is no direct way to do this. Only workaround is possible. Please refer the solution proposed in this thread.

BR, Saravanan

Former Member
0 Kudos

Hi Saraa,

Do i need to create zcl_salv_wd_a_function_std ?

Regards,

Xavier.P

saravanan_narayanan
Active Contributor
0 Kudos

Hello Xavier,

Yes. we just know only this workaround. No one else came up with proper solution for this.

BR, Saravanan

Former Member
0 Kudos

Thank you Saravanan .

Answers (0)