<?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: sorting data for required days in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-data-for-required-days/m-p/9311567#M1727309</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 Ranges to fetch data from one date to another date. You can also use select options. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eg. &lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;ranges &lt;SPAN class="L0S55"&gt;: &lt;/SPAN&gt;r_date &lt;SPAN class="L0S52"&gt;for &lt;/SPAN&gt;mkpf&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;budat&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;&lt;SPAN class="L0S52"&gt;Posting date = todays date.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;r_date-low = Posting date - 30&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;r_date-high = Posting date.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;r_date-sign = 'I'&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;r_date-option = 'BT'&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;select * from STPO into table itab where ANDAT in R_DATE.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;Hope this helps.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;Thanks,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;Tooshar Bendale&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Mar 2013 08:01:49 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2013-03-06T08:01:49Z</dc:date>
    <item>
      <title>sorting data for required days</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-data-for-required-days/m-p/9311565#M1727307</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 need to get data of required field(say, STPO-MENGE) for first 30days from posting date.&lt;/P&gt;&lt;P&gt;i have got the posting date from MKPF-budat.i have joined both the tables with a common table field.&lt;/P&gt;&lt;P&gt;what my requirement is to get first 30days data of MENGE in output.&lt;/P&gt;&lt;P&gt;could any one plz provide me a sample coding.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Mar 2013 05:53:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-data-for-required-days/m-p/9311565#M1727307</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-03-06T05:53:50Z</dc:date>
    </item>
    <item>
      <title>Re: sorting data for required days</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-data-for-required-days/m-p/9311566#M1727308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Srikanth ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;see the sample code for your help , &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L1S52"&gt;PARAMETERS : p_date &lt;SPAN class="L1S52"&gt;TYPE&lt;/SPAN&gt; mkpf-budat.&lt;BR /&gt; &lt;BR /&gt; &lt;SPAN class="L1S52"&gt;DATA&lt;/SPAN&gt; : it_mkpf &lt;SPAN class="L1S52"&gt;TYPE&lt;/SPAN&gt; &lt;SPAN class="L1S52"&gt;STANDARD&lt;/SPAN&gt; &lt;SPAN class="L1S52"&gt;TABLE&lt;/SPAN&gt; &lt;SPAN class="L1S52"&gt;OF&lt;/SPAN&gt; mkpf.&lt;BR /&gt; &lt;BR /&gt; &lt;SPAN class="L1S52"&gt;data&lt;/SPAN&gt; : l_date &lt;SPAN class="L1S52"&gt;TYPE&lt;/SPAN&gt; mkpf-budat.&lt;BR /&gt; &lt;BR /&gt; l_date = p_date + &lt;SPAN class="L1S32"&gt;30&lt;/SPAN&gt;.&lt;BR /&gt; &lt;BR /&gt; &lt;SPAN class="L1S52"&gt;select&lt;/SPAN&gt; * &lt;SPAN class="L1S52"&gt;FROM&lt;/SPAN&gt; mkpf &lt;SPAN class="L1S52"&gt;INTO&lt;/SPAN&gt; &lt;SPAN class="L1S52"&gt;TABLE&lt;/SPAN&gt; it_mkpf &lt;SPAN class="L1S52"&gt;WHERE&lt;/SPAN&gt; budat &lt;SPAN class="L1S52"&gt;BETWEEN&lt;/SPAN&gt; p_date &lt;SPAN class="L1S52"&gt;and&lt;/SPAN&gt; l_date.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L1S52"&gt;Regards ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L1S52"&gt;Yogendra Bhaskar&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Mar 2013 06:44:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-data-for-required-days/m-p/9311566#M1727308</guid>
      <dc:creator>yogendra_bhaskar</dc:creator>
      <dc:date>2013-03-06T06:44:34Z</dc:date>
    </item>
    <item>
      <title>Re: sorting data for required days</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-data-for-required-days/m-p/9311567#M1727309</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 Ranges to fetch data from one date to another date. You can also use select options. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eg. &lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;ranges &lt;SPAN class="L0S55"&gt;: &lt;/SPAN&gt;r_date &lt;SPAN class="L0S52"&gt;for &lt;/SPAN&gt;mkpf&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;budat&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;&lt;SPAN class="L0S52"&gt;Posting date = todays date.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;r_date-low = Posting date - 30&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;r_date-high = Posting date.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;r_date-sign = 'I'&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;r_date-option = 'BT'&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;select * from STPO into table itab where ANDAT in R_DATE.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;Hope this helps.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;Thanks,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;Tooshar Bendale&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Mar 2013 08:01:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-data-for-required-days/m-p/9311567#M1727309</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-03-06T08:01:49Z</dc:date>
    </item>
    <item>
      <title>Re: sorting data for required days</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-data-for-required-days/m-p/9311568#M1727310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use function module RP_CALC_DATE_IN_INTERVAL to get the interval and then use between along with your select statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Call FUNCTION 'RP_CALC_DATE_IN_INTERVAL'&lt;/P&gt;&lt;P&gt;Exporting&lt;/P&gt;&lt;P&gt;date =&amp;nbsp; mkpf-budat&lt;/P&gt;&lt;P&gt;days = '30'&lt;/P&gt;&lt;P&gt;months = '0'&lt;/P&gt;&lt;P&gt;signnum = '-' "+&lt;/P&gt;&lt;P&gt;years = '0'.&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;calc_date = lv_30days&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;***Where budat between mkpf-budat and lv_30days.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess, this can help you to resolve your issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;SaiRam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Mar 2013 08:54:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-data-for-required-days/m-p/9311568#M1727310</guid>
      <dc:creator>former_member196280</dc:creator>
      <dc:date>2013-03-06T08:54:33Z</dc:date>
    </item>
  </channel>
</rss>

