Read Message for messages class
Some time we have requirement to read messages to message class so we can write the code as per the customer Requirements
READ TABLE t_msg INTO w_msg INDEX 1.
IF sy-subrc EQ 0.
CALL FUNCTION 'BALW_BAPIRETURN_GET2'
EXPORTING
type = w_msg-msgtyp
cl = w_msg-msgid
number = w_msg-MSGNR
RETURN = gt_return.
if sy-subrc eq 0.
READ TABLE gt_return INTO gs_return INDEX 1.
if sy-subrc eq 0.
MSG1 = gs_return-MESSAGE.
ENDIF.
ENDIF.
ENDIF.
READ TABLE t_msg INTO w_msg INDEX 1.
IF sy-subrc EQ 0.
CALL FUNCTION 'BALW_BAPIRETURN_GET2'
EXPORTING
type = w_msg-msgtyp
cl = w_msg-msgid
number = w_msg-MSGNR
RETURN = gt_return.
if sy-subrc eq 0.
READ TABLE gt_return INTO gs_return INDEX 1.
if sy-subrc eq 0.
MSG1 = gs_return-MESSAGE.
ENDIF.
ENDIF.
ENDIF.
Comments
Post a Comment