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.
Showing results for 
Search instead for 
Did you mean: 

in start of selection if we perform validation ,what happens?

Former Member
0 Kudos

in start of selection if we perform validation ,what happens?


Active Contributor
0 Kudos


Yes ... you can perform validation at START-OF-SELECTION event.

For example, this select statement will collect all open orders based on selection screen. If no record found, then system message will appear and report program will stop.


select a~vbeln into table i_itab
from vbak as a inner join vbuk as b on a~vbeln = b~vbeln
where a~vbeln in s_vbeln   and
      a~auart in s_auart   and
      a~vkorg in s_vkorg   and
      a~vdatu in s_vdatu   and
      a~kunnr in s_kunnr   and
    ( b~lfstk = c_lfstk1 or
      b~lfstk = c_lfstk2 ) and
    ( b~abstk = c_abstk1 or
      b~abstk = c_abstk2 ).

if itab[] is initial.
  message s899 with 'No Open Order Found'.



Ferry Lianto

Former Member
0 Kudos

Hi Mudassir,

Validating of screen is generally done at AT SELECTION-SCREEN event.Data retriveal is done at START-OF-SELECTION event generally.

U can modify the screen fields in the event AT SELECTION-SCREEN OUTPUT.

as like this.

loop at screen.

if screen-name = '..'.

screen-input = 0.

modify screen.





Former Member
0 Kudos

Some times validation occur at Start-of-selection.

I have two radio buttons in selection-screen, when user choose first radio button it gets the data from file at Local server.

when user select second radio button ,then we need to get the data from Application server.

once we choose file path,we need to validate whether file is available or not,if file is not available then we need generate file dynamically.

these validation done under start-of-selection.

Former Member
0 Kudos

Hi Mudassir,

Validations are performed at various stages during the program.

1>Yes, you can and should perform validation at the "<b>START OF SELECTION</b>"

Here the selection performed is for the select statements, say suppose you want the entries from table VBPA which you want to link with KNA1, then if VBPA is empty the program may result in an unappropriate run.

So we use :

<b>if it_vbpa is not initial.

select fields from kna1 into it_kna1.


2> The second condition is during the selection screen you may want to make a field OBLIGATORY (Compulsory) then you should check for the value entered and if the value entered is wrong again it should be validated and an appropriate message has to be displayed. This is done at : "b]AT SELECTION SCREEN</b>"

<b>if p_name is initial.

message text-001 type 'E'.


3> The third condition could be that you may want to change a screen or modify then you have to use the validation at "<b>AT SELECTION SCREEN OUTPUT</b>"

Hope this solves your query.

Reward Points if useful.



Active Contributor
0 Kudos


What kind of validation do you wanna perform?

if you want to validate your selection screen then you should use AT SELECTION-SCREEN event and other Program Related validation you can use START-OF-SELECTION.