Skip to Content
avatar image
Former Member

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!!!!

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Oct 18, 2008 at 05:29 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 18, 2008 at 11:57 PM

    Thank you!!!!!!!!!!!!!

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 20, 2008 at 10:53 AM

    Note that prior to step 4 you must declare 'e_object' as a parameter for method 'HANDLE_TOOLBAR'.

    Add comment
    10|10000 characters needed characters exceeded