07-24-2007 5:24 AM
friends,
i have a plain text message text-03 with message the doc number not found.
but i want it to be more dynamic like ' the doc number vbeln not found'.
where the vbeln is the what ever dynamic value in the loop.
i hard that the symbol '&' helps in this case but i dont know how to use that.
thank you.
07-24-2007 5:32 AM
try this
message e000(8i) with text-03 vbeln.
or you can create your own msg class ..
message e000(zspd) with text-03 vbeln.
dbl click on zspd and give & & there and save it.
regards
shiba dutta
07-24-2007 5:34 AM
Hi,
Go to tran SE91 type your message class and create anew message from the available number like this way for example your message class is YCC and your create message number as 300
Document Number & not found
in your code
for display message as error
message e300(ycc) with vbak-vbeln.
aRs
07-24-2007 5:35 AM
Create your message in the message class as "the doc number & not found".
And use it in the program like.
message e001(zmsg) with v_vbeln.
zmsg/001: Message Class/Message Number
v_vbeln: Doc Nr
07-24-2007 5:39 AM
try this logic...
LOOP AT MESSTAB .
if MESSTAB-MSGNR = '311' or MESSTAB-MSGTYP = 'E'.
SELECT SINGLE msgnr text FROM T100
into wa_errmess
WHERE SPRSL = MESSTAB-MSGSPRA
AND ARBGB = MESSTAB-MSGID
AND MSGNR = MESSTAB-MSGNR.
IF SY-SUBRC = 0.
err_message = wa_errmess-TEXT.
IF err_message CS '&1'.
REPLACE '&1' WITH MESSTAB-MSGV1 INTO err_message.
REPLACE '&2' WITH MESSTAB-MSGV2 INTO err_message.
REPLACE '&3' WITH MESSTAB-MSGV3 INTO err_message.
REPLACE '&4' WITH MESSTAB-MSGV4 INTO err_message.
ELSE.
REPLACE '&' WITH MESSTAB-MSGV1 INTO err_message.
REPLACE '&' WITH MESSTAB-MSGV2 INTO err_message.
REPLACE '&' WITH MESSTAB-MSGV3 INTO err_message.
REPLACE '&' WITH MESSTAB-MSGV4 INTO err_message.
ENDIF.
CONDENSE err_message.
WRITE: / MESSTAB-MSGTYP, err_message .
ELSE.
WRITE: / MESSTAB.
ENDIF.
endif.
ENDLOOP.
if useful dont forget to give points...
07-24-2007 5:48 AM
hi,
goto se91 [creating a message class ] -> click on details [ second tab] -> give message number and message content as & & & & -> give a name for message and use in our program as
message e000(zaluri) with ' the doc number', vbeln 'not found'.
where zaluri is acustom message class created by me.
or u can use in this way also as
message ' the doc number vbeln not found' type 'w0000'.
if helpful reward some points.
with regards,
Suresh Aluri.