2007 Jul 31 9:00 AM
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.
2007 Jul 31 10:12 AM
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.
2007 Jul 31 9:06 AM
2007 Jul 31 9:07 AM
Hi,
Declare <b>wa_textout</b> as a string or CHAR type with a lenght of 132 characters.
Regards,
Sesh
2007 Jul 31 9:18 AM
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.......
2007 Jul 31 9:28 AM
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
2007 Jul 31 9:39 AM
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?
2007 Jul 31 9:52 AM
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
2007 Jul 31 9:08 AM
2007 Jul 31 9:50 AM
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
2007 Jul 31 10:12 AM
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.
2007 Jul 31 10:14 AM
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...
2007 Jul 31 10:23 AM
<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.
2007 Jul 31 10:49 AM
not happy having to split, but I cannot see any other way to display error messages
2014 Apr 03 2:03 PM
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.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |