2006 Nov 15 4:14 AM
in selection screen I need to enter correct value in country select options for that I have to enter us,uk or ind . when we enter other than these how to get error statement enter correct one?
2006 Nov 15 4:18 AM
HI,
PARAMETERS: country(3).
AT SELECTION-SCREEN ON country.
IF country <> 'IND' AND country <> 'US' AND
country <> 'UK'.
MESSAGE e000(SU) WITH 'Enter correct country'.
ENDIF.
in selection screen I need to enter correct value in country select options for that I have to enter us,uk or ind . when we enter other than these how to get error statement enter correct one?
2006 Nov 15 4:17 AM
use at selection screen on field.
for example
AT SELECTION-SCREEN ON country.
IF country-LOW NE ind *mention all youe conditions here
MESSAGE E000 'Use IND, US'.
ENDIF.
I hope it helps.
Best Regards,
Vibha
*Please mark all the helpful answers
2006 Nov 15 4:18 AM
if s_contry ne 'ind'.
message i001(000) with 'enter valid value'.
there is no necessity of using the events .
it is best prectise to use validation in at selection-screen.
kishan negi
2006 Nov 15 4:18 AM
HI,
PARAMETERS: country(3).
AT SELECTION-SCREEN ON country.
IF country <> 'IND' AND country <> 'US' AND
country <> 'UK'.
MESSAGE e000(SU) WITH 'Enter correct country'.
ENDIF.
2006 Nov 15 4:19 AM
AT SELECTION-SCREEN ON S_PERNR
IF NOT S_PERNR IS INITIAL.
SELECT SINGLE PERNR
FROM PA0001
INTO PA0001-PERNR
WHERE PERNR IN S_PERNR.
IF SY-SUBRC NE 0.
MESSAGE E000(ZMESS).
ENDIF.
ENDIF.
do above code
double click ZMESS it will take to messages(se91) and there u give whatever message u want.