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

Doubt on Dates

Former Member
0 Likes
407

Hi exports,

I want to create executable program which is having date field in selection screen. date is select-options field.

now my problem is i want to select the data from ztable.

the table contains many filed in that one field is from_date and another is to_date.

ex: from date: 01.01.2010 to date: 31.12.2010.

but in selection screen user will enter like:

ex: from date: 05.05.2010 ; to 31.05.2010.

now i want to search the user enter date range is between the ztable from and to dates.

in example above it is following in that range.

i want to select that record.

so how can i write select statement for this.

plz help me.

Harsha

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
379

hi harsha

compare from_date with sdate-low

and to_date with sdate_high

like

select * lab lab ....where from_date GE sdate-low and to_date LE sdate-high.

but before using this check if we can compare date fields directly.

else.

If it is not possible at select statement level we can do that in internal table level very easily.

1 REPLY 1
Read only

Former Member
0 Likes
380

hi harsha

compare from_date with sdate-low

and to_date with sdate_high

like

select * lab lab ....where from_date GE sdate-low and to_date LE sdate-high.

but before using this check if we can compare date fields directly.

else.

If it is not possible at select statement level we can do that in internal table level very easily.