cancel
Showing results for 
Search instead for 
Did you mean: 

How to remove Buttons

Former Member
0 Kudos

Hello All,

I have created ALV for displaying the output of customised table using Webdynpro. I have hides some standard buttons and created new customized buttons like "Refresh, Change", ......

I have created URL link for my webynpro component for displaying/changing the table, If user have access only to display the table then automatically the created customized buttons should be invisible/hide.

Can you please tell me how to solve the above issue.

BR

Srinivas

Accepted Solutions (0)

Answers (2)

Answers (2)

ramakrishnappa
Active Contributor
0 Kudos

Hi Srinivas,

As suggested by Katrice, you go ahead by creating authorization object.

While configuring alv buttons, you check for required access and create buttons / make visibility settings as user authorized to do so.

Regards,

Rama

Former Member
0 Kudos

Hi Srinivas,

Create one authorization object.And before creating buttons for your ALV table,check authorization object.If sy-subrc = 0, create button,else "do nothing.

ex :

AUTHORITY-CHECK OBJECT '<auth_object>'  ID '<field>' FIELD '<value>'

if     sy-subrc = 0.

CREATE OBJECT lr_buttonui.

*  lr_buttonui->set_text('Refresh')."setting the text of the button on alv toolbar

  lr_buttonui->set_tooltip( 'Refresh' ).

  button1 = lv_value->if_salv_wd_function_settings~create_function( id = 'REFRESH')."creating the function for alv button

  button1->set_editor( lr_buttonui ).

endif.

Thanks

KH