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: 

Appending to a Message statement

Former Member
0 Kudos

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

Former Member
0 Kudos
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

Former Member
0 Kudos

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>

Former Member
0 Kudos

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

former_member181962
Active Contributor
0 Kudos

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

athavanraja
Active Contributor
0 Kudos

data: dynmessage(1000) .

dynmessage = 'Test' .

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

MESSAGE i398(00) WITH dynmessage .

Regards

Raja

Former Member
0 Kudos
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'.

Former Member
0 Kudos

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.

Former Member
0 Kudos

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.