zoukankan      html  css  js  c++  java
  • 权限对象和配置文件列表报表

    REPORT zusrak07.

    TABLES: usr01, usr03, usr04, usr02, rfcdes,
    usr05, usr10, usr11, usr12, usr13, ust10c, ust10s, ust12.


    SELECT-OPTIONS: usrprof FOR usr11-profn.

    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN ULINE.
    SELECTION-SCREEN SKIP.

    PARAMETERS: yes_auth RADIOBUTTON GROUP grp1,
    no_auth RADIOBUTTON GROUP grp1.

    DATA: counter TYPE i,
    count_auth TYPE i,
    coun TYPE i,
    counttmp TYPE i,
    proftmp LIKE usr12-auth,
    authtmp LIKE usr12-auth,
    auth LIKE usr12-auth OCCURS 10 WITH HEADER LINE.

    DATA: BEGIN OF itab_profchk OCCURS 0,
    profchk LIKE usr10-profn.
    DATA: END OF itab_profchk.

    SELECT * FROM usr11 WHERE profn IN usrprof.
      MOVE usr11-profn TO itab_profchk-profchk.
      APPEND itab_profchk.
    ENDSELECT.

    WRITE : / 'Legend :', '1st level profile'.
    WRITE AT /10 '2nd level profile' COLOR 5.
    WRITE AT /10 '3rd level profile' COLOR 4.
    WRITE AT /10 '4th level profile' COLOR 3.
    WRITE AT /10 'authorizations' COLOR 7.

    SORT itab_profchk.
    DELETE ADJACENT DUPLICATES FROM itab_profchk.
    PERFORM profchk.

    *---------------------------------------------------------------------*
    * FORM PROFCHK *
    *---------------------------------------------------------------------*
    * ........ *
    *---------------------------------------------------------------------*
    FORM profchk.
      LOOP AT itab_profchk.

        SELECT SINGLE * FROM usr10 WHERE profn = itab_profchk.
        SELECT SINGLE * FROM usr11 WHERE profn = itab_profchk.
        ULINE.
        WRITE:/ 'Root profile : ' COLOR 6.
        WRITE:/ itab_profchk-profchk, usr11-ptext.

        IF usr10-typ = 'C'.
          counter = 0.
          PERFORM recursive USING itab_profchk-profchk 5.
        ENDIF.

        IF NOT yes_auth IS INITIAL.
          IF usr10-typ = 'S'.
            SELECT * FROM ust10s WHERE profn = itab_profchk.
              SELECT SINGLE * FROM usr13 WHERE auth = ust10s-auth.
              WRITE AT /5 ust10s-auth COLOR 7.
              counttmp = coun + 15.
              WRITE AT 30 usr13-atext COLOR 7.
            ENDSELECT.
          ENDIF.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    "profchk

    *---------------------------------------------------------------------*
    * FORM RECURSIVE *
    *---------------------------------------------------------------------*
    * --> PROFILE *
    * --> COUNTERA *
    *---------------------------------------------------------------------*
    FORM recursive USING profile LIKE usr12-auth countera TYPE i.
      counter = counter + countera.

      SELECT * FROM ust10c WHERE profn = profile.
        CASE counter.
          WHEN 5.
            WRITE AT /counter ust10c-subprof COLOR 5.
          WHEN 10.
            WRITE AT /counter ust10c-subprof COLOR 4.
          WHEN 15.
            WRITE AT /counter ust10c-subprof COLOR 3.
        ENDCASE.
        MOVE ust10c-subprof TO proftmp.
        SELECT SINGLE * FROM usr10 WHERE profn = proftmp.
        IF usr10-typ = 'C'.
          PERFORM recursive USING proftmp 5.
        ENDIF.

        IF NOT yes_auth IS INITIAL.
          IF usr10-typ = 'S'.
            SELECT * FROM ust10s WHERE profn = proftmp.
              SELECT SINGLE * FROM usr13 WHERE auth = ust10s-auth.
              coun = counter + 5.
              WRITE AT /coun ust10s-auth COLOR 7.
              counttmp = coun + 15.
              WRITE AT counttmp usr13-atext COLOR 7.
            ENDSELECT.
            coun = 0.
          ENDIF.
        ENDIF.
      ENDSELECT.
      counter = 5.
    ENDFORM.                    "recursive 

  • 相关阅读:
    There is an overlap in the region chain修复
    There is an overlap in the region chain
    region xx not deployed on any region server
    python 中的re模块,正则表达式
    TCP粘包问题解析与解决
    yield from
    Git push提交时报错Permission denied(publickey)...Please make sure you have the correct access rights and the repository exists.
    mysql 中Varchar 与char的区别
    Mysql 字符集及排序规则
    请实现一个装饰器,限制该函数被调用的频率,如10秒一次
  • 原文地址:https://www.cnblogs.com/xiaomaohai/p/6157486.html
Copyright © 2011-2022 走看看