‎2008 Apr 17 2:27 PM
Hi all,
I want to display an error message as and when an user enters an invalid value and for this I have written the following code:
at selection-screen.
if not s_name is initial.
select single name
from Ztest
into w_name
where merchantname eq s_name.
if sy-subrc NE 0.
message i061(zfi001) with text-005.
now the problem is when I am executing this report and if I enters the invalid name then it's taking a long time to display the message, can you please tell me what may be the possible problem.
Thanks,
Rajeev
‎2008 Apr 17 2:31 PM
‎2008 Apr 17 2:31 PM
‎2008 Apr 17 2:33 PM
‎2008 Apr 17 2:47 PM
As it is a select option you should code like this:
at selection-screen.
if not s_name[] is initial.
select single name
from Ztest
into w_name
where merchantname in s_name.
if sy-subrc NE 0.
message i061(zfi001) with text-005.
endif.
‎2008 Apr 17 2:34 PM
Beside you check the type of parameters, would be better if you change the type of message for "E".
regards,
Alexandre
‎2008 Apr 17 2:35 PM
try like this,
select single name
from Ztest
into w_name
where merchantname in s_name
Edited by: Rengith Skariah on Apr 17, 2008 3:37 PM