FORM form_25.
DATA: actvt(2) TYPE c,
wa_vim TYPE vimsellist.
CHECK IS ASSIGNED.
READ TABLE INTO wa_vim WITH KEY ('VIEWFIELD') = 'EKORG'.
CHECK sy-subrc = 0.
CASE vim_auth_action.
WHEN 'U'.
actvt = '01'.
WHEN OTHERS.
actvt = '03'.
ENDCASE.
AUTHORITY-CHECK OBJECT 'M_BEST_EKO'
ID 'ACTVT' FIELD actvt
ID 'EKORG' FIELD wa_vim-value.
vim_auth_rc = 0 .
vim_auth_msgid = 'OO'.
vim_auth_msgno = 000 .
CASE sy-subrc.
WHEN 0.
WHEN 4.
AUTHORITY-CHECK OBJECT 'M_BEST_EKO'
ID 'ACTVT' FIELD '03'
ID 'EKORG' FIELD wa_vim-value.
IF sy-subrc = 0.
CONCATENATE '對採購組織' wa_vim-value '只有顯示的權限!' INTO vim_auth_msgv1 .
vim_auth_rc = 4.
ELSE.
CONCATENATE '沒有對採購組織' wa_vim-value '的權限!' INTO vim_auth_msgv1 .
vim_auth_rc = 8.
ENDIF.
WHEN OTHERS.
CONCATENATE '沒有對採購組織' wa_vim-value '的權限!' INTO vim_auth_msgv1 .
vim_auth_rc = 8.
ENDCASE.
ENDFORM. "form_25
阅读(7682) | 评论(2) | 转发(0) |