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

Appending to a Message statement

Former Member
0 Likes
1,909

Hi All,

I have to display a message, with a variable field, shown down as 'XXXX'. How do I append the variable string XXXX to the message.

str = 'XXXX'.

I have to append str(variable string) to the Message display.

-->

MESSAGE 'CORRECT METER READING UNIT,THE POSTCODE STARTS WITH XXXX' TYPE 'I'.

Thx...

Pradipta

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,494
DATA str(255) TYPE c.
DATA c_xxxx(10).

c_xxxx = xxxx.

CONCATENATE 'CORRECT METER READING UNIT,THE POSTCODE STARTS WITH' c_xxxx
  INTO str SEPARATED BY space.

MESSAGE str TYPE 'I'.
7 REPLIES 7
Read only

Former Member
0 Likes
1,494

in message class (in se91)

as below

100 &1&2&3&4

str = 'yourvalue'

now u can use

MESSAGE e100 with 'CORRECT METER READING UNIT,THE POSTCODE STARTS WITH' <b> str</b>

Read only

Former Member
0 Likes
1,494

Hi,

you need to have a message with a place holder.

In se91 you create a message like this

Sales order &1 created.

Now, when you want to use this, MESSAGE 100(ss) with '1000'.

Now the message will be Sales order 1000 created.

So, you need to do the same thing. You can have multiple place holders in your message.

Regards,

Ravi

Note : Please mark the helpful answers

Read only

Former Member
0 Likes
1,494

IN se91 create a message:(say message number is 999)

CORRECT METER READING UNIT,THE POSTCODE STARTS WITH & TYPE 1.

in prog call the message:

message i999 with v_var.

REgards,

Ravi

Read only

athavanraja
Active Contributor
0 Likes
1,494

data: dynmessage(1000) .

dynmessage = 'Test' .

concatenate 'Correct meter readin the post code starts with' dynmessage into dynmessage .

MESSAGE i398(00) WITH dynmessage .

Regards

Raja

Read only

Former Member
0 Likes
1,495
DATA str(255) TYPE c.
DATA c_xxxx(10).

c_xxxx = xxxx.

CONCATENATE 'CORRECT METER READING UNIT,THE POSTCODE STARTS WITH' c_xxxx
  INTO str SEPARATED BY space.

MESSAGE str TYPE 'I'.
Read only

Former Member
0 Likes
1,494

You can create a message (100) with & & & & in your message class.. meaning you can pass 4 variables to the message.. and you can use it as

message i100 with 'CORRECT METER READING UNIT,THE POSTCODE STARTS WITH' xxxx.

There is a limitation on the no of chars to be displayed in a message.

Read only

Former Member
0 Likes
1,494

U can display as below:

Message i000 WITH text-001 &str .

text-001 contains CORRECT METER READING UNIT,THE POSTCODE STARTS WITH

str contains the number that may vary.

000 is the message number with & & &.

Hope this help you, if not revert back.