• 如何在screen中加入selectoptions screen


    1 、定义select-options screen 和事件处理于一个单元
    data: number(4) type n value '1100'.
    selection-screen begin of screen 1100 as subscreen.
    selection-screen begin of block block_0 with frame title text-000.
    selection-screen begin of line.
    selection-screen comment 1(8) text-002.
    selection-screen position pos_low.
    parameters: p_date1 type dats default sy-datum obligatory.
    selection-screen comment pos_high(8) text-003.
    parameters: p_date2 type dats default sy-datum obligatory.
    selection-screen end of line.
    select-options  s_pq for zjw_bs_jg-zjgid_c no intervals .
    select-options  s_psz for zjw_bs_jg-zjgid_c no intervals.
    select-options  s_tjid for zjw_xq_swtj-zswtjid_c.
    parameters: p_con   radiobutton group sc2.
    parameters: p_fy   radiobutton group sc2  default 'X'.
    parameters: p_blank  radiobutton group sc2.
    selection-screen end of block block_0.
    selection-screen end of screen 1100.
    at selection-screen on value-request for s_psz-low.
      perform help_psz using 'low' '1100'.

    2、定义屏幕100
    在屏幕100加入一个子屏幕sub_screen

    3、定义屏幕100 BPO
    PROCESS BEFORE OUTPUT.
      MODULE show_logonscreen.     " 调用登录屏幕
      MODULE grid_list_init.      " 屏幕初始化
      MODULE status_0100.
      CALL SUBSCREEN sub_screen INCLUDING sy-repid  number.

    4定义屏幕100 PAI
    PROCESS AFTER INPUT.
      MODULE exec_exit_100 AT EXIT-COMMAND.
      MODULE exec_before_100.
      CALL SUBSCREEN sub_screen.
    5 Module 定义

    MODULE status_0100 OUTPUT.
    * 根据操作状态设置工具栏各功能的状态并将
    *当前操作状态需屏蔽的功能放入内表
      PERFORM before_set_100status.
    * 调用工具栏并屏蔽内表包含的功能
      SET PF-STATUS '100' EXCLUDING excl_func.
      SET TITLEBAR '100'.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    6Selection Screen Event

    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_psz-low.
      PERFORM help_psz USING 'low' '1100'.
    *&--------------------------------------------------------------------*
    *&      Form  value_help_vkbur_low
    *&--------------------------------------------------------------------*
    *根据内表数据弹出品牌选择框
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_pq-low.
    * 片区
      REFRESH it_pq.
      CLEAR it_pq.
      SELECT zjgid_c zjgname_c INTO TABLE it_pq
      FROM zjw_bs_jg
      WHERE zjglx_i = 5.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield    = 'ZJGID_C'
          dynpprog    = sy-repid
          dynpnr      = '1100'
          dynprofield = 'P_PQ'  "屏幕字段
          value_org   = 'S'
        TABLES
          value_tab   = it_pq.

    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_drpsz-low.
      PERFORM help_1200psz USING '1200'  'S_DRPSZ-LOW'.

    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_dcpsz-low.
      PERFORM help_1200psz USING '1200' 'S_DCPSZ-LOW'.

    AT SELECTION-SCREEN.
      IF sy-dynnr = 1100.
        IF ok_code = 'CACL'.
          IF p_date1 > p_date2.
            MESSAGE e040."起始日期大于截止日期,则提示信息退出
            EXIT.
          ENDIF.
        ENDIF.
      ELSEIF sy-dynnr = 1200.
        IF ok_code = 'SEAR'.
          IF p_dates > p_datee.
            MESSAGE e040."起始日期大于截止日期,则提示信息退出
            EXIT.
          ENDIF.
        ENDIF.
      ENDIF.

    AT SELECTION-SCREEN OUTPUT.
      IF sy-dynnr = 1200.
        LOOP AT SCREEN.
          CASE screen-name.
            WHEN  'S_DRPSZ-LOW' or
             '%_S_DRPSZ_%_APP_%-VALU_PUSH' or
              'S_DCPSZ-LOW' or
             '%_S_DCPSZ_%_APP_%-VALU_PUSH' or
             'P_DATES' or
             'P_DATEE'.
              CASE status_mtn.
                WHEN 'A' OR 'U'.
                  screen-input = '0'.
                WHEN OTHERS.
                  screen-input  = '1'.
              ENDCASE.
              MODIFY SCREEN.
          ENDCASE.
        ENDLOOP.
      ENDIF.

  • 相关阅读:
    Logistic回归
    朴素贝叶斯
    决策树
    K-邻近(KNN)算法
    快速排序
    归并排序
    希尔排序
    插入排序
    选择排序
    浅谈系统服务分发
  • 原文地址:https://www.cnblogs.com/xiaomaohai/p/6157426.html
Copyright © 2020-2023  润新知