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

Former Member
0 Likes
1,352

HI all.

I would like to display a value after a message.

message i000(zm) with 'message', p_message.

it is not working. can somebody tell me how i can write this code. i would like the parameter value along with the message text.

Thanks.

9 REPLIES 9
Read only

Former Member
0 Likes
1,119

Hi,

Have you defined this message class ZM in your report header?

Regards,

Satish

Read only

0 Likes
1,119

s it is defined

Read only

0 Likes
1,119

Remove Comma <b>,</b>

This is the syntax

MESSAGE I000(MESSAGE CLASS NAME) WITH TEXT-002 <VARIABLE>.

Regards,

Satish

Read only

Former Member
0 Likes
1,119

HI,

follow the below examples....

concatenate "Sales order"

v_sales -


(consider 0000010010)

"Created successfuly"

into lv_string.

message i(000) with lv_string.

Note: message number 000 should contain "& & & &" in the message class.

Addition 1

... WITH f1 ... f4

Effect

Inserts the contents of a field fi in the message instead of in the placeholder &i. If unnumbered variables (&) are used in a message text, these are replaced consecutively by the fields f1 to f4.

To aid compilation, only numbered variables (&1 to &4) are to be used in future if several fields are involved.

If a "&" is supposed to appear in the message at runtime, you must enter &&.

In the long text of a message, the symbol &Vi& is replaced by the field contents of fi.

After WITH, you can specify 1 to 4 fields.

Note

You can output up to 50 characters per field. If the field contains more characters, these are ignored.

Example

MESSAGE E0004 WITH 'Hugo'.

Note

When executing the statement, the contents of the fields f1 to f4 are assigned to the system fields SY-MSGV1, SY-MSGV2, SY-MSGV3 and SY-MSGV4.

Regards,

Vara

Message was edited by:

varaprasad bhagavatula

Read only

Former Member
0 Likes
1,119

In ZM message class, for message 000, type "&" at the end of the message.

When you write the message in the program, write it as

message i000(zm) with p_message .

Here p_message is the value you want to display after the message.

Read only

Former Member
0 Likes
1,119

hi

Do u have place holders defined in the message i000(zm) .

regards,

Praveen

Read only

Former Member
0 Likes
1,119

in your message class ZM

for the message id 000....

in the message text....

givel like below...for example...

Please give the value above &

Then call this message from your program like this...

In your report program header line...

REPORT <yourreport> MESSAGE-ID ZM.

Inside the program...

MESSAGE i000 with var1.

Read only

Former Member
0 Likes
1,119

Hi,

try this one.

message e888(sabapdocu) with text-005.

in ur message class keep & & & at ur message number and give that class near sabapdocu then it will come.

plzz reward points if it is useful.

Read only

former_member386202
Active Contributor
0 Likes
1,119

Hi,

Declare variable n concatanate both the value n then display

data : lv_message type string

concatanate message p_message into lv_message separated by space.

message i000(zm) with lv_message.

Regards,

Prashant