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

Message ID

Former Member
0 Likes
1,309

Hi friends,

Could anyone give me the functionality of "MESSAGE-ID mid " addition in Report with a small example.

with Regards,

Satya.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,142

Hi,

Example

REPORT RSTEST00 LINE-SIZE 132

LINE-COUNT 65

MESSAGE-ID SU.

MESSAGE ID id TYPE mtype NUMBER n.

ID message class

TYPE message type

NUMBER message number

e.g. MESSAGE ID 'SU' TYPE 'E' NUMBER '004' WITH 'Hello'.

The example displays message 004 from message class SU as an error message, and its first placeholder is

replaced with 'Hello'.

Regards,

Ferry Lianto

4 REPLIES 4
Read only

Former Member
0 Likes
1,143

Hi,

Example

REPORT RSTEST00 LINE-SIZE 132

LINE-COUNT 65

MESSAGE-ID SU.

MESSAGE ID id TYPE mtype NUMBER n.

ID message class

TYPE message type

NUMBER message number

e.g. MESSAGE ID 'SU' TYPE 'E' NUMBER '004' WITH 'Hello'.

The example displays message 004 from message class SU as an error message, and its first placeholder is

replaced with 'Hello'.

Regards,

Ferry Lianto

Read only

amit_khare
Active Contributor
0 Likes
1,142

This will call the message ID mid as created in SE91 to your report.

http://help.sap.com/saphelp_erp2005vp/helpdata/en/cd/5892c9b06311d2957b00a0c94260a5/frameset.htm

Regards,

Amit

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,142

Sure. This extension of the REPORT statement is used to define the default message id in your report. For example, say you have some validation in your report and you need to issue a message. You must know that all messages are stored in message classes. So if you use the MESSAGE ID in the REPORT statement , you do not have to mention the messgae class in the MESSAGE statement.

Message E001 with 'This is the message'.

But if you do not have a message id in the REPORT statement,you must tell the program which message class that the message belongs.

Message E001(00) with 'This is the message'.

Here 00 is the messgae class which is the value that you would specify in the MESSAGE ID in the REPORT statement.

Regards,

Rich Heilman

Read only

Former Member
0 Likes
1,142

hi satya,

Message id in the report is used to include that message class in to the report. so that v can use the message ids in ur report.

Before declaring the message id in the report, v have to create that one using t/d se91.

Report zarun message-id zzmsg no standard page heading.

......

.......

AT selection-screen.

select single * into itab from mara where matnr = mat.

if sy-subrc ne 0.

message I001.

Endif.

or u can straight away use in the message stmt without using it in the report addition, like this.

message I001(zzmsg) with 'no data exist'.

Regards...

Arun.

Reward points if useful.