Chinaunix首页 | 论坛 | 博客
  • 博客访问: 149963
  • 博文数量: 54
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 508
  • 用 户 组: 普通用户
  • 注册时间: 2013-09-18 09:25
个人简介

好男人就是我,我就是你兵哥

文章分类

全部博文(54)

我的朋友

分类: IT职场

2015-01-20 18:14:12

FUNCTION zfm_get_auth_value.
*"----------------------------------------------------------------------
*"*"本地接口:
*"  IMPORTING
*"     REFERENCE(OBJECT1) TYPE  USR12-OBJCT DEFAULT 'ZBP_CHECK'
*"     REFERENCE(USER) TYPE  USR04-BNAME DEFAULT 'SY-UNAME'
*"  EXPORTING
*"     REFERENCE(EV_MESSAGE) TYPE  STRING
*"     REFERENCE(RT_RANGE) TYPE  ZRANGES_T  "ZRANGES_T参考的行类型是/IWFND/RANGES
*"----------------------------------------------------------------------
  DATA ls_values TYPE us335.
  DATA lt_values TYPE TABLE OF us335.
  DATA rs_range TYPE /iwfnd/ranges.
  CALL FUNCTION 'GET_AUTH_VALUES'
   EXPORTING
      object1                 = object1
      user                    = user
    TABLES
      values                  = lt_values
   EXCEPTIONS
     user_doesnt_exist       = 1
     OTHERS                  = 2
            .
  IF sy-subrc <> 0.
   ev_message = '没有读取到权限对象值,清检查'.
  ENDIF.
  CLEAR RT_RANGE[].
  LOOP AT lt_values INTO ls_values.
    IF ls_values-lowval IS NOT INITIAL AND ls_values-highval IS NOT INITIAL.
        rs_range-sign = 'I'.
        rs_range-option = 'BT'.
        rs_range-low = ls_values-lowval.
        rs_range-high = ls_values-highval.
        APPEND rs_range TO rt_range.
    ELSEIF ls_values-lowval NA '*'AND ls_values-highval IS  INITIAL."Ls_values-lowval IS NOT INITIAL AND
        rs_range-sign = 'I'.
        rs_range-option = 'EQ'.
        rs_range-low = ls_values-lowval.
        rs_range-high = ls_values-highval.
        APPEND rs_range TO rt_range.
    ELSEIF Ls_values-lowval CA '*'.
        rs_range-sign = 'I'.
        rs_range-option = 'CP'.
        rs_range-low = ls_values-lowval.
        rs_range-high = ls_values-highval.
        APPEND rs_range TO rt_range.
    ENDIF.
  CLEAR Ls_values.
  ENDLOOP.




ENDFUNCTION.
阅读(755) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~