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

select-option validations dynamically and also statically

Former Member
0 Likes
367

select-option validations dynamically and also statically

2 REPLIES 2
Read only

Former Member
0 Likes
341

If you are unable to do it with standard comparision, then you have to loop through select options of them and then you have to collect each value into an internal table from include tab and exclude each value from exclude tab and then validate each of them...

Read only

vinod_vemuru2
Active Contributor
0 Likes
341

Hi,

U can do the validations in AT SELECTIOn-SCREEN event.

Check below sample code.

AT SELECTION-SCREEN ON so_kunnr.

CHECK NOT so_kunnr[] IS INITIAL.

PERFORM validate_kunnr.

FORM validate_kunnr.

DATA: l_kunnr TYPE kna1-kunnr VALUE IS INITIAL.

SELECT SINGLE kunnr FROM kna1 INTO l_kunnr

WHERE kunnr IN so_kunnr.

CHECK NOT sy-subrc IS INITIAL.

MESSAGE e820.

ENDFORM. " validate_kunnr

I don't understand what do u mean by STATIC and DYNAMIC in selection screen validations. The above code will work when u enter some value in the select option and presses

ENTER or EXECUTE BUTTON.

Thanks,

Vinod.