<?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 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/2656013#M612447</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gurus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a condition where I need to subtract n days from the current date and then I need to collect billing document from vbrp where the prsdt equals to the date we calculated&lt;/P&gt;&lt;P&gt;For this I ahve written the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      v_date = syst-datum - v_n (n no. of days).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    select vbeln  into table it_vbrp&lt;/P&gt;&lt;P&gt;      from vbrp&lt;/P&gt;&lt;P&gt;      for all entries in it_header&lt;/P&gt;&lt;P&gt;	where prsdt = v_date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just want to make sure whether this code will work for me or not and if not then please tell me right one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Rajeev Gupta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Aug 2007 18:27:20 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-08-21T18:27:20Z</dc:date>
    <item>
      <title>Select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/2656013#M612447</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gurus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a condition where I need to subtract n days from the current date and then I need to collect billing document from vbrp where the prsdt equals to the date we calculated&lt;/P&gt;&lt;P&gt;For this I ahve written the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      v_date = syst-datum - v_n (n no. of days).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    select vbeln  into table it_vbrp&lt;/P&gt;&lt;P&gt;      from vbrp&lt;/P&gt;&lt;P&gt;      for all entries in it_header&lt;/P&gt;&lt;P&gt;	where prsdt = v_date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just want to make sure whether this code will work for me or not and if not then please tell me right one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Rajeev Gupta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Aug 2007 18:27:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/2656013#M612447</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-21T18:27:20Z</dc:date>
    </item>
    <item>
      <title>Re: Select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/2656014#M612448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This code is fine just check it_header[] is not initial before passing it to this select.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rewards all helpful replies.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Aug 2007 18:33:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/2656014#M612448</guid>
      <dc:creator>amit_khare</dc:creator>
      <dc:date>2007-08-21T18:33:10Z</dc:date>
    </item>
    <item>
      <title>Re: Select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/2656015#M612449</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Looks like below logic should work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;try to keep sy-datum instead of syst-datum.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v_date = sy-datum - v_n (n no. of days).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select vbeln into table it_vbrp&lt;/P&gt;&lt;P&gt;from vbrp&lt;/P&gt;&lt;P&gt;for all entries in it_header&lt;/P&gt;&lt;P&gt;where prsdt = v_date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Seshu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Aug 2007 18:33:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/2656015#M612449</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-21T18:33:59Z</dc:date>
    </item>
    <item>
      <title>Re: Select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/2656016#M612450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes it will work&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Aug 2007 18:38:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/2656016#M612450</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-21T18:38:17Z</dc:date>
    </item>
    <item>
      <title>Re: Select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/2656017#M612451</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;Make sure your it_header is not initiall.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if Not it_header is initial..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Venkat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Aug 2007 18:42:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/2656017#M612451</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-21T18:42:08Z</dc:date>
    </item>
    <item>
      <title>Re: Select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/2656018#M612452</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It will give you a syntax error unless you use at least one field of the internal table it_header in your WHERE clause. Other than that it looks ok.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Aug 2007 19:14:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/2656018#M612452</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-21T19:14:44Z</dc:date>
    </item>
    <item>
      <title>Re: Select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/2656019#M612453</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;why are u using 'for all entries' when no field from it_header&lt;/P&gt;&lt;P&gt; is used in where condition. Remove for all entries.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Example to use for all entries:&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;if it_header[] is not intial.&lt;/P&gt;&lt;P&gt;select vbeln into table it_vbrp&lt;/P&gt;&lt;P&gt;from vbrp&lt;/P&gt;&lt;P&gt;for all entries in it_header&lt;/P&gt;&lt;P&gt;where abc eq it_header-xyz and   "(abc and xyz are used for example)&lt;/P&gt;&lt;P&gt;         prsdt eq v_date.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Aug 2007 20:17:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/2656019#M612453</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-21T20:17:56Z</dc:date>
    </item>
  </channel>
</rss>

