<?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: PRPS Performance Issue in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/prps-performance-issue/m-p/6168818#M1371297</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;THanks for you input, but there is no posnr field in PRPS table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 Oct 2009 18:52:23 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-10-15T18:52:23Z</dc:date>
    <item>
      <title>PRPS Performance Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/prps-performance-issue/m-p/6168816#M1371295</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     I am having serious performance issues with the below select and needed some inputs to try optimize it.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
IF  i_imakz[] IS NOT INITIAL.   
select c~posnr
           a~post1
           b~psphi
           a~pspnr
           a~pspid
           a~werks
           a~vgsbr
           a~objnr
           from ( ( proj as a inner join prps as b on a~pspid = b~posid )
           inner join imakz as c on p~objnr = c~objnr )
           into corresponding fields of table i_fproj
           for all entries in i_imakz
           where p~objnr eq i_imakz-objnr
ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I did a SQL analysis for the Querry and found out that it somewhat does a full table scan on PRPS as i dont have any where condition which forms the index for the table. Any input is highly appreciated&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;Moderator message - Moved to the correct forum&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Rob Burbank on Oct 15, 2009 12:02 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Oct 2009 14:51:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/prps-performance-issue/m-p/6168816#M1371295</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-15T14:51:39Z</dc:date>
    </item>
    <item>
      <title>Re: PRPS Performance Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/prps-performance-issue/m-p/6168817#M1371296</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Aparna,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perhaps you should create an index on field OBJNR so... Or perhaps you can change (but I don't know a lot these tables...) the logic like this :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;IF  i_imakz[] IS NOT INITIAL.   
SELECT c~posnr a~post1 b~psphi a~pspnr a~pspid
       a~werks a~vgsbr a~objnr
  FROM proj AS a
  INNER JOIN prps AS b ON a~pspid = b~posid 
" I have replace the join on POSNR rather than OBJNR
  INNER JOIN imakz AS c ON b~posnr = c~posnr 
  INTO CORRESPONDING FIELDS OF i_fproj
  FOR ALL ENTRIES IN i_imakz
" I have change the table on which we make FAE
    WHERE c~objnr EQ i_imakz-objnr  
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Samuel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Oct 2009 16:04:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/prps-performance-issue/m-p/6168817#M1371296</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-15T16:04:21Z</dc:date>
    </item>
    <item>
      <title>Re: PRPS Performance Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/prps-performance-issue/m-p/6168818#M1371297</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;THanks for you input, but there is no posnr field in PRPS table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Oct 2009 18:52:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/prps-performance-issue/m-p/6168818#M1371297</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-15T18:52:23Z</dc:date>
    </item>
    <item>
      <title>Re: PRPS Performance Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/prps-performance-issue/m-p/6168819#M1371298</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes you're right : I have take PSPNR for POSNR!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But you can still create an index : I have check that on my project, there is a specific index on field OBJNR...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And if you still have problem, I suggest you to split the join into a full scan on PRPS and then to FAE on the 2 other tables since the problem with FAE is that you treat the entry in your input table (here i_imakz) 5 by 5 (or another value that you can see in RZ11) and that you do full scan a lot of time instead of one time at the beginning...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it will help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Samuel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Oct 2009 07:10:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/prps-performance-issue/m-p/6168819#M1371298</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-16T07:10:33Z</dc:date>
    </item>
    <item>
      <title>Re: PRPS Performance Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/prps-performance-issue/m-p/6168820#M1371299</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;1. Try deleting duplicate entries from i_imakz based on objnr.&lt;/P&gt;&lt;P&gt;2. Sort i_makz by objnr&lt;/P&gt;&lt;P&gt;3. Create a dummy range table for PSPNR field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. Create a secondary index based on PSPNR, pspid and objnr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All together you can write your query as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Code&lt;/P&gt;&lt;P&gt;sort i_imakz by objnr.&lt;/P&gt;&lt;P&gt;delete adjusant duplicates from i_makz comparing objnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF  i_imakz[] IS NOT INITIAL.   &lt;/P&gt;&lt;P&gt;select c~posnr&lt;/P&gt;&lt;P&gt;           a~post1&lt;/P&gt;&lt;P&gt;           b~psphi&lt;/P&gt;&lt;P&gt;           a~pspnr&lt;/P&gt;&lt;P&gt;           a~pspid&lt;/P&gt;&lt;P&gt;           a~werks&lt;/P&gt;&lt;P&gt;           a~vgsbr&lt;/P&gt;&lt;P&gt;           a~objnr&lt;/P&gt;&lt;P&gt;           from ( ( proj as a inner join prps as b on a&lt;SUB&gt;pspid = b&lt;/SUB&gt;posid )&lt;/P&gt;&lt;P&gt;           inner join imakz as c on p&lt;SUB&gt;objnr = c&lt;/SUB&gt;objnr )&lt;/P&gt;&lt;P&gt;           into corresponding fields of table i_fproj&lt;/P&gt;&lt;P&gt;           for all entries in i_imakz&lt;/P&gt;&lt;P&gt;           where PSPNR in s_pspnr and  //s_pspnr - range table&lt;/P&gt;&lt;P&gt;                      a&lt;SUB&gt;pspid = b&lt;/SUB&gt;posid and&lt;/P&gt;&lt;P&gt;                      p~objnr eq i_imakz-objnr&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Suresh Babu Suresetti on Oct 16, 2009 12:44 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Oct 2009 07:13:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/prps-performance-issue/m-p/6168820#M1371299</guid>
      <dc:creator>anusurbab</dc:creator>
      <dc:date>2009-10-16T07:13:56Z</dc:date>
    </item>
    <item>
      <title>Re: PRPS Performance Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/prps-performance-issue/m-p/6168821#M1371300</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;PRPS/PROJ&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  In your code you have&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;proj as a inner join prps as b on a~pspid = b~posid&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;  Shouldn't it be (using foreign key)&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;proj as a inner join prps as b on a~pspnr = b~psphi&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;  which would use Index PRPS~P.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IMAKZ&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  The link with CO objects is in table IMZO. (index IMZO~001 is MANDT, OBJNR)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raymond&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Oct 2009 07:17:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/prps-performance-issue/m-p/6168821#M1371300</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2009-10-16T07:17:07Z</dc:date>
    </item>
    <item>
      <title>Re: PRPS Performance Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/prps-performance-issue/m-p/6168822#M1371301</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for all your inputs&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@Samuel: PSPNR is not the same as POSNR and Index is my last option.&lt;/P&gt;&lt;P&gt;@Suresh: I do delete duplicates before using FAE. Not sure if  dummy range will help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@Raymond. I did try the PSPHI join condition earlier, but for some reason the ST05 SQL analysis tool did not show any improvement in the select after changing the join condition. THe explain statement does not show that the optimizer is using Index P. Not sure why it wouldnt take the Index. As far as IMZO is concerned, do u think it will help with the select?? There is a index on OBJNR for IMAKZ also and it uses it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will try implement the new join condition and see if there is a difference in the runtime. Maybe use a Hint in the select which i dont prefer..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Oct 2009 14:31:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/prps-performance-issue/m-p/6168822#M1371301</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-16T14:31:53Z</dc:date>
    </item>
  </channel>
</rss>

