<?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: Optimise Code in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/optimise-code/m-p/3522640#M847295</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sanju,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have a condition that not match with the join clause.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
AND y_collateral~coll_type IN pt_sel_coll_type
AND y_collateral~language IN pt_sel_coll_langu
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;have you try to use this code using &lt;STRONG&gt;loop at...where adr_kind &amp;lt;&amp;gt; zcl_bupa_utilities=&amp;gt;c_xxdefault&lt;/STRONG&gt;  after the select to delete records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
AND but021_fs  ~adr_kind   = zcl_bupa_utilities=&amp;gt;c_xxdefault
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Mar 2008 17:15:42 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-03-04T17:15:42Z</dc:date>
    <item>
      <title>Optimise Code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/optimise-code/m-p/3522634#M847289</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;Please optimise below code :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT z_reference~bp_number&lt;/P&gt;&lt;P&gt;         z_reference~profile&lt;/P&gt;&lt;P&gt;         but000~partner_guid&lt;/P&gt;&lt;P&gt;         FROM z_reference&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INNER JOIN but000&lt;/P&gt;&lt;P&gt;ON but000&lt;SUB&gt;partner = z_reference&lt;/SUB&gt;bp_number&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INNER JOIN y_projectinfo                                 &lt;/P&gt;&lt;P&gt;ON y_projectinfo&lt;SUB&gt;bp_number = z_reference&lt;/SUB&gt;bp_number    &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INNER JOIN yrms_collateral                                  &lt;/P&gt;&lt;P&gt;ON yrms_collateral&lt;SUB&gt;bp_number = z_reference&lt;/SUB&gt;bp_number     &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INNER JOIN crmm_but_frg0041                                 &lt;/P&gt;&lt;P&gt;ON crmm_but_frg0041&lt;SUB&gt;partner_guid = but000&lt;/SUB&gt;partner_guid      &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INNER JOIN but021_fs                                        &lt;/P&gt;&lt;P&gt;ON but021_fs&lt;SUB&gt;partner = but000&lt;/SUB&gt;partner                       &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INNER JOIN adrc                                             &lt;/P&gt;&lt;P&gt;ON adrc&lt;SUB&gt;addrnumber = but021_fs&lt;/SUB&gt;addrnumber                   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INNER JOIN but0is                                           &lt;/P&gt;&lt;P&gt;ON but0is&lt;SUB&gt;partner = z_reference&lt;/SUB&gt;bp_number                &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INNER JOIN z_ref_profile                                 &lt;/P&gt;&lt;P&gt;ON z_ref_profile&lt;SUB&gt;profile =  z_reference&lt;/SUB&gt;profile       &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INNER JOIN z_refactivity                                 &lt;/P&gt;&lt;P&gt;ON z_refactivity&lt;SUB&gt;profile =  z_reference&lt;/SUB&gt;profile       &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELDS OF TABLE lt_results&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHERE but000~xdele = space&lt;/P&gt;&lt;P&gt;and but000~xblck = space&lt;/P&gt;&lt;P&gt;and but000~not_released = space&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AND but000~mc_name1 LIKE ps_sel_mc_name1                   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AND adrc~country IN pt_sel_country                       &lt;/P&gt;&lt;P&gt;AND adrc~region  IN pt_sel_region                        &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AND but021_fs~valid_from &amp;lt;= lv_time_stamp                 &lt;/P&gt;&lt;P&gt;AND but021_fs~valid_to   &amp;gt;= lv_time_stamp                  &lt;/P&gt;&lt;P&gt;AND but021_fs~adr_kind   = zcl_bupa_utilities=&amp;gt;c_xxdefault &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AND crmm_but_frg0041~attrib_3 IN pt_sel_mastercode         &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AND z_reference~conf_ref  IN pt_sel_con_ref             &lt;/P&gt;&lt;P&gt;AND z_reference~bp_number IN pt_sel_bp_number           &lt;/P&gt;&lt;P&gt;AND z_reference~ramp_up   IN pt_sel_ramp_up             &lt;/P&gt;&lt;P&gt;AND z_reference~status    IN pt_sel_ref_status          &lt;/P&gt;&lt;P&gt;AND z_reference~non_live  IN pt_sel_non_live            &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AND but000~zz_segment        IN pt_sel_market_segment      &lt;/P&gt;&lt;P&gt;AND but000~type              IN pt_sel_bp_type             &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AND but0is~istype            IN pt_sel_istype            &lt;/P&gt;&lt;P&gt;AND but0is~ind_sector        IN pt_sel_ind_sector        &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AND z_ref_profile~child_id      IN pt_sel_node          &lt;/P&gt;&lt;P&gt;AND z_refactivity~ref_activity  IN pt_sel_ref_activity  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AND y_projectinfo~proj_sys_rpl1 IN pt_sel_proj_sys_rpl1 &lt;/P&gt;&lt;P&gt;AND y_projectinfo~proj_sys_rpl2 IN pt_sel_proj_sys_rpl2 &lt;/P&gt;&lt;P&gt;AND y_projectinfo~proj_sys_rpl3 IN pt_sel_proj_sys_rpl3 &lt;/P&gt;&lt;P&gt;AND y_projectinfo~proj_compete1 IN pt_sel_proj_compete1 &lt;/P&gt;&lt;P&gt;AND y_projectinfo~proj_compete2 IN pt_sel_proj_compete2 &lt;/P&gt;&lt;P&gt;AND y_projectinfo~proj_compete3 IN pt_sel_proj_compete3 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AND y_projectinfo~proj_countries   IN pt_sel_proj_countries    &lt;/P&gt;&lt;P&gt;AND y_projectinfo~proj_length      IN pt_sel_proj_length       &lt;/P&gt;&lt;P&gt;AND y_projectinfo~proj_man_days    IN pt_sel_proj_man_days     &lt;/P&gt;&lt;P&gt;AND y_projectinfo~proj_snglinstall IN pt_sel_proj_snglinstall  &lt;/P&gt;&lt;P&gt;AND y_projectinfo~proj_roll_out    IN pt_sel_proj_roll_out     &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AND y_collateral~coll_type         IN pt_sel_coll_type         &lt;/P&gt;&lt;P&gt;AND y_collateral~language          IN pt_sel_coll_langu        &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2008 17:50:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/optimise-code/m-p/3522634#M847289</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-28T17:50:59Z</dc:date>
    </item>
    <item>
      <title>Re: Optimise Code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/optimise-code/m-p/3522635#M847290</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are a number of your own tables here. It's pretty difficult for theforum to give much help in this case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the explain function of ST05 may help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2008 18:24:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/optimise-code/m-p/3522635#M847290</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-28T18:24:53Z</dc:date>
    </item>
    <item>
      <title>Re: Optimise Code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/optimise-code/m-p/3522636#M847291</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Never use more than 3 inner joins will be my motto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2008 18:42:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/optimise-code/m-p/3522636#M847291</guid>
      <dc:creator>varun_maharshi</dc:creator>
      <dc:date>2008-02-28T18:42:09Z</dc:date>
    </item>
    <item>
      <title>Re: Optimise Code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/optimise-code/m-p/3522637#M847292</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Varun - why not? SAP has views (that are implemented by JOINS) on many tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2008 18:51:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/optimise-code/m-p/3522637#M847292</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-28T18:51:47Z</dc:date>
    </item>
    <item>
      <title>Re: Optimise Code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/optimise-code/m-p/3522638#M847293</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This code can not be optimized in general.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are so many IN condition which are probably very often not filled that there is no way to optimize it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You must check you main selects:&lt;/P&gt;&lt;P&gt;+ this and this and that IN filled what happens, this is then one statement&lt;/P&gt;&lt;P&gt;+ if other IN conditions are filled then you get a completely different statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sometimes the database optimizer will find the right way in which order it should access the tables and which indexes it should. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sometimes it will not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Siegfried&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Feb 2008 09:24:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/optimise-code/m-p/3522638#M847293</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-29T09:24:08Z</dc:date>
    </item>
    <item>
      <title>Re: Optimise Code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/optimise-code/m-p/3522639#M847294</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sanju,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go for FOR ALL ENTRIES instead of inner joins, and also see that all the selection criteria is filled.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This would optimize your code to a great extent.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;---&lt;/P&gt;&lt;P&gt;Reward points if found useful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Mar 2008 07:28:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/optimise-code/m-p/3522639#M847294</guid>
      <dc:creator>Sultanuddin</dc:creator>
      <dc:date>2008-03-03T07:28:25Z</dc:date>
    </item>
    <item>
      <title>Re: Optimise Code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/optimise-code/m-p/3522640#M847295</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sanju,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have a condition that not match with the join clause.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
AND y_collateral~coll_type IN pt_sel_coll_type
AND y_collateral~language IN pt_sel_coll_langu
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;have you try to use this code using &lt;STRONG&gt;loop at...where adr_kind &amp;lt;&amp;gt; zcl_bupa_utilities=&amp;gt;c_xxdefault&lt;/STRONG&gt;  after the select to delete records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
AND but021_fs  ~adr_kind   = zcl_bupa_utilities=&amp;gt;c_xxdefault
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Mar 2008 17:15:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/optimise-code/m-p/3522640#M847295</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-04T17:15:42Z</dc:date>
    </item>
  </channel>
</rss>

