ALV popup display and select

Display ALV report in popup window, capture the selected value based on user action

To display ALV in popup we use function module REUSE_ALV_POPUP_TO_SELECT.

REPORT ZSAPN_ALV_POPUP.
TYPE-POOLS: SLIS.
DATA: IT_OUTTAB TYPE T134 OCCURS 0,
      WA_PRIVATE TYPE SLIS_DATA_CALLER_EXIT,
      WA_SELFIELD TYPE SLIS_SELFIELD.
DATA : LT_EXCL    TYPE SLIS_T_EXTAB,
    LS_EXCL    TYPE SLIS_EXTAB,
    LV_EXIT    TYPE C.

START-OF-SELECTION.
  SELECT * FROM T134 INTO TABLE IT_OUTTAB.

  CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'
    EXPORTING
      I_TITLE          = 'Select a Material Type'
*     I_SELECTION      = 'X'
      I_ZEBRA          = 'X'
*     I_SCREEN_START_COLUMN   = 0
*     I_SCREEN_START_LINE     = 0
*     I_SCREEN_END_COLUMN     = 0
*     I_SCREEN_END_LINE       = 0
*     I_CHECKBOX_FIELDNAME    =
*     I_LINEMARK_FIELDNAME    =
*     I_SCROLL_TO_SEL_LINE    = 'X'
      I_TABNAME        = 'T134'
      I_STRUCTURE_NAME = 'T134'
*     IT_FIELDCAT      = 'LT_FCAT'
*     IT_EXCLUDING     =
*     I_CALLBACK_PROGRAM      =
*     I_CALLBACK_USER_COMMAND =
      IS_PRIVATE       = WA_PRIVATE
    IMPORTING
      ES_SELFIELD      = WA_SELFIELD
      E_EXIT           = LV_EXIT
    TABLES
      T_OUTTAB         = IT_OUTTAB
    EXCEPTIONS
      PROGRAM_ERROR    = 1
      OTHERS           = 2.
  IF SY-SUBRC NE 0.
**HANDLE SOMETHING
  ENDIF.
  IF LV_EXIT = 'X'. "user clicks exit/cancel button

  ELSE.
    WRITE: / WA_SELFIELD-TABNAME,
             WA_SELFIELD-TABINDEX,
             WA_SELFIELD-SEL_TAB_FIELD,
             WA_SELFIELD-VALUE. "selected value
  ENDIF.

ALV pop






评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

ChampaignWolf

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值