<?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 Select Staement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-staement/m-p/2732407#M634503</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In table PA0002 we are having active and future records. Can any body tell me how to fetch active and future records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;urgent.........&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Sep 2007 17:35:35 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-09-04T17:35:35Z</dc:date>
    <item>
      <title>Select Staement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-staement/m-p/2732407#M634503</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In table PA0002 we are having active and future records. Can any body tell me how to fetch active and future records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;urgent.........&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Sep 2007 17:35:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-staement/m-p/2732407#M634503</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-04T17:35:35Z</dc:date>
    </item>
    <item>
      <title>Re: Select Staement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-staement/m-p/2732408#M634504</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;Use like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * &lt;/P&gt;&lt;P&gt;FROM PA0002&lt;/P&gt;&lt;P&gt;INTO TABLE t_pa0002&lt;/P&gt;&lt;P&gt;WHERE BEGDA LE sy-datum&lt;/P&gt;&lt;P&gt;AND ENDDA GE sy-datum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Best Regards,&lt;/P&gt;&lt;P&gt;Vikas Bittera.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Sep 2007 17:40:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-staement/m-p/2732408#M634504</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-04T17:40:52Z</dc:date>
    </item>
    <item>
      <title>Re: Select Staement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-staement/m-p/2732409#M634505</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Which records you select will be determined by the dates you use for getting the information.  If you use the GET PERNR statement in your program (logical database programming), you can use this to get the latest available record:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rp-provide-from-last p0002 space w_begda w_endda.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use sy-datum for w_begda and '99991231' for w_endda if you want to get the last record available (including a future record).  Use sy-datum for both w_begda and w_endda if you want to get the record that is valid as of today. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to do a direct table select, use this to get all records valid from today going forward:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM PA0002 INTO wa_0002 &lt;/P&gt;&lt;P&gt;WHERE begda &amp;gt;= sy-datum AND endda &amp;gt;= sy-datum.&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;put code here for manipulating the records&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;ENDSELECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or to just get the last record, whether it is from today or the future, use this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT SINGLE * FROM PA0002 INTO wa_0002 WHERE endda = '99991231'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps.&lt;/P&gt;&lt;P&gt; - April King&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Sep 2007 19:25:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-staement/m-p/2732409#M634505</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-04T19:25:53Z</dc:date>
    </item>
  </channel>
</rss>

