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

Date interval check on selection-screen

Former Member
0 Kudos
467

Hello, How can I check on the selection-screen if the s_date (high part) is filled out or not? s_date is an interval. If the high field is not filled, the program don't allowed to run. So I have to check it is a single date or an interval.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
110
AT SELECTION-SCREEN.
 
 If s_date-high is initial.
   *display error message here
 endif.
6 REPLIES 6

Former Member
0 Kudos
111
AT SELECTION-SCREEN.
 
 If s_date-high is initial.
   *display error message here
 endif.

LucianoBentiveg
Active Contributor
0 Kudos
110

at selection-screen output.

IF s_date-high is initial.

message e ....

ENDIF.

Former Member
0 Kudos
110

hi Jacob,

Check wheter it is filled or not this way ..

at selection-screen.

if s_field-high is initial.

  message e100 ' Do Not Proceed.'.

endif. 

Regards,

Santosh

Former Member
0 Kudos
110

Hi jakob,

if the date fiels is specified as no-extension then.

If s_date-high is initial.

*display error message here

endif.

if it is with extension then...

loop s_date.

if not s_data-high is initial.

lv_high = s_date-high.

exit.

endif.

endloop.

if lv_high is initial.

*display error message here

endif.

Regards,

Satya.

Former Member
0 Kudos
110

For completeness sake, you will have to loop through the select-option and validate each row.

You can also use FM SELECT_OPTIONS_RESTRICT.

Rob

Message was edited by:

Rob Burbank

Former Member
0 Kudos
110

if u r referring to a field of date in select options just dont ignore the case that if u r not entering any field in the high interval its value will be '00000000'.

u need to check this .

execute the code .


select-options : s_date for sy-datum.
initialization.
at selection-screen .

if s_date-high eq '00000000'.

message e999(zd) with 'Cannot Run'.

endif.

regards,

vijay