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 Texts show incomplete

former_member660488
Participant
0 Kudos

Hi experts,

when the text lw_output_api-message over long ,the message cannot display Incompletely.

I don't want to cut the message text into two or three parts, is there any alternative?

1 ACCEPTED SOLUTION

Sandra_Rossi
Active Contributor

Please read the ABAP documentation.

If you use WITH, each of the four arguments is truncated to 50 characters: "They can have the same data type as a source field of the statement WRITE TO and they are formatted in accordance with the associated predefined formats with an output length of 50."

Instead, you may use this other syntax "without WITH":

MESSAGE |my { lw_output_api-message } text| TYPE 'E'.

Note that defining full generic messages in message classes is considered bad practice (many people would agree). Instead, they should be something like "Quality of Handle Unit &1 must be checked".

4 REPLIES 4

Sandra_Rossi
Active Contributor
0 Kudos

Please paste text instead of image, otherwise people can't copy/paste your code to correct it.

Sandra_Rossi
Active Contributor

Please read the ABAP documentation.

If you use WITH, each of the four arguments is truncated to 50 characters: "They can have the same data type as a source field of the statement WRITE TO and they are formatted in accordance with the associated predefined formats with an output length of 50."

Instead, you may use this other syntax "without WITH":

MESSAGE |my { lw_output_api-message } text| TYPE 'E'.

Note that defining full generic messages in message classes is considered bad practice (many people would agree). Instead, they should be something like "Quality of Handle Unit &1 must be checked".

basantmhr
Participant
0 Kudos

Hi YI SHEN,

You can simply show the message without using any message class as such if the requirement is to show everything at once without splitting it.

Message lw_output_api-message type 'E'. " Change type according to your requirenment.
"also ensure the compatability of lw_output_api-message variable.

But if you still want to use a message class then you must adhere to the limit of each placeholder value.

0 Kudos

Thank you!