Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

regarding BDCMSGCOLL

Former Member
0 Likes
713

I have captured the error in an internal table and downloaded to a flat file.The thing is i am getting a message number . How to know the description of that message number.... gor example i got a message number 055..... what does it mean? please help me in analysing the error file.......

6 REPLIES 6
Read only

Former Member
0 Likes
658

Hi,

You can use the function module FORMAT MESSAGE to get the message text for the corresponding message ID and message number..

Thanks,

Naren

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
658

You can use the function module MESSAGE_PREPARE to format the message before writing it out.

REgards,

RIch Heilman

Read only

amit_khare
Active Contributor
0 Likes
658

Pass the message ID and message number to T100 and get the description.

Or check in SE91.

Regards,

Amit

Reward all helpful replies.

Read only

Former Member
0 Likes
658

hi,

use this coding

READ TABLE BDCMSG WITH KEY MSGTYP = 'E'.

CALL FUNCTION 'FORMAT_MESSAGE'

EXPORTING

ID = BDCMSG-MSGID

LANG = SY-LANGU

NO = BDCMSG-MSGNR

V1 = BDCMSG-MSGV1

V2 = BDCMSG-MSGV2

V3 = BDCMSG-MSGV3

V4 = BDCMSG-MSGV4

IMPORTING

MSG = BDCMSG-MSGV1

  • 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.

WRITE : / BDCMSG-MSGV1.

ENDIF.

or else use

LOOP AT bdcmsg.

WRITE: bdcmsg-DYNAME,

bdcmsg-DYNUMB,

bdcmsg-MSGTYP,

bdcmsg-MSGSPRA,

bdcmsg-MSGID,

bdcmsg-MSGNR,

bdcmsg-MSGV1,

bdcmsg-MSGV2,

bdcmsg-MSGV3,

bdcmsg-MSGV4.

ENDLOOP.

Read only

Former Member
0 Likes
658

Hi ,

You can use the following code :

DATA: BEGIN OF MESSTAB OCCURS 0.

INCLUDE STRUCTURE BDCMSGCOLL.

DATA: END OF MESSTAB.

CALL FUNCTION 'FORMAT_MESSAGE'

EXPORTING

  • ID = SY-MSGID

  • LANG = '-D'

NO = SY-MSGNO

V1 = SY-MSGV1

V2 = SY-MSGV2

V3 = SY-MSGV3

V4 = SY-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.

LOOP AT MESSTAB.

IF P_RESULT = 'E'.

  • if messtab-msgtyp = 'E'.

CONCATENATE MESSTAB-MSGTYP':' V_MSG INTO V_MSG.

WRITE : / V_MSG.

SKIP.

CLEAR : V_MSG.

  • endif.

ELSEIF P_RESULT = 'S'.

  • if messtab-msgtyp = 'S'.

CONCATENATE MESSTAB-MSGTYP':' V_MSG INTO V_MSG.

WRITE : / V_MSG.

SKIP.

CLEAR : V_MSG.

ENDIF.

  • endif.

ENDLOOP.

Reward if useful.

Thanks,

USR

Read only

Former Member
0 Likes
658

Hi,

you can use the fm <b>MESSAGE_TEXT_BUILD</b>,and if u want to know the message number go to T.code se91.

Regards