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 display problem (SE91)

Former Member
0 Kudos
1,281

Hi Experts,

I am writing a FM, there i want to display a message by using the statement

<b>message w002(ZMSG).</b>

Here in the message i want to display as

<b>Sy-uname is exist</b>

if appropriate condition satisfies. For this how can we display sy-uname at begining of message.

And also i want to know it accepts 50 characters message only, how can i extend it to more means 120 characters.

Please let me know, it is very urgent.......

Regards

Prabhakar

1 ACCEPTED SOLUTION

Former Member
0 Kudos
307

data: p type i value '2',

q type i value '3',

r type i.

r = p + q.

if sy-subrc = 0.

message i999(zsv) with sy-uname 'is exist'.

write:/ r.

endif.

just check this code

viajy.

8 REPLIES 8

Former Member
0 Kudos
307

Hi,

Ur message(002) should have place holders (&).

Use long text for more chars. (OR)

U can give more place holders. U declare

your message with say 3 holders . (& & &)

message w002 with sy-uname 'is exist'.

If U want to give more than 50 chars.

Give text elements.

messabe w002 with text-001 text-002 text-003

Regards,

GSR.

Message was edited by: Srinivas Reddy

Former Member
0 Kudos
308

data: p type i value '2',

q type i value '3',

r type i.

r = p + q.

if sy-subrc = 0.

message i999(zsv) with sy-uname 'is exist'.

write:/ r.

endif.

just check this code

viajy.

0 Kudos
307

Hi Vijay

Thanks for your help.

i am writing the relevant message in Message class (SE91)i.e., (SY-Uname Exist)

my message length is 120 characters long but system allowed message is 50 char only. how can i increase the length of the message?

I would appreciate an earlier help

Regards

Prabhakar

0 Kudos
307

Hi

Declare your message as text element , here you can give upto 132 characters.

like :xxxxxxxxxxxxx&xxxxxxxxxxxxx

then take one string variable and pass text element text and replace & value, then raise message,system will allow messages upto 132 characters

0 Kudos
307

U can use

message ... WITH f1 ... f4

Only the first 50 characters of any field will be displayed.

Got this info from SAP help. Do an F1 help in the keyword MEssage u can get this info.

Then for ur first question if u have used an existing message id then choose the mess no with &&. Then u can speicfy using ur text elements.

MESSGAE W001 WITH sy-uname text-001.

Refer this <b>DEMO_MESSAGES</b> program to know more about messages.

Hope this helps u.

Kindly reward points and close the thread if ur problem got solved.

Message was edited by: Judith Jessie Selvi

hymavathi_oruganti
Active Contributor
0 Kudos
307

hi , u can do the following easy method to display a message.

give the message class with MESSAGE-ID statement in the report and

give the message as follows

<b>MESSAGE sy-uname 'is exist' type 'W'.</b>

Former Member
0 Kudos
307

Hi Rao,

You use the FM called: POPUP_TO_DISPLAY_TEXT_LO

Code sample:

CALL FUNCTION 'POPUP_TO_DISPLAY_TEXT_LO'

EXPORTING

titel = 'Title'

textline1 = 'Msg 1'

textline2 = 'Msg 1 contiue'

textline3 = 'Msg 1 continue...'

start_column = 10

start_row = 10.

Using this FM u will be able to give more than 120 character .

Dont forget to reward points if answer is helpful to you.

Cheers

Sunny

Former Member
0 Kudos
307

hi prabhakar ,

data: p type i value '2',

q type i value '3',

r type i.

r = p + q.

if sy-subrc = 0.

message i999(zsv) with text-001 text-002 text-003 text-004.

write:/ r.

endif.

the changes are , see u can define text-001 upto 132 characters but in the poppu it is giving u only 50 as the length .

now if u can declare text-001 upto 50 char's

text-002 upto 50

text-003 upto 50

text-004 upto 50 chars can be given so it covers 200 char's instead.

now if u can split ur message into this format u can go for it i suppose .

remember u can give only 4 text elements after 'with' in a message id.

i have done the execution it is coming out fine.u try try and let me know.

bye .

vijay.

any more info plz mail me .

vijay.