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

Selection Screen Error

Former Member
0 Likes
746

Hi,

I am validating selection screen inputs. If i enter wrong value. i am showing an error. It displays error message properly but it takes screen to other blank screen.

How can i show error message on same selection screen?

Code:

start-of-selection.

IF pa_to < pa_from.

MESSAGE e274(gs).

ENDIF.

Thanks in advance,

7 REPLIES 7
Read only

jayanthi_jayaraman
Active Contributor
0 Likes
719

Hi,

Try this.

IF pa_to < pa_from.

leave list-processing.

MESSAGE e274(gs).

ENDIF.

Read only

dani_mn
Active Contributor
0 Likes
719

HI,

try this event.

<b>AT SELECTION-SCREEN.</b>

IF pa_to < pa_from.

MESSAGE e274(gs).

ENDIF.

REgards,

Read only

Former Member
0 Likes
719

The same code should be written in At Selection-screen event, But not in Start of selection.

Cheers.

Read only

Former Member
0 Likes
719

The Problem is occuring because you are doing the validation on the Start of Slection event....Usually the validations must be done on At Selection screen event....since you want to remain on the same screen write the same code under At Selection Screen event and your problme is resolved.

Hope This Helps

Read only

sourabhshah
Product and Topic Expert
Product and Topic Expert
0 Likes
719

hi,

This will work

AT SELECTION-SCREEN.

IF pa_to < pa_from.

MESSAGE e274(gs).

ENDIF.

for E type of messages.

Selection screen processing terminates, and the selection screen is redisplayed. The screen fields specified through the additions to the AT SELECTION-SCREEN statement are ready for input. The user must enter a new value. The system then restarts the selection screen processing using the new values. You cannot use error messages with the ON HELP-REQUEST , ON VALUE-REQUEST and ON EXIT additions. Instead, a runtime error occurs.

Read only

Former Member
0 Likes
719

write ur code on At selection screen event

amit

Read only

Former Member
0 Likes
719

IF pa_to < pa_from.

MESSAGE S274(gs).

ENDIF.

use s instead of e.

regards

shiba dutta