05-11-2006 4:59 PM
Hi All,
I have a BDC function module for customer create, and I'm getting back three items in the error table none of which has any textual description.
It looks like this:
sy-subrc = 1,001
TCODE XD01
DYNAME SAPMF02D
DYNUMB 0130
MSGTYP S
MSGSPRA EN
MSGID 00
MSGNR 344
MSGV1 SAPMF02D
MSGV2 0130
MSGV3
MSGV4
ENV CTU
FLDNAME
Any idea how I can look up some more details about this error message?
Thanks!
Roman
05-11-2006 5:00 PM
hi
use FM
<b>format_message</b>
sample code
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
ID = IT_MSG-MSGID
LANG = SY-LANGU
NO = IT_MSG-MSGNR
V1 = IT_MSG-MSGV1
V2 = IT_MSG-MSGV2
V3 = IT_MSG-MSGV3
V4 = IT_MSG-MSGV4
IMPORTING
MSG = V_MSG
EXCEPTIONS
NOT_FOUND = 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.
<b>plz reward helpful posts</b>
regards
ganesh
05-11-2006 5:00 PM
hi
use FM
<b>format_message</b>
sample code
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
ID = IT_MSG-MSGID
LANG = SY-LANGU
NO = IT_MSG-MSGNR
V1 = IT_MSG-MSGV1
V2 = IT_MSG-MSGV2
V3 = IT_MSG-MSGV3
V4 = IT_MSG-MSGV4
IMPORTING
MSG = V_MSG
EXCEPTIONS
NOT_FOUND = 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.
<b>plz reward helpful posts</b>
regards
ganesh
05-11-2006 5:07 PM
Thanks all for such fast responses!
I found the error (missing a screen) thanks to the FORMAT_MESSAGE tool.
Roman D.
05-11-2006 5:00 PM
Hi Roman,
Use the function module 'FORMAT_MESSAGE' and pass these variables to it.
It will retrun a proper text for the message.
Usage:
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
ID = i_return-id
LANG = sy-langu
NO = i_return-number
V1 = i_return-MESSAGE_V1
V2 = i_return-MESSAGE_V2
V3 = i_return-MESSAGE_V3
V4 = i_return-MESSAGE_V4
IMPORTING
MSG = l_message
EXCEPTIONS
NOT_FOUND = 1
OTHERS = 2
.
check sy-subrc = 0.
write: / l_message.
Regards,
Ravi
05-11-2006 5:01 PM
Roman,
Message number 1001 comes in a BDC when a screen is missing in the BDCDATA table and it is encountering that when running the transaction.
You can find the details of the message in T100 table.
Regards,
Ravi
Note : Please mark the helpful answers