Skip to Content
avatar image
Former Member

Dynamic hiding buttons in Form Repeater uibb FPM

Hello,

How can I dynamically hide buttons in a FPM UIBB Form Repeater row. Or hide buttons when the UIBB is not Editable.

Kind Regards.

Richard

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Feb 05 at 08:58 AM

    Hi

    In class /BOFU/CL_FBI_GUIBB_FORM method SET_TOOLBAR_USAGES can be used to hide buttons dynamically at runtime.

    Code Snippet:

    Data : lo_cnr_ovp   TYPE REF TO if_fpm_cnr_ovp.
    lo_cnr_ovp ?= lo_fpm->get_service( cl_fpm_service_manager=>gc_key_.... ).
          IF lo_cnr_ovp IS BOUND.
            TRY.
                lo_cnr_ovp->get_toolbar_button(
                  EXPORTING
                    iv_toolbar_element_id = 'Button Element ID'
                  IMPORTING
                    es_toolbar_button     = ls_button ).
                ls_button-visibility = if_fpm_constants=>gc_visibility-not_visible.
                ls_button-enabled = abap_false.
                lo_cnr_ovp->change_toolbar_button(
                  EXPORTING
                    is_toolbar_button = ls_button ).
              CATCH cx_fpm_floorplan ##no_handler.
            ENDTRY.
          ENDIF.

    Regards


    Sambit

    Add comment
    10|10000 characters needed characters exceeded