Try this technique to write out the message returned when exceptions are returned from a function module call.
DATA: lv_msg TYPE string.
CALL FUNCTION <any function>
EXCEPTIONS
error_message = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
INTO lv_msg
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
WRITE: lv_msg.





