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 Class

Former Member
0 Likes
1,096

I have a message class Z1049493.

How will i include it in my program?

Can I have a sample code for calling the error message?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,053

Hi,

Here is an example:

Report ZTEST message-id Z1049493. " To include in program.

To raise messages:

Message E000 with text SOME_TEXT " For error

Message I000 with text SOME_TEXT " For Info

Message A000 with text SOME_TEXT " For Abbend

Alternative way is to raise like this,

Message E000(Z1049493).

Regards,

Pramod

10 REPLIES 10
Read only

Former Member
0 Likes
1,054

Hi,

Here is an example:

Report ZTEST message-id Z1049493. " To include in program.

To raise messages:

Message E000 with text SOME_TEXT " For error

Message I000 with text SOME_TEXT " For Info

Message A000 with text SOME_TEXT " For Abbend

Alternative way is to raise like this,

Message E000(Z1049493).

Regards,

Pramod

Read only

Former Member
0 Likes
1,053

Hi

Just refer the program 'DEMO_MESSAGES_SIMPLE'.

Here, 'sabapdocu' is the message class used.

For better understanding refer 'DEMO_MESSAGES'.

Regards,

R.Nagarajan.

-


We can -


Read only

madan_ullasa
Contributor
0 Likes
1,053

Hi,

Declare the message class in your Report statement as message-id (message class).

Then you can use it..

MESSAGE E053(message_class).

message types are - A , E, I , S, W....

You can also use it like - Message 'TEXT' type 'E' . ( or any type)...

And also '&' as place holder can be used...

Regads,

Madan...

Read only

Former Member
0 Likes
1,053

Thank You

Read only

Former Member
0 Likes
1,053

Follow up question.

Instead of the message text, the message box displays the message id. what might cause this problem?

Read only

0 Likes
1,053

Hi,

If there no such MESSAGE CLASS or MESSAGE NUMBER,

then it will so like that.

Check it out.

Regards,

R.Nagarajan.

-


We can -


Read only

0 Likes
1,053

Hi,

I created message class Z1049498.

I included it in my program like this,

REPORT zisd_archiveods_npsg message-id Z10493498.

I tried to display the message like this,

message i001.

Instead of displaying this,

"No delivery exist for the customer"

my program displays,

I:Z10493498:001.

What might cause this problem?

Read only

0 Likes
1,053

Hi,

Your message class is 'Z1049498'. But you gave as 'Z10493498'.

Its mismatched.

Check it out!

Regards,

R.Nagarajan.

-


We can -


Read only

0 Likes
1,053

Hi Nagarajan Ramamoorthy,

How about if I would like to include a variable.

Is this syntax correct?

message i001 with v_name.

Thanks!

Read only

Former Member
0 Likes
1,053

Thank You.

I found it.

I overlooked the message class id.