SAP ABAP弹出对对话框错误信息设计

弹出对对话框错误信息设计、REUSE_ALV_POPUP_TO_SELECT

代码如下:

sql 复制代码
IF lw_item_date-menge > lv_atp_other.
          lw_error-ebelp      = lw_item_date-ebelp.
          lw_error-matnr      = lw_item_date-matnr.
          lw_error-zlabst     = lv_labst.
          lw_error-zoccupy_so = lv_occupy_so.
          lw_error-zoccupy_po = lv_occupy_po.
          lw_error-zoccupy_my = lv_occupy_my.
          lw_error-zoccupy_rs = lv_occupy_rs.
          lw_error-zatp       = lv_atp.
          lw_error-zdiff      = lv_atp_other - lw_item_date-menge.
          lw_error-zmenge     = lw_item_date-menge.
          APPEND lw_error TO lt_error.
          CLEAR  lw_error.
        ENDIF.
 
 
   IF lt_error[] IS NOT INITIAL .
        lw_fieldcat-fieldname     = 'EBELP'.
        lw_fieldcat-seltext_l     = '行项目'.
        lw_fieldcat-outputlen     = '5'.
        APPEND lw_fieldcat TO lt_fieldcat.
        CLEAR  lw_fieldcat.
        lw_fieldcat-fieldname     = 'MATNR'.
        lw_fieldcat-ref_tabname   = 'MARA'.
        lw_fieldcat-ref_fieldname = 'MATNR'.
        lw_fieldcat-seltext_l     = '行项目'.
        lw_fieldcat-outputlen     = '11'.
        APPEND lw_fieldcat TO lt_fieldcat.
        CLEAR  lw_fieldcat.
        lw_fieldcat-fieldname     = 'ZLABST'.
        lw_fieldcat-seltext_l     = '库存数量'.
        lw_fieldcat-outputlen     = '13'.
        APPEND lw_fieldcat TO lt_fieldcat.
        CLEAR  lw_fieldcat.
        lw_fieldcat-fieldname     = 'ZOCCUPY_PO'.
        lw_fieldcat-seltext_l     = '调拨占用'.
        lw_fieldcat-outputlen     = '13'.
        APPEND lw_fieldcat TO lt_fieldcat.
        CLEAR  lw_fieldcat.
        lw_fieldcat-fieldname     = 'ZOCCUPY_MY'.
lw_fieldcat-seltext_l     = '订单其他行'.
        lw_fieldcat-outputlen     = '13'.
        APPEND lw_fieldcat TO lt_fieldcat.
        CLEAR  lw_fieldcat.
        lw_fieldcat-fieldname     = 'ZOCCUPY_SO'.
        lw_fieldcat-seltext_l     = '销售占用'.
        lw_fieldcat-outputlen     = '13'.
        APPEND lw_fieldcat TO lt_fieldcat.
        CLEAR  lw_fieldcat.
        lw_fieldcat-fieldname     = 'ZOCCUPY_RS'.
        lw_fieldcat-seltext_l     = '预留占用'.
        lw_fieldcat-outputlen     = '13'.
        APPEND lw_fieldcat TO lt_fieldcat.
        CLEAR  lw_fieldcat.
        lw_fieldcat-fieldname     = 'ZATP'.
        lw_fieldcat-seltext_l     = '可用数量'.
        lw_fieldcat-outputlen     = '13'.
        APPEND lw_fieldcat TO lt_fieldcat.
        CLEAR  lw_fieldcat.
        lw_fieldcat-fieldname     = 'ZMENGE'.
        lw_fieldcat-seltext_l     = '订单数量'.
        lw_fieldcat-outputlen     = '13'.
        APPEND lw_fieldcat TO lt_fieldcat.
        CLEAR  lw_fieldcat.
        lw_fieldcat-fieldname     = 'ZDIFF'.
        lw_fieldcat-seltext_l     = '差额'.
        lw_fieldcat-outputlen     = '13'.
        APPEND lw_fieldcat TO lt_fieldcat.
        CLEAR  lw_fieldcat.
 
        CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'
          EXPORTING
            i_title               = '库存不足'
            i_selection           = ''
            i_allow_no_selection  = 'X'
            i_zebra               = 'X'
            i_screen_start_column = '10'
            i_tabname             = 'LT_ERROR'
            it_fieldcat           = lt_fieldcat
*           i_structure_name      = 'ZSME29N_ERROR'
          TABLES
            t_outtab              = lt_error
          EXCEPTIONS
            program_error         = 1
            OTHERS                = 2.
 
        MESSAGE e000(zabap) WITH '库存不足'.
      ENDIF.
相关推荐
tatasix6 分钟前
MySQL UPDATE语句执行链路解析
数据库·mysql
陌小呆^O^11 分钟前
Cmakelist.txt之win-c-udp-client
c语言·开发语言·udp
南城花随雪。19 分钟前
硬盘(HDD)与固态硬盘(SSD)详细解读
数据库
儿时可乖了20 分钟前
使用 Java 操作 SQLite 数据库
java·数据库·sqlite
懒是一种态度22 分钟前
Golang 调用 mongodb 的函数
数据库·mongodb·golang
天海华兮24 分钟前
mysql 去重 补全 取出重复 变量 函数 和存储过程
数据库·mysql
I_Am_Me_27 分钟前
【JavaEE进阶】 JavaScript
开发语言·javascript·ecmascript
重生之我是数学王子37 分钟前
QT基础 编码问题 定时器 事件 绘图事件 keyPressEvent QT5.12.3环境 C++实现
开发语言·c++·qt
Ai 编码助手39 分钟前
使用php和Xunsearch提升音乐网站的歌曲搜索效果
开发语言·php
学习前端的小z43 分钟前
【前端】深入理解 JavaScript 逻辑运算符的优先级与短路求值机制
开发语言·前端·javascript