Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 2800

Re: how to disable functionalities on customized toolbar

$
0
0

Hi,

you can use the following approach if it's an ALV report.

 

Data :IT_EXCLUDE TYPESLIS_T_EXTAB,

      WA_EXCLUDE LIKELINEOF IT_EXCLUDE

 

subroutine to exclude the controls on the ALV Display.

PERFORMEXCLUDE_TB_FUNCTIONS.

 

CALLFUNCTION'REUSE_ALV_GRID_DISPLAY'

  EXPORTING

    I_CALLBACK_PROGRAM       = I_REPID

    I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'

    I_CALLBACK_USER_COMMAND  = 'USER_COMMAND'

    IS_LAYOUT                = WA_LAYOUT

    IT_FIELDCAT              = FCAT

    IT_EXCLUDING             = IT_EXCLUDE  """" exclude table

    IT_EVENTS                = I_EVENTS[]

  TABLES

    T_OUTTAB                 = IT_ERROR

  EXCEPTIONS

    PROGRAM_ERROR            = 1

    OTHERS                   = 2.

IFSY-SUBRC <> 0.

  MESSAGEID SY-MSGID TYPESY-MSGTY NUMBER SY-MSGNO

          WITHSY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

*---------------------------------------------------------------------*

*       Form  exclude_tb_functions

*---------------------------------------------------------------------*

*       text

*---------------------------------------------------------------------*

 

FORMEXCLUDE_TB_FUNCTIONS .

if sy-uname = "SAPUSER".   user for which you want to disable the button

  WA_EXCLUDE-FCODE = C_INFO.  " fcode of the button

  APPENDWA_EXCLUDE TOIT_EXCLUDE.

  CLEARWA_EXCLUDE.

endif.

ENDFORM.                    "exclude_tb_functions


Viewing all articles
Browse latest Browse all 2800

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>