<?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: to select from database table based on date range in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/to-select-from-database-table-based-on-date-range/m-p/3974429#M949287</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;problem solved got the solution&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 Jun 2008 07:41:46 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-06-17T07:41:46Z</dc:date>
    <item>
      <title>to select from database table based on date range</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/to-select-from-database-table-based-on-date-range/m-p/3974426#M949284</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi &lt;/P&gt;&lt;P&gt;i have a selection screen in which date range is being given&lt;/P&gt;&lt;P&gt;say eg 23/06/07  to 23/12/08&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;based on this date i want to select data from a ztable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;eg i want to select a field amount from table&lt;/P&gt;&lt;P&gt;and three is a field date range on the table &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for this particular field i want to select all records for amount field  and factual field falling wiithing this date range and sum it&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;eg&lt;/P&gt;&lt;P&gt;based on date range as in selcetion screen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select amount( field1)  factual ( field2) from ztable into it_ztable where date = ?....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please give me code for it  and how to sum all values as i will get from the ztable into internal table the two values as fetched from the ztable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please suggest asap&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;arora&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jun 2008 05:49:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/to-select-from-database-table-based-on-date-range/m-p/3974426#M949284</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-16T05:49:40Z</dc:date>
    </item>
    <item>
      <title>Re: to select from database table based on date range</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/to-select-from-database-table-based-on-date-range/m-p/3974427#M949285</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;You can use the ranges table for your requirement.It is similar to select -option. You have to fill low as lower date , high as high data ,option as 'EQ'  and sign as 'I'. You can write select query as &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; select sum(currency)&lt;/P&gt;&lt;P&gt;   from dtab1&lt;/P&gt;&lt;P&gt;......&lt;/P&gt;&lt;P&gt;   where  date in r_date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Veeresh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jun 2008 06:01:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/to-select-from-database-table-based-on-date-range/m-p/3974427#M949285</guid>
      <dc:creator>former_member673464</dc:creator>
      <dc:date>2008-06-16T06:01:06Z</dc:date>
    </item>
    <item>
      <title>Re: to select from database table based on date range</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/to-select-from-database-table-based-on-date-range/m-p/3974428#M949286</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 am using&lt;/P&gt;&lt;P&gt;sELECT field1 field2 FROM Ztable  INto it_matu&lt;/P&gt;&lt;P&gt;                   where DATE GE sl_dat-low     &lt;/P&gt;&lt;P&gt;                    AND  DATE LE sl_dat-high.    &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am getting data in internal table but &lt;/P&gt;&lt;P&gt;say i have twelve records now i want to sum it the both the columns into and use that sum final amount to display &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let me know how to use sume in the intrranal tabl do i need to use control statement&lt;/P&gt;&lt;P&gt;how to use the sum for two columns and take into a serperate variable to display&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;aRora&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jun 2008 06:36:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/to-select-from-database-table-based-on-date-range/m-p/3974428#M949286</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-16T06:36:29Z</dc:date>
    </item>
    <item>
      <title>Re: to select from database table based on date range</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/to-select-from-database-table-based-on-date-range/m-p/3974429#M949287</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;problem solved got the solution&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jun 2008 07:41:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/to-select-from-database-table-based-on-date-range/m-p/3974429#M949287</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-17T07:41:46Z</dc:date>
    </item>
  </channel>
</rss>

