`
Daniel_Fang
  • 浏览: 46311 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

Additional Functionality on SELECT-OPTIONS

阅读更多

      对于SELECT-OPTIONS我们常用OBLIGATORY / NO-DISPLAY / VISIBLE LENGTH vlen / NO-EXTENSION / NO INTERVALS / MODIF ID modid 进行screen上的设置,下面的FM可以对Multiple Selection进行进一步的设置,比喻只能输入select value而不能用exclude value。采用FM SELECT_OPTIONS_RESTRICT,加在INITIALIZATION事件里就可以解决这个问题

 

      同样,如何对Multiple Selection进行值的初始化呢?  针对下面的例子同样在INITIALIZATION事件中

          MOVE 'I' TO belnr-sign.
          MOVE '1' TO belnr-low.
          APPEND belnr.
          MOVE '2' TO belnr-low.
          APPEND belnr.

 

       此外如何得到selection_options上没有确认前的界面上的值呢?SAP同样提供了一个很好的FM RS_REFRESH_FROM_SELECTOPTIONS  去获得当前selection screen上的值 

 

 

 

Reference to a system Program: RCATSBEL 

REPORT RCATSBEL MESSAGE-ID LR.
TABLES: CATSDB.
SELECT-OPTIONS: BELNR FOR CATSDB-BELNR NO INTERVALS.
DATA: TAB_BELNR LIKE CATS_BELNR OCCURS 0 WITH HEADER LINE.
TYPE-POOLS SSCR.
DATA: RESTRICT TYPE SSCR_RESTRICT.
DATA: OPT_LIST TYPE SSCR_OPT_LIST.
DATA: ASS      TYPE SSCR_ASS.

INITIALIZATION.
* restrict input possibilities
  MOVE 'BELNR'      TO OPT_LIST-NAME.
  MOVE 'X' TO: OPT_LIST-OPTIONS-EQ.
  APPEND OPT_LIST TO RESTRICT-OPT_LIST_TAB.
  MOVE: 'A'          TO ASS-KIND,
        'I'          TO ASS-SG_MAIN,
        ' '          TO ASS-SG_ADDY,
        'BELNR'      TO ASS-OP_MAIN.
  APPEND ASS TO RESTRICT-ASS_TAB.


  CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
       EXPORTING
            RESTRICTION            = RESTRICT
       EXCEPTIONS
            TOO_LATE               = 1
            REPEATED               = 2
            SELOPT_WITHOUT_OPTIONS = 3
            SELOPT_WITHOUT_SIGNS   = 4
            INVALID_SIGN           = 5
            EMPTY_OPTION_LIST      = 6
            INVALID_KIND           = 7
            REPEATED_KIND_A        = 8
            OTHERS                 = 9.

* start to display the document
START-OF-SELECTION.
  PERFORM FILL_BELNR_TAB.
  PERFORM DISPLAY_DOCUMENT.

*---------------------------------------------------------------------*
*       FORM FILL_BELNR_TAB                                           *
*---------------------------------------------------------------------*
*       Fill internal table                                           *
*---------------------------------------------------------------------*
FORM FILL_BELNR_TAB.
  REFRESH TAB_BELNR.
  IF NOT BELNR IS INITIAL.
    LOOP AT BELNR.
      TAB_BELNR-BELNR = BELNR-LOW.
      APPEND TAB_BELNR.
    ENDLOOP.
  ELSE.
    MESSAGE I228.
    STOP.
  ENDIF.
ENDFORM.


*---------------------------------------------------------------------*
*       FORM DISPLAY_DOCUMENT                                         *
*---------------------------------------------------------------------*
*       display document                                              *
*---------------------------------------------------------------------*
FORM DISPLAY_DOCUMENT.
  CALL FUNCTION 'CATS_DISPLAY_DOCUMENT'
       TABLES
            TAB_BELNR         = TAB_BELNR
       EXCEPTIONS
            NO_DOCUMENT_FOUND = 1
            NO_DATA           = 2
            SYSTEM_ERROR      = 3
            OTHERS            = 4.
  IF SY-SUBRC = 1.
    MESSAGE I170.
  ELSEIF SY-SUBRC = 2.
    MESSAGE I072.
  ELSEIF SY-SUBRC = 3.
    MESSAGE E020.
  ELSEIF SY-SUBRC = 4.
    MESSAGE E030.
  ENDIF.
ENDFORM.

 

 

 

分享到:
评论

相关推荐

    Bochs - The cross platform IA-32 (x86) emulator

    - re-implemented "options" parameter for additional options of connected devices (currently only used to set the speed reported by device and to specify an alternative redolog file of USB MSD disk ...

    EhLib5.0.13 最新的ehlib源码

    Library Path (For Delphi 9 in Tools->Options->Environment Options-> Delphi Options->Library - Win32->Library Path). Use "File\Open..." menu item of Delphi IDE to open the runtime package - EhLibXX....

    Senfore_DragDrop_v4.1

    Just open the forms in the IDE, then select "Ignore All" when the IDE complains that this or that property doesn't exist and finally save the forms. ------------------------------------------- 3. ...

    EhLib 8.0 Build 8.0.023 Pro Edition FullSource for D7-XE8

    Allows to select records, columns and rectangle areas. Special titles that can correspond to several/all columns. Footer that is able to show sum/count/other field values. Automatic column ...

    EhLib 6.3 Build 6.3.176 Russian version. Full source included.

    Allows to select records, columns and rectangle areas. Special titles that can correspond to several/all columns. Footer that is able to show sum/count/other field values. Automatic column ...

    EhLib 9.1.024

    Allows to select records, columns and rectangle areas. Special titles that can correspond to several/all columns. Footer that is able to show sum/count/other field values. Automatic column ...

    ehlib_vcl_src_9_3.26

    Allows to select records, columns and rectangle areas. Special titles that can correspond to several/all columns. Footer that is able to show sum/count/other field values. Automatic column ...

    ICS delphixe10源码版

    ICS - Internet Component Suite - V8 - ...Uninstall an existing ICS package (Menu | Component | Install Packages, select the component package and click Remove). Rename the old ICS directory and unzip to...

    2009 达内Unix学习笔记

    集合了 所有的 Unix命令大全 ...telnet 192.168.0.23 自己帐号 sd08077-you0 ftp工具 192.168.0.202 tools-toolss ... 各个 shell 可互相切换 ksh:$ sh:$ csh:guangzhou% bash:bash-3.00$ ... 命令和参数之间必需用空格隔...

    RxLib控件包内含RxGIF,全部源码及DEMO

    TRxDBLookupList is the same as TRxDBLookupCombo (in functionality). TRxDBComboBox is a TDBComboBox descendant allowing to have different values displayed from that stored in database without using a ...

    pdf-e ready guide

    4. **Configure Additional Settings**: Depending on the specific requirements of your PDF/E files, you may need to adjust other settings such as compression, color management, and security. These ...

    PowerCommands for Visual Studio 2008

    PowerCommands 1.1 is a set of useful extensions for the Visual Studio 2008 adding additional functionality to various areas of the IDE. The source code is included and requires the VS SDK for VS 2008 ...

    Absolute Database for D7

    Functionality Unicode support in String and Memo fields Multiple-fields indexes with descending, ascending, case-sensitive and insensitive options Shareable tables Default values support Min, max and ...

    UE(官方下载)

    The selected text compare allows you to select portions of text between 2 files and execute a compare on ONLY the se Using the SSH/telnet console A tutorial for UltraEdit/UEStudio's SSH/telent ...

    VisualFoxPro6.0中文版命令手册.pdf

    They have similar functionality but offer different options. **Rename a Table:** ```plaintext RENAME TABLE 表名1 TO 表名2 ``` Renames a table. The original table must exist and not be currently open...

    python3.6.5参考手册 chm

    PEP 448 - Additional Unpacking Generalizations PEP 461 - percent formatting support for bytes and bytearray PEP 484 - Type Hints PEP 471 - os.scandir() function – a better and faster directory ...

    Windows MicroXP 0.82[Microsoft Windows XP SP3原版加工成的微型XP系统,=99.9%个完整XP]

    You cannot add any additional users. Do not try to add more users, otherwise your main account that is used by default (Administrator) will become the new account and after logging in, you will not ...

    cirris operation manual

    Add-on scanners can enhance the functionality of the 1100H+ by providing additional capabilities such as barcode scanning. To install: 1. **Select Scanner Type**: Choose the appropriate scanner model...

    微软内部资料-SQL性能优化2

    By leveraging the Address Windowing Extensions API, an application can create a fixed-size window into the additional physical memory. This allows a process to access any portion of the physical ...

    Radmin自动登录器v3.0-多国语言绿色版-Release1-20150615

    1、程序功能和使用环境介绍 2、程序操作方法介绍 3、登录信息文件RadminM.txt介绍 4、登录信息文件RadminM.txt的转换和编制 5、v3.0版新增解锁远程桌面功能 6、相关配置和多种语言支持介绍 ...

Global site tag (gtag.js) - Google Analytics