2006 Aug 28 10:26 AM
Hi,
I'm trying to dipslay the mesage variables (sy-msgv1 etc.) in the longtext of a message. In the longtext i put for example:
"varibale1: &V1&"
But i does not work, when raisimg the message, it does not resolve the variables.
Any suggestions?
Regards
Jan
Although this message is old. The answer is relevant today. The message variables are different in the short text and long text.
- In the short text you use the typical & as the placeholder. Multiple variables in the short text are the same.
- In the long text you use the &V1& as the placeholder. Multiple variables in the long text are sequential, i.e. &V1& &V2&
2006 Aug 28 10:31 AM
Hi,
define the message text element like : varibale1: &
then raise message like
message e001(xxx) with <variable>.
(or)
do like this :
data : x_message(100) type c.
concatenate 'Testvariable1:' V1 'Testvariable2:' V2
into x_message.
message e001(zsd) with x_message.
it will work.
Regards
Appana
2006 Aug 28 10:53 AM
Hi Appana,
thanks, but this does not work, it still doesn't resolve the variable. I raise the message like this:
message e001(zsd) with 'Test'.
In the Longtext I get with Your suggestion:
"varibale1: &"
instead of:
"variable1: Test"
Regards
Jan
2006 Aug 28 10:31 AM
Hi,
I think you should pass this in the short text itself.
For eg.
Message e01 with sy-msgv1.
where 01 would be &.
Best regards,
Prashant
2006 Aug 28 11:17 AM
Hi Prashant,
it seems like Your are almost right, now I'm having:
h_var1 = 'test1'.
h_var2 = 'test2'.
sy-msgv1 = h_var1.
sy-msgv2 = h_var2.
message e001(zsd) with h_var1 h_var2.My message-longtext is:
<b>
Testvariable1: &V1&, Testvariable2: &V2&</b>
This now resolves only ONE variable (the first one), so I get this longtext-output:
<b>Testvariable1: test1, Testvariable2: &V2&</b>
I think this is very strange... Any more suggestions?
Thanks
Jan
2006 Aug 28 11:21 AM
hi
in the message class <b>ZSD</b> and message no <b>001</b> you should give like
&1& &2& &3& &4&.
then you can use
<b>message e001(zsd) with h_var1 h_var2 H_VAR3 H_vAR4</b>.
Regards
Srikanth
2010 Aug 18 6:47 PM
Although this message is old. The answer is relevant today. The message variables are different in the short text and long text.
- In the short text you use the typical & as the placeholder. Multiple variables in the short text are the same.
- In the long text you use the &V1& as the placeholder. Multiple variables in the long text are sequential, i.e. &V1& &V2&
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |