10-08-2008 2:05 PM
hi friends
i creates a message in se91. for that i need long text . in long text how to pass variables ?
for ex i created a message
Please enter &1 in the Notification &2
for this how to use this &1 and &2 in long text?
thanks & regards
deepu
10-08-2008 2:36 PM
Hi,
If i got you correctly you have message "please enter &1 and &2 " in a message class
then use it like this
Mytext1 type string value " -----------your text1-------------"
Mytext2 type string value " -----------your text2-------------"
<msg type> <msgno> (<mess class>) with Mytext1 Mytext2.
Hope helpful
Rhea.
10-08-2008 2:20 PM
Hi,
When you have read the text through fm,
you can replace &1 or &2 via replace statement.
Data: field(20).
field = 'A&1C'
REPLACE '&1' WITH 'string' INTO field.
now field is : AstringC
Hope helps.
deniz.
10-08-2008 2:31 PM
Hi,
you can read a message class's item through:
Data: tline like T100.
CALL FUNCTION 'T100_READ_SINGLE'
EXPORTING
* KZRFB = ' '
T100_SPRSL = 'T'
T100_ARBGB = 'ZMAXYZ'
T100_MSGNR = '000'
IMPORTING
WT100 = tline
* EXCEPTIONS
* NOT_FOUND = 1
* OTHERS = 2
.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
if sy-subrc eq 0.
write: tline-text.
endif.
now you can use replace as following:
REPLACE '&1' WITH 'Whatever you want, write here' INTO tline-text.
deniz.
Edited by: Deniz Toprak on Oct 8, 2008 4:31 PM
10-08-2008 2:36 PM
Hi,
If i got you correctly you have message "please enter &1 and &2 " in a message class
then use it like this
Mytext1 type string value " -----------your text1-------------"
Mytext2 type string value " -----------your text2-------------"
<msg type> <msgno> (<mess class>) with Mytext1 Mytext2.
Hope helpful
Rhea.