‎2009 Jan 07 11:52 AM
Hi.
How can I insert a system message to an abap string within my program instead of to the screen?
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
I want to get the final message that suppose to appear on the screen into a single string.
Thanks,
Rebeka
‎2009 Jan 07 12:03 PM
Same effect (but better readability):
CONCATENATE sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
INTO lv_message SEPARATED BY space.Also possible during message creation:
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
INTO lv_message.Regards
Patrick
‎2009 Jan 07 11:53 AM
Concatenate sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4 into lv_message.Best regards,
Prashant
‎2009 Jan 07 12:01 PM
But those fields includes only the variable details.
What about the constant string ?? See for example message class 06 message number 312.
I want to insert my string in the program the following:
Purchasing info record 50005523 100-356-01 IDR1 already exists.
Thanks in advcne,
Rebeka
‎2009 Jan 07 11:56 AM
‎2009 Jan 07 11:56 AM
Hi,
use the generic message in the message class by passing & & & &.
Regards,
Naresh
‎2009 Jan 07 11:58 AM
Hi,
To combine the message text and the variable elements into one text string you could use a function module like MESSAGE_TEXT_BUILD.
Regards,
Nick
‎2009 Jan 07 12:00 PM
Hi,
Delcare a variable of 255 chars.
U can concatenate and put it in one varibale..
I hope i understood ur requirement.
Regards,
Nagaraj
‎2009 Jan 07 12:03 PM
Same effect (but better readability):
CONCATENATE sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
INTO lv_message SEPARATED BY space.Also possible during message creation:
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
INTO lv_message.Regards
Patrick
‎2009 Jan 07 12:07 PM
"into gv_text" after the message id ..... solves the problem.
Thanks all,
Rebeka