Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Making ALV OM generic function on the Tool bar inactive but visible (grau)

Hi every body.

Please look at the following coding

DATA: lr_functions TYPE REF TO cl_salv_functions_list,

p_alv TYPE REF TO cl_salv_table.

lr_functions = p_alv->get_functions( ).

lr_functions->set_export_localfile( value = if_salv_c_bool_sap=>false ).

This coding deactivates the Export - Button on the ALV Tool bar and it is no more visible. How can i make the Button inactive (ergrauen) without making it completly invisible.

Is there a way to use the following Method ?

If yes how can i submit the Exporting and the receiving Parameter

CALL METHOD lr_functions->is_enabled

EXPORTING

name = ?

receiving

value = ?

I defined my own Function (not generic) on the Tool bar.I managed to set it inactive with the following coding.

  • Create Function

l1_icon = icon_system_save.

l1_text = text-t13.

l1_tooltip = text-t14.

TRY.

lr_functions->add_function(

name = 'BUCHEN'

icon = l1_icon

text = l1_text

tooltip = l1_tooltip

position =

if_salv_c_function_position=>right_of_salv_functions ).

CATCH cx_salv_wrong_call.

CATCH cx_salv_existing.

ENDTRY.

  • Setting it inactive

TRY.

CALL METHOD gr_functions->enable_function

EXPORTING

name = lv_function

boolean = abap_true.

CATCH cx_salv_wrong_call .

CATCH cx_salv_not_found .

CATCH cx_salv_method_not_supported .

ENDTRY.

The Function stayed visible but inactive (gray)

Best regards

Fisseha

Tags:
Former Member

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question