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

want to create executable program which is having date field in selection

Former Member
0 Likes
503

Hi experts,

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

Edited by: harsha82 on Aug 7, 2010 7:53 PM

Moderator message: duplicate post locked.

Edited by: Thomas Zloch on Aug 8, 2010 8:56 AM

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
469

hello,

just a simple a select will do...

SELECT.....

....

WHERE zdate IN SO_DATERANGE " Date range on selection screen...

Thanks.

3 REPLIES 3
Read only

Former Member
0 Likes
470

hello,

just a simple a select will do...

SELECT.....

....

WHERE zdate IN SO_DATERANGE " Date range on selection screen...

Thanks.

Read only

Danish
Explorer
0 Likes
469

Hi,

if i understand your problem correctly you want the record to be selected between from_date & to_date.

take two parameters in the selection screen -

parameters fdate type ztabel-from_date.

parameters tdate type ztabel-to_date.

Now in your select statement

select *

from ztabel

into table itab

where from_date >= fdate and to_date <= tdate.

Cordially,

Danish

Read only

Former Member
0 Likes
469

Hi friends,

In ztable date range is more. like 01.01.2010 to 31.01.2010.

but screen level he will enter. ex 05.05.2010 to 02.06.2010

now it should search that records.

05.05.2010 to 02.06.2010 is between the table record 01.01.2010 to 31.01.2010.

now it should get that records.

but in ztable this date 05.05.2010 to 02.06.2010 will not be there.

regards

harsha.