ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 选择屏幕动态选择子屏幕

选择屏幕动态选择子屏幕

原创 Linux操作系统 作者:hzq2010 时间:2011-05-07 14:19:41 0 删除 编辑

REPORT  zrs08212    .

TABLES: usr02,
        sscrfields.
*---------------------------------------------------------------
* SUBSCREEN 1
*---------------------------------------------------------------
SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME. TITLE text-010.
SELECT-OPTIONS: username FOR usr02-bname  .
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN END OF SCREEN 100.

*---------------------------------------------------------------
* SUBSCREEN 2
*---------------------------------------------------------------
SELECTION-SCREEN BEGIN OF SCREEN 200 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME. TITLE text-020.
SELECT-OPTIONS: lastlogi FOR usr02-trdat.
SELECTION-SCREEN END OF BLOCK b2.
SELECTION-SCREEN END OF SCREEN 200.

*---------------------------------------------------------------
* SUBSCREEN 3
*---------------------------------------------------------------
SELECTION-SCREEN BEGIN OF SCREEN 300 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME. TITLE text-030.
SELECT-OPTIONS: classtyp FOR usr02-class.
SELECTION-SCREEN END OF BLOCK b3.
SELECTION-SCREEN END OF SCREEN 300.

SELECTION-SCREEN: FUNCTION KEY 1,
                  FUNCTION KEY 2.

SELECTION-SCREEN: BEGIN OF TABBED BLOCK sub FOR 15 LINES,
                  END OF BLOCK sub.

START-OF-SELECTION.
  SELECT * FROM usr02 WHERE bname IN username
                        AND erdat IN lastlogi
                        AND class IN classtyp.
    WRITE: / 'User ', usr02-bname,
             'Last Login Date ', usr02-trdat,
             'Last Login Time ', usr02-ltime,
             'CLASS ', usr02-class.
  ENDSELECT.

INITIALIZATION.
  sscrfields-functxt_01 = '@0D@'.
  sscrfields-functxt_02 = '@0E@'.
  sub-prog = sy-repid.
  sub-dynnr = 100.

AT SELECTION-SCREEN.
  CASE sy-dynnr.
    WHEN 100.
      IF sscrfields-ucomm = 'FC01'.
        sub-dynnr = 300.
      ELSEIF sscrfields-ucomm = 'FC02'.
        sub-dynnr = 200.
      ENDIF.
    WHEN 200.
      IF sscrfields-ucomm = 'FC01'.
        sub-dynnr = 100.
      ELSEIF sscrfields-ucomm = 'FC02'.
        sub-dynnr = 300.
      ENDIF.
    WHEN 300.
      IF sscrfields-ucomm = 'FC01'.
        sub-dynnr = 200.
      ELSEIF sscrfields-ucomm = 'FC02'.
        sub-dynnr = 100.
      ENDIF.
  ENDCASE.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/23495244/viewspace-694696/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2010-03-11

  • 博文量
    196
  • 访问量
    168079