Skip to Content
0
Former Member
Dec 08, 2008 at 05:02 AM

Records from table SWWWIHEAD

80 Views

Hi All,

My Requirement is:--

I need to take workitem from table SWWWIHEAD using date and time range.

Suppose user has given 20 Hours on selection screen and now the system time is 7 AM of

8th December.

Here I need to take the workitems created within last 20 Hours.

So 20 hours back means, 11 AM of 7th December.

Previous Date like 7th December, I can calculate, but how to take Workitems

in the period:-- 11 AM of 7 Dec to 7 AM of 8 December.

because 7 am - 20 hours = 11 am of previous day

If user give 24 houus on selection screen,

then 7 am - 24 hours = 7 am of previous day

Now if I write select query like below, I did not get any record,

SELECT * FROM swwwihead INTO TABLE int_swwwihead_n

WHERE wi_type = 'W' AND

wi_rh_task IN r_task AND

wi_cd >= wf_date_low_n AND

wi_cd <= wf_date_hi_n AND

wi_ct >= wf_time_low_n AND

wi_ct <= wf_time_hi_n AND

wi_stat IN r_status

So pls guide me how to take relevant records based on both date & time.

Rishi