12-27-2007 10:09 AM
Hi, I can't figure it out why sy-msgty just wouldn't return any value. It just kept on prompting the "MESSAGE_TYPE_UNKNOWN" runtime error, saying that "Only message types A, E, I, W, S, and X are allowed".Please advise, below are the codes.
CALL FUNCTION '/SAPDMC/LSM_FILE_INFO_GET'
EXPORTING
project = p_project
subproj = p_subproj
object = p_object
x_only_used_files = ' '
IMPORTING
FILE_READ =
FILE_CONV =
PATH_CONV_LOG =
FILE_CONV_LOG =
TABLES
t_lsoinp = i_file
EXCEPTIONS
no_such_object = 1
OTHERS = 2
.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
12-27-2007 10:21 AM
Hi Lawrence,
Just put a breakpoint on the IF syst-subrc NE 0 statement and check the value of SYST-MSGTY.
Regards,
John.
12-27-2007 10:21 AM
Hi Lawrence,
Just put a breakpoint on the IF syst-subrc NE 0 statement and check the value of SYST-MSGTY.
Regards,
John.
12-27-2007 10:25 AM
Hi john i've tried that. syst-subrc == 1, but somehow sy-msgty seems to be returning nothing, its just not returning any value
12-27-2007 10:32 AM
Hi Lawrence,
I have taken a look into the FM, but it's just raising the exception NO_SUCH_OBJECT. Hence no automatic filling of variables in the SYST-structure. You should use your own message in this case.
Regards,
John.