FUNCTION zpm006_get_erro_msg.
*"----------------------------------------------------------------------
*"*"局部接口:
*" EXPORTING
*" VALUE(EV_MSG) TYPE BAPI_MSG
*" TABLES
*" IT_RETURN STRUCTURE BAPIRET2
*"----------------------------------------------------------------------
DATA:lv_msga TYPE bapi_msg,
lv_msgb TYPE bapi_msg,
ls_return LIKE bapiret2.
CLEAR ev_msg.
"汇总错误消息
LOOP AT it_return INTO ls_return
WHERE type CA 'AEX'.
CALL FUNCTION 'MESSAGE_TEXT_BUILD'
EXPORTING
msgid = ls_return-id
msgnr = ls_return-number
msgv1 = ls_return-message_v1
msgv2 = ls_return-message_v2
msgv3 = ls_return-message_v3
msgv4 = ls_return-message_v4
IMPORTING
message_text_output = lv_msga.
IF lv_msgb IS INITIAL.
lv_msgb = lv_msga.
ELSE.
lv_msgb = lv_msgb && '/' && lv_msga.
ENDIF.
ENDLOOP.
ev_msg = lv_msgb.
ENDFUNCTION.
阅读(1254) | 评论(0) | 转发(0) |