Hi ,
I need to select the documents created between 21/12/2022 22:00 and on 22/12/2022(system date)
09:00
The existing query is
Select vbeln in s_vbeln
And fkart IN s_fkart
AND vkorg IN s_vkorg
AND erdat GE p_date
AND erzet GE p_time
AND erzet LE p_time2
p_time will contain 22:00(last execution time)
p_time 2 will contain 09:00(current execution time)
p_date contain 21/12/2022(execution date)
But it should fetch documents both in 21 and 22 dates
My thought was that
We have to split the select in 2 parts
As a result date of system = p_date
We can keep the select query as above
Else system date is greater than p_date
--------->>>>>First Select the records
vbeln in s_vbeln
And fkart IN s_fkar
AND vkorg IN s_vko
AND erdat = p_date
AND erzet GE p_time
-------->>>>The second select where
vbeln in s_vbeln
And fkart IN s_fkar
AND vkorg IN s_vko
AND erdat = system date
AND erzet LE p_time2
Pls let me know as my analysis is correct or not