‎2010 Aug 07 4:25 PM
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
‎2010 Aug 07 5:50 PM
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.
‎2010 Aug 07 5:50 PM
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.