Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

regarding possible values for a field

Former Member
0 Kudos

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.

2 REPLIES 2

Former Member
0 Kudos

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

Former Member
0 Kudos

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.