Skip to Content

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

deactivate 'APPROVE' button in the ALV in RCATS_APPROVE_ACTIVITIES.

Hi all,

I am trying to deactivate 'APPROVE' button in the ALV output of the program RCATS_APPROVE_ACTIVITIES.

Any ideas???

Thanx in advance!!!!

replied

Hello Grigoria

The following steps are necessary to implement your requirement:

(1) Create BAdI implementation for BAdI CATS_REPORTING (i.e. class implementing interface IF_EX_CATS_REPORTING => e.g. ZCL_IM_CATS_REPORTING).

(2) Add a public method HANDLE_TOOLBAR (to your BAdI implementing class) as event handler for event TOOLBAR of CL_GUI_ALV_GRID

(3) Set method HANDLE_TOOLBAR as event handler for the CATS displaying grid instance:

METHOD if_ex_cats_reporting~before_display_appr.

  SET HANDLER: handle_toolbar FOR im_alv_grid.

ENDMETHOD.

(4) Inactive the APPROVE toolbar button within the event handler method:

METHOD handle_toolbar.
* define local data
  DATA: ls_button   TYPE stb_button.

  LOOP AT e_object->mt_toolbar INTO ls_button.

    CASE ls_button-function.
      WHEN cl_grid_approval_actexp=>co_ok_approve.
        ls_button-disabled = 'X'.

      WHEN OTHERS.
        CONTINUE.
    ENDCASE.

    MODIFY e_object->mt_toolbar FROM ls_button INDEX syst-tabix.
  ENDLOOP.

ENDMETHOD.

Regards

Uwe

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question