ABAP 多行消息分别显示弹窗
Posted Rainystuday
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ABAP 多行消息分别显示弹窗相关的知识,希望对你有一定的参考价值。
*&---------------------------------------------------------------------* *& Report YT_POPUP_002 *& *&---------------------------------------------------------------------* *& *& *&---------------------------------------------------------------------* REPORT YT_POPUP_002. "定义消息类型 TYPES: BEGIN OF ESP1_MESSAGE_WA_TYPE, MSGID LIKE SY-MSGID, MSGTY LIKE SY-MSGTY, MSGNO LIKE SY-MSGNO, MSGV1 LIKE SY-MSGV1, MSGV2 LIKE SY-MSGV2, MSGV3 LIKE SY-MSGV3, MSGV4 LIKE SY-MSGV4, LINENO LIKE MESG-ZEILE, END OF ESP1_MESSAGE_WA_TYPE. TYPES: ESP1_MESSAGE_TAB_TYPE TYPE ESP1_MESSAGE_WA_TYPE OCCURS 20. DATA: IT_ERROR_MESSAGE TYPE ESP1_MESSAGE_TAB_TYPE WITH HEADER LINE. DATA: V_LINENO TYPE MESG-ZEILE. DATA: L_MSGID TYPE SY-MSGID, L_MSGTY TYPE SY-MSGTY, L_MSGNO TYPE SY-MSGNO, L_MSG TYPE CHAR100. L_MSGID = ‘ZZCSD001‘. L_MSGTY = ‘W‘. L_MSGNO = ‘002‘. L_MSG = ‘321.00‘. DEFINE MAC_MSG. v_lineno = v_lineno + 1. it_error_message-lineno = v_lineno. it_error_message-msgid = L_MSGID. it_error_message-msgty = L_MSGTY. it_error_message-msgno = L_msgno. it_error_message-msgv1 = &1. it_error_message-msgv2 = &2. APPEND it_error_message. CLEAR it_error_message. END-OF-DEFINITION. MAC_MSG: ‘已下订单金额:‘ L_MSG, ‘已发货记帐:‘ L_MSG, ‘本单金额:‘ L_MSG, ‘合计:‘ L_MSG, ‘对应台阶金额:‘ L_MSG, ‘比率:‘ L_MSG. *CLEAR:V_LINENO. V_LINENO = V_LINENO + 1. IT_ERROR_MESSAGE-LINENO = V_LINENO. IT_ERROR_MESSAGE-MSGID = ‘ZMSG‘. IT_ERROR_MESSAGE-MSGTY = ‘E‘. IT_ERROR_MESSAGE-MSGNO = ‘000‘. IT_ERROR_MESSAGE-MSGV1 = ‘测试 C14Z_MESSAGES_SHOW_AS_POPUP‘. APPEND IT_ERROR_MESSAGE. *V_LINENO = V_LINENO + 1. *IT_ERROR_MESSAGE-LINENO = V_LINENO. *IT_ERROR_MESSAGE-MSGID = ‘ZLM_MSG‘. *IT_ERROR_MESSAGE-MSGTY = ‘W‘. *IT_ERROR_MESSAGE-MSGNO = ‘000‘. *IT_ERROR_MESSAGE-MSGV1 = ‘测试测试测试测试‘. *APPEND IT_ERROR_MESSAGE. * *V_LINENO = V_LINENO + 1. *IT_ERROR_MESSAGE-LINENO = V_LINENO. *IT_ERROR_MESSAGE-MSGID = ‘ZLM_MSG‘. *IT_ERROR_MESSAGE-MSGTY = ‘S‘. *IT_ERROR_MESSAGE-MSGNO = ‘000‘. *IT_ERROR_MESSAGE-MSGV1 = ‘测试测试测试测试测试测试试‘. *APPEND IT_ERROR_MESSAGE. * *V_LINENO = V_LINENO + 1. *IT_ERROR_MESSAGE-LINENO = V_LINENO. *IT_ERROR_MESSAGE-MSGID = ‘ZLM_MSG‘. *IT_ERROR_MESSAGE-MSGTY = ‘E‘. *IT_ERROR_MESSAGE-MSGNO = ‘000‘. *IT_ERROR_MESSAGE-MSGV1 = ‘测试测试测试‘. *APPEND IT_ERROR_MESSAGE. CALL FUNCTION ‘C14Z_MESSAGES_SHOW_AS_POPUP‘ TABLES I_MESSAGE_TAB = IT_ERROR_MESSAGE. **后续不能操作,打钩 打叉 SY-SUBRC EQ 0 IF SY-SUBRC EQ 0. ELSE. ENDIF.
以上是关于ABAP 多行消息分别显示弹窗的主要内容,如果未能解决你的问题,请参考以下文章