• How to capture input values in the selection screen?


    Use the function module RS_REFRESH_FROM_SELECTOPTIONS to capture the values entered by the user in the selection screen. This FM will return the input values in the selection screen to a selection table. Selection table has the structure RSPARAMS:

    SELNAME = Name of selection criterion

    KIND = Type of selection (parameter or select-option)

    SIGN = ‘I’ (Inclusive) or ‘E’ (Exclusive)

    OPTION = e.g. ‘BT’, ‘EQ’, ‘LE’.

    LOW = Lower limit

    HIGH = Upper limit

    *&---------------------------------------------------------------------*
    
    *& Data Declaration
    
    *&---------------------------------------------------------------------*
    
    TABLES: mara.
    
    DATA:gt_params TYPE TABLE OF rsparams.
    
    DATA:gwa_params TYPE rsparams.
    
    *&---------------------------------------------------------------------*
    
    *& Selection Screen
    
    *&---------------------------------------------------------------------*
    
    SELECT-OPTIONS:s_matnr FOR mara-matnr.
    
    PARAMETERS:p_mtart TYPE mara-mtart.
    
    PARAMETERS:p_matkl TYPE mara-matkl.
    
    *&---------------------------------------------------------------------*
    
    *& Start of Selection
    
    *&---------------------------------------------------------------------*
    
    START-OF-SELECTION.
    
    CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
    
    EXPORTING
    
    curr_report = sy-repid
    
    TABLES
    
    selection_table = gt_params[].
    
    SORT gt_params BY kind.
    
    WRITE:/ 'Parameters'.
    
    WRITE:/ 'Name' ,20 'Value' .
    
    LOOP AT gt_params INTO gwa_params WHERE kind = 'P'.
    
    WRITE:/ gwa_params-selname ,20 gwa_params-low.
    
    ENDLOOP.
    
    skip.
    
    WRITE:/ 'Select-Options'.
    
    WRITE:/ 'Name' ,20 'Sign' ,25 'Option',32 'Low',52 'High'.
    
    LOOP AT gt_params INTO gwa_params WHERE kind = 'S'.
    
    WRITE:/ gwa_params-selname ,20 gwa_params-sign ,
    
    25 gwa_params-option, 32 gwa_params-low,
    
    52 gwa_params-high.
    
    ENDLOOP.

    Selection Screen

    capture-input-values-1

    Output

    capture-input-values-2


  • 相关阅读:
    使用snmp+mrtg监控CPU、流量、磁盘空间、内存
    ISO20000
    nginx入门篇----nginx服务器基础配置
    oracle数据库备份和还原
    oracle创建删除用户和表空间
    Centos 6.5安装oracle 11g
    nginx入门篇----安装、部署、升级
    vue 高德地图 地图初始化显示接口返回的多个经纬度
    vue element UI el-table 单元格中超出字省略号显示
    vue + element ui 打印
  • 原文地址:https://www.cnblogs.com/Nirvanacafe/p/4435256.html
Copyright © 2020-2023  润新知