‎2007 May 22 12:37 PM
Hi,
I have declared a select-option variable.
At field validation level what is the need to do for field-low value validation and field-high value validation. Instead of that cant we do the complete field validation.
Regards,
siri
‎2007 May 22 12:44 PM
u can do validation for the selection field at a time.
sometimes it is that this way u have to validate.....
only low field is specified and high field is not specified. then need to do validation for low-field.
only high field specified and low field is empty, then need to do validation for high-field.
when both are speciifed, need to do validation in one instance.
‎2007 May 22 12:40 PM
Hi
Yes you can do the complete field validation.
Suppose for Plant we do the complete validation not plant-low/plant-high validations in general.
Regards,
Sreeram
‎2007 May 22 12:41 PM
Hi,
The standard way of doing it is by comparing the s-low and s-high values.
You can do it by the statement
if s_xxxx in (v_low(lower limit), v_high (Upper limit))
.........
endif.
‎2007 May 22 12:42 PM
just use like :
at selection-screen on s_matnr.
select * from matnr from mara into mara
where matnr in S_matnr.
‎2007 May 22 12:42 PM
hi,
U can do it bys uding
INkeyword.
use ranges.fill the ranges with required values.
Then i code, u check the select option values are in this range or not.
so u can use complete field validation.
rgds
reshma
‎2007 May 22 12:43 PM
Hi,
Yes you can use it as a single variable as select options values are stored in
the form of a table whereby high and low only specify the range.
‎2007 May 22 12:44 PM
u can do validation for the selection field at a time.
sometimes it is that this way u have to validate.....
only low field is specified and high field is not specified. then need to do validation for low-field.
only high field specified and low field is empty, then need to do validation for high-field.
when both are speciifed, need to do validation in one instance.
‎2007 May 22 12:47 PM
Here is sample code for validations, no need to validate saparetely.It will take care of both low and high.
DATA :
g_matnr TYPE matnr.
SELECT-OPTIONS:
s_matnr FOR g_matnr.
Atselection-screen:
DATA l_matnr TYPE matnr. " Material
SELECT matnr
INTO l_matnr UP TO 1 ROWS
FROM mara
WHERE matnr IN s_matnr.
ENDSELECT.
IF sy-subrc <> 0.
Incorrect material number entered
MESSAGE e002 .
ENDIF.
-SAKR