‎2005 Jun 26 11:40 PM
Hi,
I want to pop up a message in which I want the valye of X tp be replaced by its value.
DATA: X(3) TYPE C VALUE 'FFF'.
MESSAGE ID 'ERROR MESSAGE' TYPE 'E' NUMBER '000' WITH 'COMPUTED' '&X&'.
But this does not work.
Can someone help me out ?
Tushar
‎2005 Jun 27 12:01 AM
Hi,
Try to use variable X directly:
MESSAGE ID 'ERROR MESSAGE' TYPE 'E' NUMBER '000' WITH 'COMPUTED' X.
then symbol "&1" in your message text will be replaced with "COMPUTED" and symbol "&2" will be replace with variable X content.
Krzys
‎2005 Jun 27 5:04 AM
Hi,
MESSAGE ID id TYPE mtype NUMBER n.
If u want a Pop-up message then u have to give TYPE I message class.
<b>MESSAGE i001 WITH 'COMPUTED' text-001 .</b>
Text-001 should be FFF
Changes in ur messgae
<i>MESSAGE ID TYPE E000 WITH 'COMPUTED' text-001.</i>
Also see this link
http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbaae335c111d1829f0000e829fbfe/content.htm
Try this one.
Message was edited by: Judith Jessie Selvi
‎2005 Jun 27 5:13 AM
Hi,
Here is the sample code.Whatever value you type in p_matnr will be displayed if you press the button.
data : itab type standard table of mara.
PARAMETERS : p_matnr LIKE mara-matnr.
SELECTION-SCREEN PUSHBUTTON /10(20) TEXT-001 USER-COMMAND GO.
AT SELECTION-SCREEN .
CASE SY-UCOMM.
WHEN 'GO'.
message i005 with p_matnr.
ENDCASE.
If your message is static,you better can create a text-symbol[say.eg..005 - 'fff'] for it and use the following code.
message i005.
Hope it helps.If so,reward points.Otherwise,get back.
‎2005 Jun 28 7:49 PM
Tushar,
The ID part refers to a Message Class. Here you specified 'Error Message' which is an invalid name as well as being not in customer name space (does not start with Y or Z). You can examine existing Message Classes as well as create and maintain with Txn SE91.
A message with Number mentioned with the number part should exist in the specified Message Class. In your case the message should have at least two '&' symbols as place holders for two variable you are going to substitute from your ABAP.
Do not enclose a variable name with & and quotes in the ABAP code.
As already mentioned in one of the replies, Error Messages by default are not dispalyed in a popup. It is a user setting.
Also, please read the F1 help for the Message statement.
Cheers,
Ramki Maley.