<?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: select statement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/4685972#M1101609</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Praveen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;According to me u have done only half the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;U need to now LOOP the internal table and then move the values to an OUTPUT table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP at tablename into wa_tablename.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;move: tablename-entrydate to wa_out-entrydate,&lt;/P&gt;&lt;P&gt;         tablename-entrytime to wa_out-entrytime.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append wa_out to it_out.&lt;/P&gt;&lt;P&gt;clear wa_out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;suryakiran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 07 Nov 2008 06:41:31 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-11-07T06:41:31Z</dc:date>
    <item>
      <title>select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/4685970#M1101607</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;       Requirement, &lt;/P&gt;&lt;P&gt;       Fetch the data based on date and time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       Input parameter.&lt;/P&gt;&lt;P&gt;        Selection screen :----&lt;/P&gt;&lt;P&gt;               Select-options : Entry Date .&lt;/P&gt;&lt;P&gt;               Select-options : Entry Time.&lt;/P&gt;&lt;P&gt;       I have written code to fetch the data based on Entry Date and Entry time.&lt;/P&gt;&lt;P&gt;      &lt;/P&gt;&lt;P&gt;      Code :----&lt;/P&gt;&lt;P&gt;                 select *&lt;/P&gt;&lt;P&gt;                    from tablename&lt;/P&gt;&lt;P&gt;                    into table i_tab&lt;/P&gt;&lt;P&gt;                    where entrydate in s_enntdat and&lt;/P&gt;&lt;P&gt;                              entrytime in s_ennttim.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            this code fetches the data from date and time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But i must get the data betweeb entry date and entry time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eg:-.... when I give &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Entry Date : 22.09.2008 to 07.11.2008&lt;/P&gt;&lt;P&gt;Entry Time Low : 11:00:20 &lt;/P&gt;&lt;P&gt;Entry Time High: 06:00:00.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am getting only entries from date 22.09.2008.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My requirement is that it has to get all the datas from table between 22.09.2008 to 07.11.2008.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And documents between time 11:00:00 to 06:00:00.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That is data should start from 22.09.2008 and time 11:00:00&lt;/P&gt;&lt;P&gt;and end at 07.11.2008 and time 06:00:00.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If there are any entries between 22.09.2008 and 07.11.2008. Irrespective of time all the entries must be retrived. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how to write a single select query for this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Nov 2008 06:36:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/4685970#M1101607</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-07T06:36:29Z</dc:date>
    </item>
    <item>
      <title>Re: select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/4685971#M1101608</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi This is TIME related query ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So u need to use the TIME macros for this for example..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;after GET pernr events.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RP_READ_ALL_TIME_ITY PERNR SPACE PN-BEGDA PN-ENDDA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and after this loop on the pernr based on your requirement and fetch the data and this will solve your requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Nov 2008 06:39:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/4685971#M1101608</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-07T06:39:56Z</dc:date>
    </item>
    <item>
      <title>Re: select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/4685972#M1101609</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Praveen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;According to me u have done only half the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;U need to now LOOP the internal table and then move the values to an OUTPUT table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP at tablename into wa_tablename.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;move: tablename-entrydate to wa_out-entrydate,&lt;/P&gt;&lt;P&gt;         tablename-entrytime to wa_out-entrytime.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append wa_out to it_out.&lt;/P&gt;&lt;P&gt;clear wa_out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;suryakiran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Nov 2008 06:41:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/4685972#M1101609</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-07T06:41:31Z</dc:date>
    </item>
    <item>
      <title>Re: select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/4685973#M1101610</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;I think there is no data on 07.11.2008 between this time&lt;/P&gt;&lt;P&gt;11:00:20  &amp;amp; 06:00:00.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;that's why data is not coming out......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just try running you select statement with out time options......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it will work as your select query is fine....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Saurabh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Nov 2008 06:43:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/4685973#M1101610</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-07T06:43:10Z</dc:date>
    </item>
    <item>
      <title>Re: select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/4685974#M1101611</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi.. try this..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select *&lt;/P&gt;&lt;P&gt;from tablename&lt;/P&gt;&lt;P&gt;into table i_tab&lt;/P&gt;&lt;P&gt;where entrydate between s_enntdat and s_ennttim.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Padma.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Nov 2008 06:48:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/4685974#M1101611</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-07T06:48:31Z</dc:date>
    </item>
    <item>
      <title>Re: select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/4685975#M1101612</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 like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  YSAMPLE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables: vbak.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of itab occurs 0,&lt;/P&gt;&lt;P&gt;      vbeln type VBELN_VA,&lt;/P&gt;&lt;P&gt;      erdat type erdat,&lt;/P&gt;&lt;P&gt;      erzet type erzet,&lt;/P&gt;&lt;P&gt;      end of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN: begin of block b1 with frame title text-001.&lt;/P&gt;&lt;P&gt; select-OPTIONS: date for vbak-ERDAT,&lt;/P&gt;&lt;P&gt;                 time for vbak-ERZET.&lt;/P&gt;&lt;P&gt; SELECTION-SCREEN: end of block b1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from vbak into CORRESPONDING FIELDS OF TABLE itab where erdat in date and erzet in time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  loop at itab.&lt;/P&gt;&lt;P&gt;    write: / itab-vbeln, itab-erdat, itab-erzet.&lt;/P&gt;&lt;P&gt;    endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Srilakshmi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Nov 2008 07:02:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/4685975#M1101612</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-07T07:02:07Z</dc:date>
    </item>
    <item>
      <title>Re: select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/4685976#M1101613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Praveen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      I think that the select statement that is written is correct.Have u checked  whether data is there in the database for that particular date period and time period?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  I think there will be no data.Please check&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;P&gt;khadeer.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Nov 2008 07:05:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/4685976#M1101613</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-07T07:05:53Z</dc:date>
    </item>
  </channel>
</rss>

