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

Validation in selection screen

Former Member
0 Likes
2,818

Hi all,

I am doing validations in my selection screen. If i enter some garbage value, then at selection screen gets triggered and inside that i have checked the value entered in selection screen and am displaying error. My problem is, after the error if the user tries to enter the correct values the error keeps appearing or in other words it says " you have entered an incorrect entry". I am being forced to close the program and open it again to continue with the correct set of entries. Is there any wya by which i can do a refresh on the selection screen and continue with the corrrect entry?

Thnkz,

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,297

WRITE THIS STATEMENT AFTER THE ERROR .

LEAVE LIST-PROCESSING.

Regards,

Lalit Mohan Gupta.

8 REPLIES 8
Read only

Former Member
0 Likes
1,297

Hi,

The 'ON p_value' addition may help you.

Issa

Read only

Former Member
0 Likes
1,297

hi,

try this code...


* write your validation in 
at selction-screen on p_field.   "p_field is input field..
*   <<--write your validation and error message


Regards,

Prabhduas

Edited by: Prabhu Das on Apr 14, 2009 10:11 PM

Read only

Former Member
0 Likes
1,297

Hi,

Check the below code

PARAMETER : p_bukrs TYPE pa0001-bukrs.

AT SELECTION-SCREEN ON p_bukrs.
  IF NOT p_bukrs IS INITIAL.
    SELECT * FROM t001 WHERE bukrs EQ p_bukrs.
      IF sy-subrc NE 0.
        MESSAGE e016(pn) WITH 'ERROR MESSAGE'.
      ENDIF.
    ENDIF.

Read only

Former Member
0 Likes
1,297

Thanks for your reply. But i am exactly using the statement as you all have mentioned. I am using at selection-screen on ( field name ). My problem is the incorrect entries are correctly identified and error message is being displayed, but if on the same screen i try entring correct value still the same error message is coming. I have to go back,execure the program again in order to continue with the correct data.

Read only

0 Likes
1,297

Hi,

If you are validating the select options then check whether initial values are getting populated in the initialization event and carried forward.

Can you paste your code here .

Read only

Former Member
0 Likes
1,298

WRITE THIS STATEMENT AFTER THE ERROR .

LEAVE LIST-PROCESSING.

Regards,

Lalit Mohan Gupta.

Read only

Former Member
0 Likes
1,297

closed.

Read only

0 Likes
1,297

hey

thanks for given information about validation at selection screen events