DATA : GT_RETURN LIKE BAPIRET2
OCCURS 0 WITH HEADER LINE.
“E! ==> Message Class
IF GT_RETURN[] IS NOT INITIAL.
LOOP AT GT_RETURN.
PERFORM MESSAGE_STORE USING GT_RETURN-TYPE
GT_RETURN-ID
GT_RETURN-NUMBER
GT_RETURN-MESSAGE_V1
GT_RETURN-MESSAGE_V2
GT_RETURN-MESSAGE_V3
GT_RETURN-MESSAGE_V4.
ENDLOOP.
CALL FUNCTION 'MESSAGES_SHOW'
EXCEPTIONS
INCONSISTENT_RANGE = 1
NO_MESSAGES = 2
OTHERS = 3.
ENDIF.
*&---------------------------------------------------------------------
*& Form MESSAGE_STORE
*&---------------------------------------------------------------------
FORM MESSAGE_STORE USING P_TYPE
P_ID
P_NUMBER
P_V1
P_V2
P_V3
P_V4.
CALL FUNCTION 'MESSAGE_STORE'
EXPORTING
ARBGB = P_ID
MSGTY = P_TYPE
MSGV1 = P_V1
MSGV2 = P_V2
MSGV3 = P_V3
MSGV4 = P_V4
TXTNR = P_NUMBER
EXCEPTIONS
MESSAGE_TYPE_NOT_VALID = 1
NOT_ACTIVE = 2
OTHERS = 3.
ENDFORM. " MESSAGE_STORE
Hiç yorum yok:
Yorum Gönder