alv双击通过消息显示字段

文章目录

1 Result

在这里插入图片描述

2. Soution
 when '&IC1'."查看 整体说明
      if r2 = 'X' or r3 = 'X' .

        clear:gw_alv.

        read table gt_alv into gw_alv index selline-tabindex.

          if selline-fieldname = 'CPSM' or selline-fieldname = 'CPSM2'.
          concatenate gw_alv-cpsm gw_alv-cpsm2  into gv_txt."gw_alv-cpsm2



          gw_alv-cpsm = gv_txt  .

          perform frm_dis_msg .

      endif.
      endif.
      form frm_dis_msg .
  data:lv_txt type string,
       lv_msg(50),
       lv_num type i.
  data: i_smesg type tsmesg with header line.

  lv_txt = gv_txt.
  lv_num = strlen( lv_txt ).
  if lv_num = 0.
    exit.
  endif.

  clear:i_smesg,i_smesg[].
  do 100 times .
    lv_num = strlen( lv_txt ).
    if lv_num > 35.
      lv_msg  = lv_txt+0(35).
      lv_num = lv_num - 35.
      lv_txt = lv_txt+35(lv_num).
    elseif lv_num > 0 and lv_num <= 35.
      lv_msg  = lv_txt+0(lv_num).
      clear:lv_txt.
    elseif lv_num = 0.
      exit.
    endif.

    clear:i_smesg.
    i_smesg-zeile = sy-index.
    i_smesg-msgty = 'S'.
    i_smesg-arbgb = '00'.
    i_smesg-txtnr = '001'.
    i_smesg-msgv1 = lv_msg.
    append i_smesg.
  enddo.

  if i_smesg[] is not initial.
    call function 'FB_MESSAGES_DISPLAY_POPUP'
      exporting
        it_smesg        = i_smesg[]
      exceptions
        no_messages     = 1
        popup_cancelled = 2
        others          = 3.
    if sy-subrc <> 0.
      return.
    endif.
  endif.

endform.                    "frm_dis_msg
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值