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

Error Display

Former Member
0 Likes
2,065

Hi all,

I want to display the error message in the report as "You are not authorize to view PO # " and next to it i want to display the PO number also...how can i write

MESSAGE E007 P_OBJ_ID.???

giving the syntax error...

(here P_OBJ_ID is the PO number )

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,525

Hi,

Just give standard message E999, it have 4 &&&& value ther u can give ur message text & PO number. 1 & have text 2nd & have PO Number for 3rd ,4th & values u have to give SPACE SPACE . then it will display ur text as well as ur value.

If it is solve ur problem give me points.

11 REPLIES 11
Read only

Former Member
0 Likes
1,525

MESSAGE E007 WITH P_OBJ_ID.

Read only

Former Member
0 Likes
1,525

Hi

Give like this.

MESSAGE E007 with P_OBJ_ID.

Regards

Haritha.

Read only

Former Member
0 Likes
1,525

Hi Srikanth,

Try use this.

DATA: mid TYPE sy-msgid VALUE 'SABAPDOCU',

mtype TYPE sy-msgty VALUE 'I',

num TYPE sy-msgno VALUE '014'.

MESSAGE ID mid TYPE mtype NUMBER num.

Regds,

Younus

<b>Reward Helpful Answers!!!</b>

Read only

alex_m
Active Contributor
0 Likes
1,525

In message classs give your error message with & symbol.

Use MESSAGE E007 with (variable name of PO# value).

Read only

Former Member
0 Likes
1,525

message no 007 need to have a place holder & to do that

what is the content in message number 007??

choose a message number in that message class with place holders like & &

and use

MESSAGE E007 with 'You are not authorize to view PO '  P_OBJ_ID.

Read only

dustyplanet
Active Participant
0 Likes
1,525

You have not mentioned the message class, are you using a custom (Z) message class... As long as your message has a placeholder <b>'You are not authorized to view PO # &1'</b>, when it is maintained in the message class... you can use the following statement:

MESSAGE E007 with P_OBJ_ID.

Regards,

Dushyant Shetty

<i>P.S. Also, since you do not mention the message class in the MESSAGE statement, I assume you have set it globally using the MESSAGE-ID addition to the REPORT statement.</i>

Read only

Former Member
0 Likes
1,525

Hi Srikanth,

Refer this code :

if sy-subrc <> 0.

MESSAGE E007 WITH P_OBJ_ID.

endif.

E007 : 'You are not authorize to view PO # "

Regards,

Hemant

Read only

0 Likes
1,525

Thanks for u reply...

But MESSAGE E007 WITH P_OBJ_ID.

is not working..it is showing only...'You are not authorize to view PO # '

PO number is not shown...

Pls help

Read only

Former Member
0 Likes
1,526

Hi,

Just give standard message E999, it have 4 &&&& value ther u can give ur message text & PO number. 1 & have text 2nd & have PO Number for 3rd ,4th & values u have to give SPACE SPACE . then it will display ur text as well as ur value.

If it is solve ur problem give me points.

Read only

0 Likes
1,525

what is the message class for E999???

How to write it...pls help.

Read only

0 Likes
1,525

u create a message as & & & in the zmessage classs..

In the program u mention as error messages indiviually...by using some concatenate statement....