10-20-2008 6:44 AM
I have to include the path of the file in my message box.
CONCATENATE c_fname p_saleno INTO c_path.
CALL FUNCTION 'MESSAGE_PREPARE'
EXPORTING
MSG_ID = 'Z10493498'
MSG_NO = '002'
MSG_VAR1 = 'c_path'
IMPORTING
MSG_TEXT = v_mess
.
But it displays an error instead., I already include a & in my message short text, what is wrong with this?
Edited by: Enrique Mancao on Oct 20, 2008 7:44 AM
10-20-2008 6:50 AM
hi Enrique,
try this.
CONCATENATE c_fname p_saleno INTO c_path.
CALL FUNCTION 'MESSAGE_PREPARE'
EXPORTING
MSG_ID = 'Z10493498'
MSG_NO = '002'
MSG_VAR1 = c_path
IMPORTING
MSG_TEXT = v_mess
regards,
Peter
10-20-2008 6:50 AM
hi Enrique,
try this.
CONCATENATE c_fname p_saleno INTO c_path.
CALL FUNCTION 'MESSAGE_PREPARE'
EXPORTING
MSG_ID = 'Z10493498'
MSG_NO = '002'
MSG_VAR1 = c_path
IMPORTING
MSG_TEXT = v_mess
regards,
Peter
10-20-2008 6:59 AM
Hi Peter,
I already did that, it has an error that says;
Type conflict when calling a function module.
Why is that?
10-20-2008 7:03 AM
10-20-2008 7:06 AM
10-20-2008 7:07 AM
Hi Enrique,
I think there is a problem in the declaration you have made for c_path then.
give it as..
data: c_path type SYMSGV.
and then try...
Cheers,
Vishnu
10-20-2008 7:16 AM
hi,
open the FM 'MESSAGE_PREPARE' in SE37 and check the declaration of the input parameter MSGV1. use its data type to declare c_path.
regards,
Peter
10-20-2008 7:08 AM
Hi ,
Check the data type of c_path is same as MSG_VAR1 and also check the data type of v_mess.
And also it is better to write capital letter when we are writing any text in codes. So change 'c_path' to 'C_PATH' and 'v_mess' to 'V_MESS'.
Thanks.
Phani Diwakar.
10-20-2008 7:09 AM
Go to Function module MESSAGE_PREPARE
check the data type of the MSG_VAR1 and decalre C_PATH with that data type
10-20-2008 7:12 AM
Can u pass the Language parameter as sy-langu and check ,
message text as 255 char ,
and the passing variables with sy-msgv1 ,
and get rid of the quotes .
Vijay.