ALV popup based on classic style REUSE_ALV_POPUP_TO_SELECT function module

http://www.kerum.pl/infodepot/00004

This is sample ALV popup based on REUSE_ALV_POPUP_TO_SELECT function module (classic style). It includes only buttons for ENTER and CANCEL to make this dialog simple for a user. Other buttons related to ALV standard functions are excluded.
Here the sample popup:
screenshot
and the related coding:
REPORT zkm_test.

TYPE-POOLS:
  slis.

PERFORM display_popup.

FORM display_popup.

  DATA:
    BEGIN OF ls_popup,
      text(60) TYPE c,
    END OF ls_popup,
    lt_popup   LIKE TABLE OF ls_popup,
    lt_fcat    TYPE slis_t_fieldcat_alv,
    ls_fcat    TYPE slis_fieldcat_alv,
    lt_excl    TYPE slis_t_extab,
    ls_excl    TYPE slis_extab,
    lv_exit    TYPE c.

  ls_popup-text = 'First line'.  APPEND ls_popup TO lt_popup.
  ls_popup-text = 'Second line'. APPEND ls_popup TO lt_popup.
  ls_popup-text = 'Third line'.  APPEND ls_popup TO lt_popup.

  ls_fcat-col_pos = 1.
  ls_fcat-fieldname = 'TEXT'.
  ls_fcat-outputlen = 60.
  ls_fcat-seltext_m = 'Title of the table'.
  APPEND ls_fcat TO lt_fcat.

  ls_excl-fcode = '&ETA'. APPEND ls_excl TO lt_excl.
  ls_excl-fcode = '%SC'.  APPEND ls_excl TO lt_excl.
  ls_excl-fcode = '%SC+'. APPEND ls_excl TO lt_excl.
  ls_excl-fcode = '&OUP'. APPEND ls_excl TO lt_excl.
  ls_excl-fcode = '&ODN'. APPEND ls_excl TO lt_excl.
  ls_excl-fcode = '&ILT'. APPEND ls_excl TO lt_excl.
  ls_excl-fcode = '&OL0'. APPEND ls_excl TO lt_excl.
  ls_excl-fcode = '&CRB'. APPEND ls_excl TO lt_excl.
  ls_excl-fcode = '&CRL'. APPEND ls_excl TO lt_excl.
  ls_excl-fcode = '&CRR'. APPEND ls_excl TO lt_excl.
  ls_excl-fcode = '&CRE'. APPEND ls_excl TO lt_excl.
* ls_excl-fcode = '&AC1'. APPEND ls_excl TO lt_excl. " cancel
  ls_excl-fcode = '&ALL'. APPEND ls_excl TO lt_excl.
  ls_excl-fcode = '&SAL'. APPEND ls_excl TO lt_excl.

  CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'
    EXPORTING
      i_title               = 'Title of the popup'
      i_selection           = ''
      i_screen_start_column = 1
      i_screen_start_line   = 1
      i_screen_end_column   = 62
      i_screen_end_line     = 10
      i_tabname             = 'LT_POPUP'
      it_fieldcat           = lt_fcat
      it_excluding          = lt_excl
    IMPORTING
      e_exit                = lv_exit
    TABLES
      t_outtab              = lt_popup.

  IF lv_exit = 'X'.
*   cancel
  ELSE.
*   do action
  ENDIF.

ENDFORM.

转载于:https://www.cnblogs.com/zhumk/archive/2011/03/04/1971075.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值