<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Date Selection Error in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-selection-error/m-p/6650935#M1444968</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;

if date-high = space.

          date-sign = 'I'.
          date-option = 'BT'.
          date-low  = date-low.
          date-high = date-high.

          append date.
          clear  date.
        else.
          date-sign = 'I'.
          date-option = 'EQ'.
          date-low = date-low.
          append date.
          clear  date.
        endif.


if time-high = space.

          time-sign = 'I'.
          time-option = 'BT'.
          time-low  = time-low.
          time-high = time-high.

          append time.
          clear  time.
        else.
          time-sign = 'I'.
          time-option = 'EQ'.
          time-low = time-low.
          append time.
          clear  time.
        endif.




select * from ztable where date &amp;gt;= date-low and
                                            date &amp;lt;= date-high and
                                            time &amp;gt;= time-low and
                                            time &amp;lt;= time-high.


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Krupaji on Feb 27, 2010 6:14 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 27 Feb 2010 05:00:09 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-02-27T05:00:09Z</dc:date>
    <item>
      <title>Date Selection Error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-selection-error/m-p/6650927#M1444960</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have 4 parameters for date_low date_high time_low time_high. When there is values in these parameters everything works fine but when there are no values I get a sy-subrc 4 saying that there are no values for the select statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;select * from ztable where date &amp;gt;= date_low and
                                            date &amp;lt;= date_high and
                                            time &amp;gt;= time_low and
                                            time &amp;lt;= time_high.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Requirement is to use parameters instead of select-options. Everything works fine when there is values but when the parameters are blank it doesnt select any values. Please help me out.&amp;gt; Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Vicky Vicky on Feb 27, 2010 12:45 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Feb 2010 23:44:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-selection-error/m-p/6650927#M1444960</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-26T23:44:49Z</dc:date>
    </item>
    <item>
      <title>Re: Date Selection Error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-selection-error/m-p/6650928#M1444961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use OR condition...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Feb 2010 23:53:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-selection-error/m-p/6650928#M1444961</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-26T23:53:05Z</dc:date>
    </item>
    <item>
      <title>Re: Date Selection Error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-selection-error/m-p/6650929#M1444962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Subas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OR condition didnt help for me. Can you give an example. Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 Feb 2010 00:01:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-selection-error/m-p/6650929#M1444962</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-27T00:01:43Z</dc:date>
    </item>
    <item>
      <title>Re: Date Selection Error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-selection-error/m-p/6650930#M1444963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from ztable where date &amp;gt;= date_low OR&lt;/P&gt;&lt;P&gt;                                            date &amp;lt;= date_high OR&lt;/P&gt;&lt;P&gt;                                            time &amp;gt;= time_low OR&lt;/P&gt;&lt;P&gt;                                            time &amp;lt;= time_high.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if it not useful....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 Feb 2010 00:06:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-selection-error/m-p/6650930#M1444963</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-27T00:06:13Z</dc:date>
    </item>
    <item>
      <title>Re: Date Selection Error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-selection-error/m-p/6650931#M1444964</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No Subas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried this. This doesnt help because it selects all the values no matter u put in the parameters.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 Feb 2010 00:07:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-selection-error/m-p/6650931#M1444964</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-27T00:07:29Z</dc:date>
    </item>
    <item>
      <title>Re: Date Selection Error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-selection-error/m-p/6650932#M1444965</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try the below code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from ztable where date &amp;gt;= date_low OR&lt;/P&gt;&lt;P&gt;date &amp;lt;= date_high OR&lt;/P&gt;&lt;P&gt;time &amp;gt;= time_low OR&lt;/P&gt;&lt;P&gt;time &amp;lt;= time_high.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: it_tab type table of ztable with header line.&lt;/P&gt;&lt;P&gt;DATA: date type sy-datum,&lt;/P&gt;&lt;P&gt;      time type sy-uzeit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ranges: r_date for sy-datum,&lt;/P&gt;&lt;P&gt;        r_time for syst-uzeit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if date cn '00000000'.&lt;/P&gt;&lt;P&gt;r_date-sign = 'I'.&lt;/P&gt;&lt;P&gt;r_date-option = 'LE'.&lt;/P&gt;&lt;P&gt;r_date-low = date-low.&lt;/P&gt;&lt;P&gt;r_date-high = date-high.&lt;/P&gt;&lt;P&gt;append r_date.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;if time cn '000000'.&lt;/P&gt;&lt;P&gt;  r_time-sign = 'I'.&lt;/P&gt;&lt;P&gt;  r_time-option = 'LE'.&lt;/P&gt;&lt;P&gt;  r_time-low = time-low.&lt;/P&gt;&lt;P&gt; r_time-high = time-high.&lt;/P&gt;&lt;P&gt;  append r_time.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from ztable where date in and time in r_time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: subas  Bose on Feb 27, 2010 1:35 AM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: subas  Bose on Feb 27, 2010 1:38 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 Feb 2010 00:35:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-selection-error/m-p/6650932#M1444965</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-27T00:35:14Z</dc:date>
    </item>
    <item>
      <title>Re: Date Selection Error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-selection-error/m-p/6650933#M1444966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can anyone help me with this please. Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 Feb 2010 00:50:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-selection-error/m-p/6650933#M1444966</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-27T00:50:17Z</dc:date>
    </item>
    <item>
      <title>Re: Date Selection Error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-selection-error/m-p/6650934#M1444967</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Vicky,&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Requirement is to use parameters instead of select-options&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;CODE&gt;DATA : R_DATE TYPE RANGE OF SY-DATUM, " Take Suitable one
                       R_TIME TYPE RANGE OF SY-UZEIT,
                       WA_DATE LIKE LINE OF R_DATE,
                      WA_TIME LIKE LINE OF R_TIME.
refresh r_date.
clear wa_date.
wa_date-sign = 'I'.
wa_date-option = 'EQ'. " You can change this to BT
wa_date-low = date-low.
wa_date-high = date-high.
append wa_date to r_date.

refresh r_time.
clear wa_time.
wa_time-sign = 'I'.
wa_time-option = 'EQ'. " You can change this BT
wa_time-low = date-low.
wa_time-high = date-high.
append wa_time to r_time.


select * from ztable where date in r_date  " This is equivalent to Select Options
             and    time in r_time.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;" OR Check this one
if not date-low is initial and not date-high is initial.
select * from ztable where date between date_low and date_high
       and time between time_low and time_high.
endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CHeers&lt;/P&gt;&lt;P&gt;Ram&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Ramchander Krishnamraju on Feb 27, 2010 3:50 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 Feb 2010 02:50:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-selection-error/m-p/6650934#M1444967</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-27T02:50:05Z</dc:date>
    </item>
    <item>
      <title>Re: Date Selection Error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-selection-error/m-p/6650935#M1444968</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;

if date-high = space.

          date-sign = 'I'.
          date-option = 'BT'.
          date-low  = date-low.
          date-high = date-high.

          append date.
          clear  date.
        else.
          date-sign = 'I'.
          date-option = 'EQ'.
          date-low = date-low.
          append date.
          clear  date.
        endif.


if time-high = space.

          time-sign = 'I'.
          time-option = 'BT'.
          time-low  = time-low.
          time-high = time-high.

          append time.
          clear  time.
        else.
          time-sign = 'I'.
          time-option = 'EQ'.
          time-low = time-low.
          append time.
          clear  time.
        endif.




select * from ztable where date &amp;gt;= date-low and
                                            date &amp;lt;= date-high and
                                            time &amp;gt;= time-low and
                                            time &amp;lt;= time-high.


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Krupaji on Feb 27, 2010 6:14 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 Feb 2010 05:00:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-selection-error/m-p/6650935#M1444968</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-27T05:00:09Z</dc:date>
    </item>
    <item>
      <title>Re: Date Selection Error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-selection-error/m-p/6650936#M1444969</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;dear vicky,&lt;/P&gt;&lt;P&gt;1) use select-options like parameters means select-options no extension no interval.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2)other wise make all parameter fields are all mandatory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;srinivas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 Feb 2010 08:41:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-selection-error/m-p/6650936#M1444969</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-27T08:41:31Z</dc:date>
    </item>
  </channel>
</rss>

