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: 

I have Doubt in Message class

Former Member
0 Kudos

Hi all.

I need to create lengthy message in message class.

example: zreport message-id zmes.

message s001.

Right now i have message s001,it contains like "This record not applicable" but i want to change like "This is not applicable records for input user so you should give diffrent input in manual screen".capcity of message line nearly 70char only ,how can create lengthy message in message class?

please help me.

Regards,

Jay

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Instead of typing in the whole message in the Message Class use place holders (&) and replace them with actual variables using the WITH statement when the message is displayed.

E.g:

S001: & & & &

message s001 with text-001 text-002.

text-001 and 002 will contain the message text

Regards,

Manoj

8 REPLIES 8

Former Member
0 Kudos

Instead of typing in the whole message in the Message Class use place holders (&) and replace them with actual variables using the WITH statement when the message is displayed.

E.g:

S001: & & & &

message s001 with text-001 text-002.

text-001 and 002 will contain the message text

Regards,

Manoj

0 Kudos

hi Manoj.

Actually I have no space to wirte in single line in message class because i allowing only 70 char in single line ,but my message will exceed this limit.help me..

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

Use message with & in message class and write the message in text symbols.

message i000 with text-001.

text-001 'This is not applicable records for input user so you should give diffrent input in manual screen'.

If you cannot type such a long text in text symbols,use more than one text symbol.

message in message class

000 & & &

text-001 ''This is not applicable records '

text-002 'for input user so you should give diffrent'

text-003 'input in manual screen'

Kindly reward points by clicking the star on the left of reply,if it helps.

0 Kudos

Though this is a solution, it is generally not adviced to define such messages, only defined at runtime...

If you work in an international context, your messages might need to be translated. The more static they are, the easier they will be to translate.

However, maybe you do not care about translation... Then, it works.

Former Member
0 Kudos

jay,

can u concatenate everything in one string and

give it like message e001(zz) with string.

i am not sure about more than 70char.

Former Member
0 Kudos

Hi,

U can break the 70 char text into two text elements.

Then use as below:

zreport message-id zmes.
message s001 WITH text-001 text-002.

Or you can do as

DATA: v_text(70) Type c.
CONCATENATE 'This is not applicable records for input user so you'
'should give diffrent input in manual screen' INTO v_text.
message s001 WITH v_text.

Hope this solves ur problem.

Former Member
0 Kudos

hi Jai,

U can output upto 50 chars per field. So change coding like this,

data : mymess1 type string,

mymess2 type string.

mymess1 = 'This is not applicable records for input user so y'.

mymess2 = 'oushould give diffrent input in manual screen'.

MESSAGE s000(zocm) WITH mymess1 mymess2.

In message class zocm give like

messageno message text

000 & &

This will solve ur problem.