ABAP合集SAP

ABAP SAPGUI 里使用 F4 value help 选择

2022-04-06  本文已影响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.
上一篇下一篇

猜你喜欢

热点阅读