‎2010 Jul 12 9:11 AM
HI All
i want to read message from message class (SE91) into my variable
there is a way to get it without raise a message?
just to read it to some variable and proceed with the program flow .
Regards
James
‎2010 Jul 12 9:16 AM
Use the INTO addition of the message statement. Check this example
data: var type string.
MESSAGE E004(ZR0) INTO var.
Vikranth
‎2010 Jul 12 9:15 AM
Hi ,
You can create the text in the text-001 and you can continue with the program with out raising the error message.
With Regards,
Sumodh.P
‎2010 Jul 12 9:15 AM
You can use the MESSAGE ... INTO <variable> statement for this. Read the SAP documentation for details [http://help.sap.com/abapdocu_70/en/ABAPMESSAGE_OPTIONS.htm#!ABAP_ADDITION_3@3@]
BR,
Suhas
‎2010 Jul 12 9:16 AM
Use the INTO addition of the message statement. Check this example
data: var type string.
MESSAGE E004(ZR0) INTO var.
Vikranth
‎2010 Jul 12 9:23 AM
‎2010 Jul 12 9:56 AM
Hi James,
You can capture the message of SE91 with function module 'FORMAT_MESSAGE' .
Example:
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
id = i_message-msgid
lang = i_message-msgspra
no = i_message-msgnr
v1 = i_message-msgv1
v2 = i_message-msgv2
IMPORTING
msg = g_msg
EXCEPTIONS
OTHERS = 0.
Regards,
Moqeeth.
‎2013 Oct 02 1:00 PM
‎2010 Jul 12 10:00 AM
Messsage E001(class name) into var.
The above statement can be used where class name is message class name and var is variable of string type.