美文网首页ABAP合集SAP
ABAP SAPGUI 里使用 F4 value help 选择

ABAP SAPGUI 里使用 F4 value help 选择

作者: _扫地僧_ | 来源:发表于2022-04-06 08:22 被阅读0次

    这个简单的 report 执行后效果如下,弹出一个对话框,通过下拉菜单选择时间:

    选定之后,传回到报表里,打印出来:

    源代码:

    report z.
    data: help_info     type help_info,
          SELECT_VALUE  type HELP_INFO-FLDVALUE,
          DYNPSELECT    type DSELC occurs 0 with header line,
          DYNPVALUETAB  type DVAL  occurs 0 with header line.
    
    initialization.
    
    HELP_INFO-CALL  = 'V'.
    HELP_INFO-OBJECT  = 'F'.
    HELP_INFO-PROGRAM     = sy-repid.
    HELP_INFO-DYNPRO  = sy-dynnr.
    HELP_INFO-TABNAME     = 'BTCH3071'.
    HELP_INFO-FIELDNAME  = 'FROM_TIME'.
    HELP_INFO-FIELDTYPE  = 'TIME'.
    HELP_INFO-FIELDLNG    = '08'.
    HELP_INFO-SPRAS  = 'E'.
    HELP_INFO-MENUFUNCT  = 'HC'.
    
    start-of-selection .
    
    CALL FUNCTION 'DD_SHLP_CALL_FROM_DYNP'
      EXPORTING
        help_infos         = help_info
     IMPORTING
       SELECT_VALUE       = SELECT_VALUE
      TABLES
        dynpselect         = dynpselect
        dynpvaluetab       = dynpvaluetab
              .
    
    write:/ 'the selected value is:' , SELECT_VALUE.
    

    相关文章

      网友评论

        本文标题:ABAP SAPGUI 里使用 F4 value help 选择

        本文链接:https://www.haomeiwen.com/subject/wxmijrtx.html