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: 

Message Class

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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 -


madan_ullasa
Contributor
0 Kudos

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

Former Member
0 Kudos

Thank You

Former Member
0 Kudos

Follow up question.

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

0 Kudos

Hi,

If there no such MESSAGE CLASS or MESSAGE NUMBER,

then it will so like that.

Check it out.

Regards,

R.Nagarajan.

-


We can -


0 Kudos

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?

0 Kudos

Hi,

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

Its mismatched.

Check it out!

Regards,

R.Nagarajan.

-


We can -


0 Kudos

Hi Nagarajan Ramamoorthy,

How about if I would like to include a variable.

Is this syntax correct?

message i001 with v_name.

Thanks!

Former Member
0 Kudos

Thank You.

I found it.

I overlooked the message class id.