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 message numbers

Former Member
0 Likes
1,019

What are the message numbers available in ABAP. How can we use that in our code. Can anyone explain me with sample codes, it will be a great help for me.

Thanks.

5 REPLIES 5
Read only

Former Member
0 Likes
866

Message numbers are stored in T100 table.You can fetch the message text from this table by querying MSGNR = <message number>

Read only

Former Member
0 Likes
866

Hi,

Look at the table T100 for massages Numbers and Message texts, and alos look at the transaction code SE91 for the Numbers

Look at the sample code for message numbers

     SELECT SINGLE * FROM t100 WHERE sprsl = it_messtab-msgspra
                                        AND   arbgb = it_messtab-msgid
                                        AND   msgnr = it_messtab-msgnr.
      IF sy-subrc = 0.
        g_l_mstring = t100-text.
        IF g_l_mstring CS c_val35.                          " '&1'.
          REPLACE c_val35 WITH it_messtab-msgv1 INTO g_l_mstring.
          REPLACE c_val36 WITH it_messtab-msgv2 INTO g_l_mstring.
          REPLACE c_val37 WITH it_messtab-msgv3 INTO g_l_mstring.
          REPLACE c_val38 WITH it_messtab-msgv4 INTO g_l_mstring.
        ELSE.
          REPLACE c_val39 WITH it_messtab-msgv1 INTO g_l_mstring.
          REPLACE c_val39 WITH it_messtab-msgv2 INTO g_l_mstring.
          REPLACE c_val39 WITH it_messtab-msgv3 INTO g_l_mstring.
          REPLACE c_val39 WITH it_messtab-msgv4 INTO g_l_mstring.
        ENDIF.

        CONDENSE g_l_mstring.
        IF NOT g_l_mstring+0(8) = c_val40.     " 'No batch'.
          g_cnt = g_cnt + 1.
          WRITE: /1 g_cnt,5 g_l_mstring(100).
        ENDIF.

Regards

Sudheer

Read only

Former Member
0 Likes
866

Hi,

we can create new message number in tcode se91.

give the msg class,message numer and press create there u can enter some text.save it.

in program u have to call as MESSAGE <MSG TYPE><MSG NUMBER>(MSG CLASS).

CHECK THIS LINKS

http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/dbaaaf35c111d1829f0000e829fbfe/content.htm

http://help.sap.com/saphelp_nw04/helpdata/en/d1/801b3e454211d189710000e8322d00/content.htm

REGARDS,

BHARAT.

Read only

Former Member
Read only

Former Member
0 Likes
866

See the complete demo for messages in the demo program:

DEMO_MESSAGES

Regards,

Ravi