ALV 双击显示行文本

DATA: gt_texttable TYPE TABLE OF textline,
       gW_texttable LIKE LINE OF gt_texttable.
 DATA:lv_name TYPE tdobname.
  DATA:lt_text LIKE TABLE OF tline.
  DATA:lv_tdid     TYPE thead-tdid,
       lv_tdobject TYPE thead-tdobject.

  REFRESH gt_texttable.
  CLEAR:lt_text,lv_name.

IF pw_out-zlx = 'S'.
    lv_name = sy-mandt && pw_out-rsnum && pw_out-rspos.
    lv_tdid = 'MATK'.
    lv_tdobject = 'AUFK'.
  ELSEIF gs_out-zlx = 'J'.
    lv_name = sy-mandt && 'M' && pw_out-stlnr && pw_out-stlkn && pw_out-stpoz.
    lv_tdid = 'MPO'.
    lv_tdobject = 'BOM'.
  ELSEIF gs_out-zlx = 'W'.
    lv_name = sy-mandt && 'M' && pw_out-stlnr && pw_out-stlkn && pw_out-stpoz.
    lv_tdid = 'MPO'.
    lv_tdobject = 'BOM'.
  ENDIF.

CALL FUNCTION 'READ_TEXT'
    EXPORTING
      client                  = sy-mandt
      id                      = lv_tdid
      language                = sy-langu
      name                    = lv_name
      object                  = lv_tdobject
    TABLES
      lines                   = lt_text[]
    EXCEPTIONS
      id                      = 1
      language                = 2
      name                    = 3
      not_found               = 4
      object                  = 5
      reference_check         = 6
      wrong_access_to_archive = 7
      OTHERS                  = 8.

  LOOP AT lt_text INTO DATA(lw_text).
    gw_texttable = lw_text-tdline.
    APPEND gw_texttable TO gt_texttable.
  ENDLOOP.

  CALL FUNCTION 'ADA_POPUP_WITH_TABLE'
    EXPORTING
      startpos_col = 1
      startpos_row = 1
      titletext    = '文本行'
*     WORDWRAP_POSITION       =
    TABLES
      valuetab     = gt_texttable.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值