10-30-2007 8:36 AM
How to give error message for the screen element text field when wrong i/p
when wrong input given
eg.
I have a text box with SBOOK-CARRID
so when user give wrong entry in text box i.e LG
then I should give some error stating that the the input is invalid or not available ,
now it showing the error of standard messages,
i want manual message to be displayed when error comes.
Thank you,
Regards,
Jagrut Bharatkumar Shukla
10-30-2007 8:40 AM
code like this :
at-selection-screen-output on <parameter>.
select single from sbook whrere carrid = <paramter>
if sy-subrc <> 0.
message e333(s1) with 'your custom message'.
endif.
reward points if helpful
10-30-2007 8:41 AM
Hi,
Try this.
REPORT zt0020
NO STANDARD PAGE HEADING
MESSAGE-ID sabapdocu.
If Field NE 'give condition '.
MESSAGE i888 WITH 'Input is invalid'.
LEAVE LIST-PROCESSING.
endif.
Regards,
Prashant
10-30-2007 9:41 AM
Hi all,
Thank you for your valuable reply,
but the thing is that its a screen field,
i.e text box not a selection screen
i created in screen layout
with name sbook-carrid
,
now i want to get error message display if wrong i/p is given
thank you.
Regards,
Jagrut bharatkumar Shukla,
10-30-2007 9:48 AM
Hi,
write the logic in PAI of the screen.
select single carrid from sbook into v_carrid whrere carrid = <paramter>
if sy-subrc <> 0.
message e333 with 'your custom message'.
endif.
Regards,
Nagaraj