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

Display Long Text Error Message in ABAP Program

ganu_k
Participant
0 Likes
13,769

Hello Experts,

Can you please let me know if its possible to pass Long Text error message thru ABAP Program.  My scenario is I have defined a Message Class in SE91 and have placeholders & - for Short Text and &V1& &V2& for Long text.

My Requirement is to pass from ABAP Program a Short Text Message and Detail Long Text Message.

Short Text Message is for the User - to be displayed on the Screen.

Long Text message is for details Analysis when he double clicks with details of like - which program - sysrepid and technical information for debugging.

However now when i use the below statement, its printing all the message content in single line for the user which is confusing and not required.

   MESSAGE e001 WITH 'Error in Processing'
    gs_message-sy-repid gs_message-techdetails gs_message-contact .

All I need to know is how to display Short Text in Screen and Long text message only on Double click???

Plz note, I dont want to hard code long text message in SE91, as the long text message should be dynamic pointing to which section of the code is failing.

Let me know if this is possible and if so how? thx

Ganu

1 ACCEPTED SOLUTION
Read only

Former Member
4,519

In SE91, Select your message -> Press "Long Text" button, to enter the long text editor.

Once inside the editor, use Edit -> Command -> Insert Command -> Symbols, you can enter placeholder variables like &V1&, &V2& there.

Once you output your message using something like MESSAGE Wxxx WITH 'TEST1' 'TEST2', then &V1& will be replaced by TEST1, &V2& by TEST2 etc in the long text that you get by double clicking the message in the status bar

3 REPLIES 3
Read only

Former Member
4,520

In SE91, Select your message -> Press "Long Text" button, to enter the long text editor.

Once inside the editor, use Edit -> Command -> Insert Command -> Symbols, you can enter placeholder variables like &V1&, &V2& there.

Once you output your message using something like MESSAGE Wxxx WITH 'TEST1' 'TEST2', then &V1& will be replaced by TEST1, &V2& by TEST2 etc in the long text that you get by double clicking the message in the status bar

Read only

0 Likes
4,519

Thanks a lot Vishnu, that helped, though we can have entirely two different message for Short Text and Long text, i am able to use the & and &V1& to good effect.

thx a lot

Read only

RaymondGiuseppi
Active Contributor
4,519

Once a time... I created such a message with following definition

Short text

     &1.

Long text

Regards,

Raymond