ITPub博客

首页 > Linux操作系统 > Linux操作系统 > F8 执行的控制

F8 执行的控制

原创 Linux操作系统 作者:xxb-xue 时间:2011-02-23 10:18:46 0 删除 编辑

最近有一个特殊的要求,在开始阶段,F8 是不进入START-OF-SELECTION  .的事件。

需要在联系按两次F8 执行,才执行程序。

为了满足这样的问题,写一个程序:

REPORT  ZTESTJOHN11.


TABLES SSCRFIELDS.

PARAMETERS: P1(1) TYPE C MODIF ID 001,
            P2(1) TYPE C MODIF ID 002,
            P3(1) TYPE C NO-DISPLAY.
*SELECTION-SCREEN PUSHBUTTON 1(8) BUT1 USER-COMMAND BUTN.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN PUSHBUTTON 1(8) BUT1 USER-COMMAND BUTN. " 定义搜索按钮
SELECTION-SCREEN END OF LINE.

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

INITIALIZATION.
  SSCRFIELDS-FUNCTXT_01 = '返回'.
  SSCRFIELDS-FUNCTXT_02 = 'UA'.
  BUT1 = '基础数据'.

AT SELECTION-SCREEN OUTPUT.

*  LOOP AT SCREEN.
*  if  SCREEN-NAME = 'SSCRFIELDS-UCOMM'.
*    SCREEN-ACTIVE = 0.
*    MODIFY SCREEN.
*    ENDIF.
*  ENDLOOP.

  IF P3 = 'X'.
    LOOP AT SCREEN.
      IF SCREEN-NAME EQ 'BUT1'.  "wbs模板
        SCREEN-ACTIVE = 1.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
  ELSE.
    LOOP AT SCREEN.
      IF SCREEN-NAME EQ 'BUT1'.  "wbs模板
        SCREEN-ACTIVE = 0.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
  ENDIF.
  LOOP AT SCREEN .
    IF SCREEN-GROUP1 = '001'.
      IF P3 = 'X'.
        SCREEN-INPUT = 0.
        SCREEN-OUTPUT = 0.
        SCREEN-ACTIVE = 0.
      ELSE.
        SCREEN-INPUT = 1.
        SCREEN-OUTPUT = 1.
        SCREEN-ACTIVE = 1.
      ENDIF.
      MODIFY SCREEN.
    ENDIF.
    IF SCREEN-GROUP1 = '002'.
      IF P3 = ''.
        SCREEN-INPUT = 0.
        SCREEN-OUTPUT = 0.
        SCREEN-ACTIVE = 0.
      ELSE.
        SCREEN-INPUT = 1.
        SCREEN-OUTPUT = 1.
        SCREEN-ACTIVE = 1.
      ENDIF.
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.

AT SELECTION-SCREEN.
  CASE SSCRFIELDS-UCOMM.
    WHEN 'FC01' OR 'BUTN'.
      IF P3 = 'X'.
        CLEAR P3.
      ENDIF.
    WHEN 'FC02'.

    WHEN 'ONLI'.
      IF P3 IS INITIAL.
        SUBMIT ZTESTJOHN11 VIA SELECTION-SCREEN
            WITH P1 = P1
            WITH P2 = P2
            WITH P3 = 'X'.

      ENDIF.

  ENDCASE.


START-OF-SELECTION.
  WRITE:/ 'START-OF-SELECTION'.

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

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

注册时间:2010-06-23

  • 博文量
    15
  • 访问量
    48304