<?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 BKPF based on time in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-bkpf-based-on-time/m-p/5030072#M1170111</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can combine both conditions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;...
AND ( cpudt EQ p_cpudt AND cputm GE '070000' ) OR
( cpudt EQ l_cpudt1 AND cputm LE '065959' ).&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 12 Jan 2009 10:48:39 GMT</pubDate>
    <dc:creator>JozsefSzikszai</dc:creator>
    <dc:date>2009-01-12T10:48:39Z</dc:date>
    <item>
      <title>Select BKPF based on time</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-bkpf-based-on-time/m-p/5030071#M1170110</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 need to select from BKPF from 7am of the entry date on selection screen(p_cpudt) to 7am of the following day. I'm using the code below; select both days and then two delete statements but is there anyway of making it more efficient and doing it in one select? Because the select spans two days i cant just say time greater than 7am one day and less than 7am the next?&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;DATA: l_cpudt1 TYPE cpudt.&lt;/P&gt;&lt;P&gt;  l_cpudt1 = p_cpudt + 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT * INTO TABLE lt_bkpf&lt;/P&gt;&lt;P&gt;  FROM bkpf&lt;/P&gt;&lt;P&gt;  WHERE bukrs IN s_bukrs&lt;/P&gt;&lt;P&gt;  AND blart IN s_blart&lt;/P&gt;&lt;P&gt;  AND cpudt GE p_cpudt&lt;/P&gt;&lt;P&gt;  AND cpudt LE l_cpudt1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DELETE lt_bkpf&lt;/P&gt;&lt;P&gt;  WHERE cpudt = l_cpudt1&lt;/P&gt;&lt;P&gt;  AND cputm GT '07:00:00'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DELETE lt_bkpf&lt;/P&gt;&lt;P&gt;  WHERE cpudt = p_cpudt&lt;/P&gt;&lt;P&gt;  AND cputm LT '07:00:00'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Jan 2009 10:43:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-bkpf-based-on-time/m-p/5030071#M1170110</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-12T10:43:14Z</dc:date>
    </item>
    <item>
      <title>Re: Select BKPF based on time</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-bkpf-based-on-time/m-p/5030072#M1170111</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can combine both conditions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;...
AND ( cpudt EQ p_cpudt AND cputm GE '070000' ) OR
( cpudt EQ l_cpudt1 AND cputm LE '065959' ).&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Jan 2009 10:48:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-bkpf-based-on-time/m-p/5030072#M1170111</guid>
      <dc:creator>JozsefSzikszai</dc:creator>
      <dc:date>2009-01-12T10:48:39Z</dc:date>
    </item>
    <item>
      <title>Re: Select BKPF based on time</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-bkpf-based-on-time/m-p/5030073#M1170112</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Try to use ranges. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. append the range for date with the yesterday's date in the range low field and todays date in the range's high field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. For time append the time in a range as 07:00:00 and give the options as 'GE'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now you will have all the documents created from 7 am yesterday and documents created today.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above can be done i one select statemet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here you will have to add one additional delete just to delete the documents that were created today after 7 am.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Advait&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&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;Advait&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Jan 2009 10:53:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-bkpf-based-on-time/m-p/5030073#M1170112</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-12T10:53:06Z</dc:date>
    </item>
    <item>
      <title>Re: Select BKPF based on time</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-bkpf-based-on-time/m-p/5030074#M1170113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dave,&lt;/P&gt;&lt;P&gt;Try with the below statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * INTO TABLE lt_bkpf&lt;/P&gt;&lt;P&gt;FROM bkpf&lt;/P&gt;&lt;P&gt;WHERE bukrs IN s_bukrs&lt;/P&gt;&lt;P&gt;AND blart IN s_blart&lt;/P&gt;&lt;P&gt; AND ( ( cpudt EQ p_cpudt  AND     erzet GT u2018070000u2019 )&lt;/P&gt;&lt;P&gt;    OR   ( erdat EQ sy-datum  AND     erzet LE '065959') ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This select statement will solve your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Phani.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Jan 2009 10:59:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-bkpf-based-on-time/m-p/5030074#M1170113</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-12T10:59:11Z</dc:date>
    </item>
    <item>
      <title>Re: Select BKPF based on time</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-bkpf-based-on-time/m-p/5030075#M1170114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eric,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That worked thanks....i had tried that before but i was entering time as '07:00:00' insted of '070000' so that probably caused the problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Jan 2009 11:38:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-bkpf-based-on-time/m-p/5030075#M1170114</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-12T11:38:29Z</dc:date>
    </item>
  </channel>
</rss>

