<?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 on VBRK in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-on-vbrk/m-p/4113587#M983496</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One solution if this query is used frequently&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Index on MANDT, FKDAT, VBTYP and FKSTO&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and change in the query to &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

SELECT * INTO TABLE IT_VBRK FROM VBRK
WHERE ( FKDAT &amp;gt;= FIRST_DATE AND FKDAT &amp;lt;= LAST_DATE )
and VBTYP = 'M' AND FKSTO = ' '.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 08 Jul 2008 10:34:23 GMT</pubDate>
    <dc:creator>former_member195698</dc:creator>
    <dc:date>2008-07-08T10:34:23Z</dc:date>
    <item>
      <title>Select on VBRK</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-on-vbrk/m-p/4113586#M983495</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Xperts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; very simple, following query takes long time.......pls suggest alternative.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * INTO TABLE IT_VBRK FROM VBRK&lt;/P&gt;&lt;P&gt;     WHERE  ( FKDAT &amp;gt;= FIRST_DATE AND FKDAT &amp;lt;= LAST_DATE )&lt;/P&gt;&lt;P&gt;          and VBTYP = 'M' AND FKSTO &amp;lt;&amp;gt; 'X'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jul 2008 10:28:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-on-vbrk/m-p/4113586#M983495</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-08T10:28:44Z</dc:date>
    </item>
    <item>
      <title>Re: Select on VBRK</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-on-vbrk/m-p/4113587#M983496</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One solution if this query is used frequently&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Index on MANDT, FKDAT, VBTYP and FKSTO&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and change in the query to &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

SELECT * INTO TABLE IT_VBRK FROM VBRK
WHERE ( FKDAT &amp;gt;= FIRST_DATE AND FKDAT &amp;lt;= LAST_DATE )
and VBTYP = 'M' AND FKSTO = ' '.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jul 2008 10:34:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-on-vbrk/m-p/4113587#M983496</guid>
      <dc:creator>former_member195698</dc:creator>
      <dc:date>2008-07-08T10:34:23Z</dc:date>
    </item>
    <item>
      <title>Re: Select on VBRK</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-on-vbrk/m-p/4113588#M983497</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;do this way ..&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
ranges r_fkdat for vbrk-fkdat.

initialization.
r_fkdat-low = FIRST_DATE .
r_fkdat-high = LAST_DATE .
r_fkdat-option = 'BT'.
r_fkdat-sign = 'I'.
append r_fkdat.

 

SELECT * INTO TABLE IT_VBRK FROM VBRK
WHERE fkdat in r_fkdat
and VBTYP = 'M' AND FKSTO &amp;lt;&amp;gt; 'X'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jul 2008 10:35:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-on-vbrk/m-p/4113588#M983497</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-08T10:35:15Z</dc:date>
    </item>
    <item>
      <title>Re: Select on VBRK</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-on-vbrk/m-p/4113589#M983498</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chetan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Don't use  Select * ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead bring the data for the fields that you want.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jul 2008 10:36:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-on-vbrk/m-p/4113589#M983498</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-08T10:36:48Z</dc:date>
    </item>
    <item>
      <title>Re: Select on VBRK</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-on-vbrk/m-p/4113590#M983499</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;~You are not using any Index in your select. this is one main reason. If required u can add one.&lt;/P&gt;&lt;P&gt;~wat is the volume of data for the slect given above..&lt;/P&gt;&lt;P&gt;~wat will be the volume of data expected if you remove the condition &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;fksto &amp;lt;&amp;gt; 'X'&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; from the WHERE condition.&lt;/P&gt;&lt;P&gt;By removing the &amp;lt;&amp;gt; condition, if you see not-a-significant change then remove it. &lt;/P&gt;&lt;P&gt;~ Any possibilty to add more(relelvant) fields to the WHERE clause??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;madhu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jul 2008 10:39:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-on-vbrk/m-p/4113590#M983499</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-08T10:39:59Z</dc:date>
    </item>
    <item>
      <title>Re: Select on VBRK</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-on-vbrk/m-p/4113591#M983500</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The ideia of creating a range to fkdat looks fine and use fksto EQ space (instead of NE 'X') looks fine too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, you may need to create an index if that program will be used too often. But you do so, create with minimum necessary fields. Like MANDT-FKDAT is enough.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;Valter Olieira.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jul 2008 10:45:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-on-vbrk/m-p/4113591#M983500</guid>
      <dc:creator>valter_oliveira</dc:creator>
      <dc:date>2008-07-08T10:45:28Z</dc:date>
    </item>
    <item>
      <title>Re: Select on VBRK</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-on-vbrk/m-p/4113592#M983501</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi joshi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   In general if you want to reduce the time for your query and you dont require all the field in the table than try not to use SELECT * instead specfic the fields that is required .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Pritam.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Pritam Ghosh on Jul 8, 2008 1:14 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jul 2008 11:13:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-on-vbrk/m-p/4113592#M983501</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-08T11:13:53Z</dc:date>
    </item>
    <item>
      <title>Re: Select on VBRK</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-on-vbrk/m-p/4113593#M983502</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;Best on is dont mention select * better to mention required fields instead of select *. &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;&lt;/P&gt;&lt;P&gt;sriram.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jul 2008 01:49:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-on-vbrk/m-p/4113593#M983502</guid>
      <dc:creator>venkatasriram_mygapula</dc:creator>
      <dc:date>2008-07-09T01:49:28Z</dc:date>
    </item>
    <item>
      <title>Re: Select on VBRK</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-on-vbrk/m-p/4113594#M983503</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Heartly thanks to everybody for their contribution in soultioning.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried with everything you all have suggested............sorry to say but nothing works.&lt;/P&gt;&lt;P&gt;This single query takes over all 80-90% of processing time of whole program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It fetches around 12299 entries from VBRK table. &lt;/P&gt;&lt;P&gt;Hence, I am planning to write another program which fetch data and keep in dataset. My actual (main ) program will get data from dataset and do further processing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; How's this alternative, is it recommended.............???&lt;/P&gt;&lt;P&gt; Pls suggest.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Chetan Joshi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jul 2008 04:27:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-on-vbrk/m-p/4113594#M983503</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-09T04:27:12Z</dc:date>
    </item>
    <item>
      <title>Re: Select on VBRK</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-on-vbrk/m-p/4113595#M983504</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As I said in previous post, all the advices about ranges, replace NE 'X' and avoid Select * where ok, but in your case looked like you should need an index. Did you create the index MANDT-FKDAT? And after that did you run optimizer statistics? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my opinion that alternative is not good, because that program that fetches data won't be able to have your table with the data always up to date ... so, try the index, and avoid select * and NE 'X' ... all together.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;Valter Oliveira.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jul 2008 09:15:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-on-vbrk/m-p/4113595#M983504</guid>
      <dc:creator>valter_oliveira</dc:creator>
      <dc:date>2008-07-09T09:15:03Z</dc:date>
    </item>
    <item>
      <title>Re: Select on VBRK</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-on-vbrk/m-p/4113596#M983505</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks to everybody for contribution.&lt;/P&gt;&lt;P&gt;But Surprisingly none were improved performance of select query. I have tried with everything.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Finally, I am going with the last option which I have described in my reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dear Valter&lt;/P&gt;&lt;P&gt;since this VBRK data is belongs only previous year of current year, there is not fear of not having latest updates of DB tables....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Thanks Again.....&lt;/P&gt;&lt;P&gt;Chetan Joshi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jul 2008 06:50:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-on-vbrk/m-p/4113596#M983505</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-10T06:50:38Z</dc:date>
    </item>
    <item>
      <title>Re: Select on VBRK</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-on-vbrk/m-p/4113597#M983506</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Chetan - &lt;EM&gt;depending on your functional requirement&lt;/EM&gt; maybe investigate a Select using period POPER or year GJAHR. You may be then able to filter FKDAT by deleting from the internal table. You would have to experiment this first though..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jul 2008 08:16:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-on-vbrk/m-p/4113597#M983506</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-10T08:16:59Z</dc:date>
    </item>
  </channel>
</rss>

