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

Date interval check on selection-screen

Former Member
0 Likes
1,511

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
Read only

Former Member
0 Likes
1,154
AT SELECTION-SCREEN.
 
 If s_date-high is initial.
   *display error message here
 endif.
AT SELECTION-SCREEN.
 
 If s_date-high is initial.
   *display error message here
 endif.
6 REPLIES 6
Read only

Former Member
0 Likes
1,155
AT SELECTION-SCREEN.
 
 If s_date-high is initial.
   *display error message here
 endif.
Read only

LucianoBentiveg
Active Contributor
0 Likes
1,154

at selection-screen output.

IF s_date-high is initial.

message e ....

ENDIF.

Read only

Former Member
0 Likes
1,154

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

Read only

Former Member
0 Likes
1,154

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.

Read only

Former Member
0 Likes
1,154

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

Read only

Former Member
0 Likes
1,154

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