09-10-2007 8:43 AM
Hi,
i have a field in the selection screen for that field only 6 possible values are exist.
i need to give error message to user ,while he trying to enter other than those 6 possible values.
how can i perform code in this situation.
Regards,
srinu dasar.
09-10-2007 8:51 AM
HI,
it's easier if you define this values about the domain you defined for the field.
If you did this, it's not possible to enter an other value, cause the standard sap will not allow it.
regards
Nicole
09-10-2007 8:54 AM
HI,
AT SELECTION-SCREEN ON OUTPUT.
SELECT SINGLE FLD FROM ITAB WHERE VALUE = P_MATNR.
IF SY-SUBRC NE 0.
MESSAGE 'WRONG VALUE PLACED' TYPE 'E'.
ENDIF.
where fld is the value of list box and itab is a internal table which is used to store the values for list box and p_matnr is the list box.
if helpful reward some points.
with regards,
Suresh Aluri.