码迷,mamicode.com
首页 > 其他好文 > 详细

[SAP ABAP开发技术总结]权限对象检查

时间:2015-02-01 16:05:26      阅读:655      评论:0      收藏:0      [点我收藏+]

标签:

声明:原创作品转载时请注明文章来自SAP师太博客并以超链接形式标明文章原始出处否则将追究法律责任!
原文出自:

20.14.             权限检查

AT SELECTION-SCREEN.
 
DATA: BEGIN OF lt_bukrs OCCURS 0,
    bukrs
TYPE t001-bukrs,
   
END OF lt_bukrs.
 
SELECT bukrs FROM t001 INTO CORRESPONDING FIELDS OF TABLE lt_bukrs  WHERE bukrs IN s_bukrs.
 
LOOP AT lt_bukrs
.
    AUTHORITY-CHECK OBJECT ‘ZDABAP‘   [?:?θ?riti]
          
ID VKORGDUMMY                      销售组织
          
ID ‘BUKRS‘ FIELD lt_bukrs-bukrs        公司代码
          
ID WERKSDUMMY                      工厂
          
ID EKORGDUMMY                      采购组织
          
ID KOKRSDUMMY
          
ID GSBER
DUMMY
          
ID SEGMENTDUMMY.

   
IF sy-subrc <> 0."
     
MESSAGE s001(00) DISPLAY LIKE ‘E‘ WITH ‘You do not have authorization to access company code:‘ lt_bukrs-bukrs.
     
STOP.
   
ENDIF.
 
ENDLOOP.
ENDFORM.

[SAP ABAP开发技术总结]权限对象检查

标签:

原文地址:http://www.cnblogs.com/jiangzhengjun/p/4265610.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!