文章目录
1.背景
通过角色管理来实现按钮的隐藏.
2.代码如下
MODULE status_0100 OUTPUT.
CLEAR sy-ucomm.
CLEAR ok_code.
APPEND 'EXPORT' TO fcode.
APPEND 'IMPORT' TO fcode.
SELECT SINGLE * FROM agr_users WHERE uname = sy-uname AND agr_name = 'Z_AU_ZRMM148'.
IF sy-subrc is NOT INITIAL.
APPEND 'DELETE' TO fcode.
APPEND 'EXEC' TO fcode.
ENDIF.
SET PF-STATUS 'STATUS_100' EXCLUDING fcode.
SET TITLEBAR 'TITLE_100'.
ENDMODULE.
3.结果
如果在在角色管理加上相应的用户,则这两个按钮就不能看见.