‎2008 Oct 10 4:36 PM
1). DO i need to use
AT SELECTIon-screen.
or
START-OF-SELECTION.
for my select-option validation ?
2). Can I validate my select option ?
IF NOT S_option1 IS INITIAL
PERFORM read_local_file.
ELSE.
MESSAGE i038(zs) WITH ' please enter value in select option1'.
EXIT.
ENDIF.
IF NOT S_option2 IS INITIAL
PERFORM read_local_file.
ELSE.
MESSAGE i038(zs) WITH ' please enter value in select option2'.
EXIT.
ENDIF.
‎2008 Oct 10 4:57 PM
If you want the validation to happen when the user hits ENTER, then you would put that validation logic in the AT SELECTION-SCREEN event, which is the most common way. If, however, you only wanted to validate when the user hits F8 or the "Execute" icon, then you would put this in the begingin of the START-OF-SELECTION event.
And yes, you can validate like that, but make sure that you are pointing to the body of the select-option internal table by using the [].
IF NOT S_option1[] IS INITIAL
PERFORM read_local_file.
ELSE.
MESSAGE i038(zs) WITH ' please enter value in select option1'.
EXIT.
ENDIF.
IF NOT S_option2[] IS INITIAL
PERFORM read_local_file.
ELSE.
MESSAGE i038(zs) WITH ' please enter value in select option2'.
EXIT.
ENDIF.Regards,
Rich Heilman
‎2008 Oct 10 4:55 PM
Hi,
You need to you AT SELECTION-SCREEN for any selection screen validation.
Yes you can validate the selection option under this event with your code.
Thanks,
Senthil
‎2008 Oct 10 4:57 PM
If you want the validation to happen when the user hits ENTER, then you would put that validation logic in the AT SELECTION-SCREEN event, which is the most common way. If, however, you only wanted to validate when the user hits F8 or the "Execute" icon, then you would put this in the begingin of the START-OF-SELECTION event.
And yes, you can validate like that, but make sure that you are pointing to the body of the select-option internal table by using the [].
IF NOT S_option1[] IS INITIAL
PERFORM read_local_file.
ELSE.
MESSAGE i038(zs) WITH ' please enter value in select option1'.
EXIT.
ENDIF.
IF NOT S_option2[] IS INITIAL
PERFORM read_local_file.
ELSE.
MESSAGE i038(zs) WITH ' please enter value in select option2'.
EXIT.
ENDIF.Regards,
Rich Heilman
‎2008 Oct 10 5:04 PM