Application Development and Automation 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: 
Read only

reports

Former Member
0 Likes
890

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
870

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.

7 REPLIES 7
Read only

sreeramkumar_madisetty
Active Contributor
0 Likes
870

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

Read only

Former Member
0 Likes
870

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.

Read only

Former Member
0 Likes
870

just use like :

at selection-screen on s_matnr.

select * from matnr from mara into mara

where matnr in S_matnr.

Read only

Former Member
0 Likes
870

hi,

U can do it bys uding

IN

keyword.

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

Read only

Former Member
0 Likes
870

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.

Read only

Former Member
0 Likes
871

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.

Read only

Former Member
0 Likes
870

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