<?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 query with offset based on timestamp in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-with-offset-based-on-timestamp/m-p/611323#M25217</link>
    <description>&lt;P&gt;Instead of EQ use GT (or GE)? Have you tried that?&lt;/P&gt;</description>
    <pubDate>Thu, 31 May 2018 11:34:45 GMT</pubDate>
    <dc:creator>former_member259807</dc:creator>
    <dc:date>2018-05-31T11:34:45Z</dc:date>
    <item>
      <title>Select query with offset based on timestamp</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-with-offset-based-on-timestamp/m-p/611322#M25216</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
  &lt;P&gt; In standard table the date and time field are storing in same field like&lt;/P&gt;
  &lt;P&gt;31.05.2018 16:46:40.. In my requirement i wan to delete the latest records based on time and date..Before conversion routine the value is stored in lv_date1(diff format).&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;DELETE FROM TABLE WHERE created_by EQ sy-uname and created_at eq lv_date .&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;Because of conversion routine it is throwing sy-subrc = 4, this is not deleting any records..&lt;/P&gt;
  &lt;P&gt;Pleas give me suggestion to delete records based on time(greater than time).&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 31 May 2018 11:29:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-with-offset-based-on-timestamp/m-p/611322#M25216</guid>
      <dc:creator>former_member225134</dc:creator>
      <dc:date>2018-05-31T11:29:20Z</dc:date>
    </item>
    <item>
      <title>Re: Select query with offset based on timestamp</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-with-offset-based-on-timestamp/m-p/611323#M25217</link>
      <description>&lt;P&gt;Instead of EQ use GT (or GE)? Have you tried that?&lt;/P&gt;</description>
      <pubDate>Thu, 31 May 2018 11:34:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-with-offset-based-on-timestamp/m-p/611323#M25217</guid>
      <dc:creator>former_member259807</dc:creator>
      <dc:date>2018-05-31T11:34:45Z</dc:date>
    </item>
    <item>
      <title>Re: Select query with offset based on timestamp</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-with-offset-based-on-timestamp/m-p/611324#M25218</link>
      <description>&lt;P&gt;yeah tried that ..its also not working&lt;/P&gt;</description>
      <pubDate>Thu, 31 May 2018 11:36:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-with-offset-based-on-timestamp/m-p/611324#M25218</guid>
      <dc:creator>former_member225134</dc:creator>
      <dc:date>2018-05-31T11:36:14Z</dc:date>
    </item>
    <item>
      <title>Re: Select query with offset based on timestamp</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-with-offset-based-on-timestamp/m-p/611325#M25219</link>
      <description>&lt;P&gt;Have mentioned table in ur query????&lt;/P&gt;</description>
      <pubDate>Thu, 31 May 2018 11:45:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-with-offset-based-on-timestamp/m-p/611325#M25219</guid>
      <dc:creator>former_member391501</dc:creator>
      <dc:date>2018-05-31T11:45:18Z</dc:date>
    </item>
    <item>
      <title>Re: Select query with offset based on timestamp</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-with-offset-based-on-timestamp/m-p/611326#M25220</link>
      <description>&lt;P&gt;yeah mentioned &lt;STRONG&gt;logwin/rec_inf&lt;/STRONG&gt; table (created_at field)&lt;/P&gt;</description>
      <pubDate>Thu, 31 May 2018 11:49:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-with-offset-based-on-timestamp/m-p/611326#M25220</guid>
      <dc:creator>former_member225134</dc:creator>
      <dc:date>2018-05-31T11:49:47Z</dc:date>
    </item>
    <item>
      <title>Re: Select query with offset based on timestamp</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-with-offset-based-on-timestamp/m-p/611327#M25221</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;Try to do the following:&lt;/P&gt;
  &lt;OL&gt;
   &lt;LI&gt;Get data from table into an internal table IT_TAB_DATA.&lt;/LI&gt;
   &lt;LI&gt;Loop over the records of the internal table IT_TAB_DATA one by one and process each record. &lt;/LI&gt;
   &lt;LI&gt;While processing each record split the data in the date filed using the SPLIT command using SPACE and get time in a separate variable for example lv_time . (as i see the data is like 31.05.2018 16:46:40 , so here there is a space between date and time)&lt;/LI&gt;
   &lt;LI&gt;Compare lv_time with the Time you need as the cutoff time for filtering records. &lt;/LI&gt;
   &lt;LI&gt;If the record satisfies the condition, ignore it else store in a separate internal table IT_FINAL.&lt;/LI&gt;
   &lt;LI&gt;This way you will end preparing a final internal table IT_FINAL with the list of records you want to delete.&lt;/LI&gt;
   &lt;LI&gt;Now Finally , use this statement to achieve your final result :&lt;/LI&gt;
   &lt;LI&gt;&lt;P&gt;&lt;/P&gt;DELETE &amp;lt;target&amp;gt; FROM TABLE IT_FINAL .. Here target will be your TABLE name from which you want to delete the records.&lt;/LI&gt;
  &lt;/OL&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;Thanks and Hope this helps .&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;Hemant&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 02 Jun 2018 14:44:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-with-offset-based-on-timestamp/m-p/611327#M25221</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2018-06-02T14:44:51Z</dc:date>
    </item>
  </channel>
</rss>

