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 getting cut off

Former Member
0 Likes
4,927

Hi all,

I am trying to display error messages. but they all get cut off short and dont display fully.

e.g.

I use this function to create the message

CALL FUNCTION 'MESSAGE_TEXT_BUILD'

EXPORTING

msgid = messtab-msgid

msgnr = messtab-msgnr

msgv1 = messtab-msgv1(50)

msgv2 = messtab-msgv2(50)

msgv3 = messtab-msgv3(50)

msgv4 = messtab-msgv4(50)

IMPORTING

message_text_output = wa_textout.

This retrieves the message truncated by 4 characters

e.g. "This delivery (2137687) is currently being processed by another user (DAV"

instead of:-

"This delivery (2137687) is currently being processed by another user (DAVIDSP)."

It then gets passed to:-

MESSAGE i000 WITH wa_textout.

and gets truncated further to:-

"This delivery (2137687) is currently being processed"

I am using MESSAGE-ID 38.

Please help.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
3,219

Hi,

you could try to split your wa_textout.

Something like that:

data:text1(50), text2(50).

text1 = wa_textout(50).

text2 = wa_textout+50(50).

message i398(00) with text1 text2.

Regards,

Alexandros.

Hi,

you could try to split your wa_textout.

Something like that:

data:text1(50), text2(50).

text1 = wa_textout(50).

text2 = wa_textout+50(50).

message i398(00) with text1 text2.

Regards,

Alexandros.

13 REPLIES 13
Read only

Former Member
0 Likes
3,219

pass through field symbol

se91

message &. &-> number

Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
3,219

Hi,

Declare <b>wa_textout</b> as a string or CHAR type with a lenght of 132 characters.

Regards,

Sesh

Read only

0 Likes
3,219

Okay progress made (I cant believe i didnt notice the length of the variable!!!!!!)

It now says:-

"This delivery (2137687) is currently being processed by another user (JONESP)"

in wa_textout.

But when I now pass this to

MESSAGE i000 WITH wa_textout.

It truncates it still to:-

"This delivery (2137687) is currently being process"

Nearly there - thanks so far.......

Read only

0 Likes
3,219

Hi,

DATA: wa_textout(50) type c.

Make sure that the data that your pass after WITH cannot be more than 50 character.

SO make sure in your MESSAGE statement after the WITH what ever you are passing is less than or equal to 50 characters.

Try other message types like 'S' or 'W' since message type I is displayed using a dialog box may be its getting truncated.

Just for the sake of testing check other message types.

Regards,

Sesh

Read only

0 Likes
3,219

It is bigger than 50characters and is found from looking at the SAP standard error messages in table T001 using the function MESSAGE_TEXT_BUILD.

I have tried using all different tyoes of message types like S and W and it still does the same.

Why cant error messages be displayed in full?

Read only

0 Likes
3,219

Hi,

The data types that you use AFTER the WITH KEY word in the MESSAGE statement cannot be more than 50 characters.

SO You cannot pass any thing in WITH which is more then 50 characters what you can do is this.

DATA: BEGIN OF mes_strcut,

char1(50) type c,

char2(50) type c,

char3(50) type c,

char4(50) type c,

END OF mes_struct.

mes_strcut = wa_textout.

MESSAGE i000 WITH mes_struct-char1 mes_struct-char2 mes_struct-char3 mes_struct-char4.

Regards,

Sesh

Read only

former_member196280
Active Contributor
0 Likes
3,219

Check the lenght of wa_textout

Regards,

Sairam

Read only

Former Member
0 Likes
3,219

Hi,

what is returned with that statement is a short text

see the following link to create a loong text for the same

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

All the best !!

Regards

Aparna

Read only

Former Member
0 Likes
3,220

Hi,

you could try to split your wa_textout.

Something like that:

data:text1(50), text2(50).

text1 = wa_textout(50).

text2 = wa_textout+50(50).

message i398(00) with text1 text2.

Regards,

Alexandros.

Read only

0 Likes
3,219

Yeah i suppose I could split it......

but it does seem crazy that I am requesting an error message and then cannot display it correctly using the inbuilt MESSAGE routine...

Read only

0 Likes
3,219

<i>...of the long text of the message with the first 50 characters of the content of the data objects dobj1, ..., dobj4.... </i>

I have copied the above from the ABAP Keyword document. Therefore there is a limitation of 50 characters.

Read only

Former Member
0 Likes
3,219

not happy having to split, but I cannot see any other way to display error messages

Read only

mldoliveira
Explorer
0 Likes
3,219

Hi.

You don't need to declare variable to use i398 message, use this way.

MESSAGE i398(00) WITH 'First line message '

                                       'Second line'.

I don't know how many lines is allow, but I am sure you can use 4 lines if you want.

MESSAGE i398(00) WITH 'Line 1 '

                                       'Line 2' 'Line 3'

                                       'Line 4'.


Just remember that each line can has 50 positions MAX.


http://mateusoliveira.net