I tried this but it does not work, on my status i created button with function code BUT.
if i call method gr_functions->set_function( name = 'BUT' boolean = 'X' ) exception cx_salv_not_found is raised. It is because i dont have any function called 'BUT' but my function code is 'BUT'......