‎2008 Jul 06 10:12 AM
Hi,
how can I display message dynamically...say I want to get input from user and display that input's content.in my message for example
the message content is " my name is x".this x I want to get from user and display in my message.
‎2008 Jul 07 12:39 PM
Hi Mohan,
There is something called Place Holders in message. You can pass upto 9 variables in that place holders.
While creating the message in the message class (SE91) create the place holder. Then when your are calling the message in your program you need to pass the variable along with it.
Example:
data: my_var(30) type c value 'Hello'.
Message s001(ztest_msg_class) with my_var.
Output: Success for Hello.
Hope this will help. Please let me know if you need any more details.
Thanks and Regards,
Samantak.
Rewards points for useful answers.
‎2008 Jul 06 10:20 AM
Check the link
http://help.sap.com/saphelp_nw70/helpdata/en/9f/dbaaaf35c111d1829f0000e829fbfe/content.htm
section : Filling Message Texts Dynamically
e.g.
parameters:pa_uname like sy-uname.
data : wf_text like sy-msgv1.
wf_text = pa_uname.
message i999(ZCLASS) with wf_text.
your message 999 for message class ZCLASS will be "my name is &"
regards,
aj
Edited by: Abhishek Jolly on Jul 6, 2008 11:23 AM
‎2008 Jul 07 12:39 PM
Hi Mohan,
There is something called Place Holders in message. You can pass upto 9 variables in that place holders.
While creating the message in the message class (SE91) create the place holder. Then when your are calling the message in your program you need to pass the variable along with it.
Example:
data: my_var(30) type c value 'Hello'.
Message s001(ztest_msg_class) with my_var.
Output: Success for Hello.
Hope this will help. Please let me know if you need any more details.
Thanks and Regards,
Samantak.
Rewards points for useful answers.
‎2008 Jul 07 12:51 PM
Mohan,
Search in SDN with term 'place holders'. you will get your answer.
Amit.
‎2008 Jul 07 2:31 PM
Hiii!
PARAMETERS:
p_name(20) TYPE c.
MESSAGE i006(z_msg) with p_name.
Regards
Abhijeet Kulshreshtha
‎2008 Jul 08 8:58 AM
Hi,
for this you need to create a global message class .
Go to Transaction SE91,Create message class and create message one message(001) with Place holders(&) and the Required text.
Now Call the Message in your progarm ans pass the user name -like
Message I001(messageclass) with username.
You will get the user name in runtime .
Regards,
Sujit
‎2008 Jul 08 10:17 AM
Hi Mohan,
Sap has provide us with place holders and you can also use them in message like &1.... , at runtime the placeholder of the message will be replaced by the variable that you provide in your message, you can use any standard message if it met your requirement or else you can also build your message class by using the T-code se91.
Regards,
Pritam.
‎2008 Jul 10 11:30 AM
Hi,
Try this...
PARAMETERS: name(50) TYPE C.
MESSAGE name TYPE 'I'.
Hope it helps you.
Murthy