Application Development 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: 

how to catch the message

former_member799868
Participant
0 Kudos

how to catch the message given by system like recoprd is locked by user to add the message to application log.

1 ACCEPTED SOLUTION

varma_narayana
Active Contributor
0 Kudos

Hi..

You can catch the Message in System fields

SY-MSGID - message class

SY-MSGTY - Message type

SY-MSGNO - Message No.

SY-MSGV1

SY-MSGV2

SY-MSGV3

SY-MSGV4

You can call the FM FORMAT_MESSAGE To Generate the Message Text which can be displayed in Application Log.

<b>Reward Points if Helpful</b>

4 REPLIES 4

Former Member
0 Kudos

Hi kranthi,

1. In our program, if we try to lock that object,

then it will return sy-subrc <> 0,

2. from that we can detect, whether that object was locked or not.

regards,

amit m.

Former Member
0 Kudos

HI,

messages given by system can be captured by using

the fm

format_message..

thanks & regards,

Venkatesh

Former Member
0 Kudos

Hi,

If you are running a BDC and then catching messages Use <b>bdcmsgcoll</b>.

This structure is used for Collecting messages in the SAP System and contains the messages at runtime.

Regards,

Suruchi Mahajan

varma_narayana
Active Contributor
0 Kudos

Hi..

You can catch the Message in System fields

SY-MSGID - message class

SY-MSGTY - Message type

SY-MSGNO - Message No.

SY-MSGV1

SY-MSGV2

SY-MSGV3

SY-MSGV4

You can call the FM FORMAT_MESSAGE To Generate the Message Text which can be displayed in Application Log.

<b>Reward Points if Helpful</b>