<?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: Performance Tuning in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-tuning/m-p/2624740#M603034</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dipika,&lt;/P&gt;&lt;P&gt;                in extension to the above inputs try finding an alternate solution to using an inner join if it is posssible.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 08 Aug 2007 12:10:26 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-08-08T12:10:26Z</dc:date>
    <item>
      <title>Performance Tuning</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-tuning/m-p/2624737#M603031</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have to replace the existing code to increase performance tuning.&lt;/P&gt;&lt;P&gt;I am facing difficulty in this.&lt;/P&gt;&lt;P&gt;Is anyone  help me out in this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;existing code is :-&lt;/P&gt;&lt;P&gt;tables: table1,                    &lt;/P&gt;&lt;P&gt;        table2,                    &lt;/P&gt;&lt;P&gt;        table3,                    &lt;/P&gt;&lt;P&gt;        table4,                    &lt;/P&gt;&lt;P&gt;        table5,                    &lt;/P&gt;&lt;P&gt;        table6,                    &lt;/P&gt;&lt;P&gt;        table6t,                   &lt;/P&gt;&lt;P&gt;        table8,                    &lt;/P&gt;&lt;P&gt;        table8t.                   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of lt_table1 occurs 0,&lt;/P&gt;&lt;P&gt;            objek    like table1-objek,      &lt;/P&gt;&lt;P&gt;            clint    like table1-clint,      &lt;/P&gt;&lt;P&gt;            lkenz    like table1-lkenz,      &lt;/P&gt;&lt;P&gt;        end of lt_table1,&lt;/P&gt;&lt;P&gt;            ls_table1 like line  of lt_table1,&lt;/P&gt;&lt;P&gt;      begin of lt_table2 occurs 0,&lt;/P&gt;&lt;P&gt;            objek    like table1-objek,      &lt;/P&gt;&lt;P&gt;            clint    like table1-clint,     &lt;/P&gt;&lt;P&gt;            klart    like table1-klart,     &lt;/P&gt;&lt;P&gt;            class    like table2-class,&lt;/P&gt;&lt;P&gt;            kschl    like table3-kschl,&lt;/P&gt;&lt;P&gt;            imerk    like table4-imerk,&lt;/P&gt;&lt;P&gt;        end of lt_table2,&lt;/P&gt;&lt;P&gt;            ls_table2 like line  of lt_table2,&lt;/P&gt;&lt;P&gt;      begin of itab occurs 0,&lt;/P&gt;&lt;P&gt;            objek    like table1-objek,     &lt;/P&gt;&lt;P&gt;            clint    like table1-clint,     &lt;/P&gt;&lt;P&gt;            klart    like table1-klart,     &lt;/P&gt;&lt;P&gt;            class    like table2-class,&lt;/P&gt;&lt;P&gt;            kschl    like table3-kschl,&lt;/P&gt;&lt;P&gt;            atinn    like table8-atinn,     &lt;/P&gt;&lt;P&gt;            atzhl    like table8-atzhl,     &lt;/P&gt;&lt;P&gt;            adzhl    like table8-adzhl,     &lt;/P&gt;&lt;P&gt;            atwrt    like table8-atwrt,     &lt;/P&gt;&lt;P&gt;            atnam    like table6-atnam,     &lt;/P&gt;&lt;P&gt;            atbez    like table6t-atbez,    &lt;/P&gt;&lt;P&gt;        end of itab,&lt;/P&gt;&lt;P&gt;            irec like line of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of orec.&lt;/P&gt;&lt;P&gt;         include structure zstru_data.&lt;/P&gt;&lt;P&gt;data: end of orec.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  select objek clint lkenz from table1&lt;/P&gt;&lt;P&gt;      into corresponding fields of ls_table1&lt;/P&gt;&lt;P&gt;     where objek = i_matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    check ls_table1-lkenz is initial.&lt;/P&gt;&lt;P&gt;    append ls_table1 to lt_table1.&lt;/P&gt;&lt;P&gt;  endselect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;    raise no_material_class.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  loop at lt_table1  into ls_table1.&lt;/P&gt;&lt;P&gt;    clear ls_table2.&lt;/P&gt;&lt;P&gt;    move ls_table1-objek  to ls_table2-objek.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    select single clint klart class  from table2&lt;/P&gt;&lt;P&gt;         into corresponding fields of ls_table2&lt;/P&gt;&lt;P&gt;        where clint = ls_table1-clint&lt;/P&gt;&lt;P&gt;          and klart = '001'           "Material class&lt;/P&gt;&lt;P&gt;          and statu = '1'             "Released status&lt;/P&gt;&lt;P&gt;          and vondt le sy-datum       "Valid from date&lt;/P&gt;&lt;P&gt;          and bisdt ge sy-datum.      "Valid to date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;      select single kschl  from table3&lt;/P&gt;&lt;P&gt;          into ls_table2-kschl&lt;/P&gt;&lt;P&gt;         where clint = ls_table1-clint.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      select imerk lkenz  from table4&lt;/P&gt;&lt;P&gt;          into corresponding fields of table4&lt;/P&gt;&lt;P&gt;         where clint = ls_table1-clint.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        check table4-lkenz is initial.&lt;/P&gt;&lt;P&gt;        move table4-imerk  to ls_table2-imerk.&lt;/P&gt;&lt;P&gt;        append ls_table2  to lt_table2.&lt;/P&gt;&lt;P&gt;      endselect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  loop at lt_table2  into ls_table2.&lt;/P&gt;&lt;P&gt;    clear irec.&lt;/P&gt;&lt;P&gt;    move-corresponding ls_table2  to irec.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    select atwrt lkenz from table5&lt;/P&gt;&lt;P&gt;        into corresponding fields of table5&lt;/P&gt;&lt;P&gt;       where objek = ls_table2-objek&lt;/P&gt;&lt;P&gt;         and atinn = ls_table2-imerk.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      check table5-lkenz is initial.&lt;/P&gt;&lt;P&gt;    endselect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;      continue.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    move table5-atwrt  to irec-atwrt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    select a&lt;SUB&gt;atinn a&lt;/SUB&gt;atnam&lt;/P&gt;&lt;P&gt;           b~atbez&lt;/P&gt;&lt;P&gt;           c&lt;SUB&gt;atzhl c&lt;/SUB&gt;adzhl&lt;/P&gt;&lt;P&gt;        into corresponding fields of irec&lt;/P&gt;&lt;P&gt;        from table6 as a&lt;/P&gt;&lt;P&gt;       inner join table6t as b&lt;/P&gt;&lt;P&gt;          on b&lt;SUB&gt;atinn = a&lt;/SUB&gt;atinn&lt;/P&gt;&lt;P&gt;         and b~spras = i_spras&lt;/P&gt;&lt;P&gt;       inner join table8 as c&lt;/P&gt;&lt;P&gt;          on c&lt;SUB&gt;atinn = a&lt;/SUB&gt;atinn&lt;/P&gt;&lt;P&gt;         and c~atwrt = table5-atwrt&lt;/P&gt;&lt;P&gt;       where a~atinn = ls_table2-imerk.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       append irec  to itab.&lt;/P&gt;&lt;P&gt;    endselect.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  loop at itab  into irec.&lt;/P&gt;&lt;P&gt;    clear orec.&lt;/P&gt;&lt;P&gt;    move-corresponding irec  to orec.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    select single atwtb from table8t&lt;/P&gt;&lt;P&gt;        into orec-atwtb&lt;/P&gt;&lt;P&gt;       where atinn = irec-atinn&lt;/P&gt;&lt;P&gt;         and atzhl = irec-atzhl&lt;/P&gt;&lt;P&gt;         and spras = i_spras&lt;/P&gt;&lt;P&gt;         and adzhl = irec-adzhl.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    append orec  to o_classtab.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the logic as per my understanding.&lt;/P&gt;&lt;P&gt;Did it want any changes.Functionality should not vary:-&lt;/P&gt;&lt;P&gt;Please help me in this.&lt;/P&gt;&lt;P&gt;tables: table1,                    &lt;/P&gt;&lt;P&gt;        table2,                    &lt;/P&gt;&lt;P&gt;        table3,                    &lt;/P&gt;&lt;P&gt;        table4,&lt;/P&gt;&lt;P&gt;        table5,&lt;/P&gt;&lt;P&gt;        table6,&lt;/P&gt;&lt;P&gt;        table7,&lt;/P&gt;&lt;P&gt;        table8,&lt;/P&gt;&lt;P&gt;        table9.&lt;/P&gt;&lt;P&gt;Types: begin of ls_table1 ,&lt;/P&gt;&lt;P&gt;            objek    like table1-objek,      &lt;/P&gt;&lt;P&gt;            clint    like table1-clint,      &lt;/P&gt;&lt;P&gt;            lkenz    like table1-lkenz,      &lt;/P&gt;&lt;P&gt;        end of ls_table1.&lt;/P&gt;&lt;P&gt; Data:  it_table1 type table of ls_table1 with header line,&lt;/P&gt;&lt;P&gt;         wa_table like line  of it_table1.&lt;/P&gt;&lt;P&gt; types: begin of ls_table2, &lt;/P&gt;&lt;P&gt;            objek    like table1-objek,      &lt;/P&gt;&lt;P&gt;            clint    like table1-clint,     &lt;/P&gt;&lt;P&gt;            klart    like table1-klart,     &lt;/P&gt;&lt;P&gt;            class    like table2-class,&lt;/P&gt;&lt;P&gt;            kschl    like table3-kschl,&lt;/P&gt;&lt;P&gt;            imerk    like table4-imerk,&lt;/P&gt;&lt;P&gt;        end of ls_table2.&lt;/P&gt;&lt;P&gt; data: it_table2 type table of ls_table2 with header line,&lt;/P&gt;&lt;P&gt;       wa_table2 like line of it_table2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; data: begin of itab occurs 0,&lt;/P&gt;&lt;P&gt;            objek    like table1-objek,     &lt;/P&gt;&lt;P&gt;            clint    like table1-clint,     &lt;/P&gt;&lt;P&gt;            klart    like table1-klart,     &lt;/P&gt;&lt;P&gt;            class    like table2-class,&lt;/P&gt;&lt;P&gt;            kschl    like table3-kschl,&lt;/P&gt;&lt;P&gt;            atinn    like table8-atinn,     &lt;/P&gt;&lt;P&gt;            atzhl    like table8-atzhl,     &lt;/P&gt;&lt;P&gt;            adzhl    like table8-adzhl,     &lt;/P&gt;&lt;P&gt;            atwrt    like table8-atwrt,&lt;/P&gt;&lt;P&gt;            atnam    like table6-atnam,     &lt;/P&gt;&lt;P&gt;            atbez    like table7-atbez,    &lt;/P&gt;&lt;P&gt;        end of itab,&lt;/P&gt;&lt;P&gt;            irec like line of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of orec.&lt;/P&gt;&lt;P&gt;         include structure zstru_data.&lt;/P&gt;&lt;P&gt;data: end of orec.&lt;/P&gt;&lt;P&gt;types: begin of ls_table3,&lt;/P&gt;&lt;P&gt;          clint    like table3-clint,     &lt;/P&gt;&lt;P&gt;          kschl    like table8-kschl,&lt;/P&gt;&lt;P&gt;      end of ls_table3.&lt;/P&gt;&lt;P&gt;types: begin of ls_table4,&lt;/P&gt;&lt;P&gt;       clint like table4-clint,&lt;/P&gt;&lt;P&gt;       imerk like table4-imerk,&lt;/P&gt;&lt;P&gt;       lkenz like table4-lkenz,&lt;/P&gt;&lt;P&gt;      end of ls_table4. &lt;/P&gt;&lt;P&gt;data: it_table3 type table of ls_table3 with header line,&lt;/P&gt;&lt;P&gt;      it_table4 type table of ls_table4 with header line.&lt;/P&gt;&lt;P&gt;       &lt;/P&gt;&lt;P&gt;  select objek clint lkenz from table1&lt;/P&gt;&lt;P&gt;      into corresponding fields of wa_table1&lt;/P&gt;&lt;P&gt;     where objek = i_matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    check wa_table1-lkenz is initial.&lt;/P&gt;&lt;P&gt;     append wa_table1 to it_table1.&lt;/P&gt;&lt;P&gt;  endselect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;    raise no_material.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; select clint klart class  from table2&lt;/P&gt;&lt;P&gt;         into table it_table2&lt;/P&gt;&lt;P&gt;        where klart = '001'           &lt;/P&gt;&lt;P&gt;          and statu = '1'             &lt;/P&gt;&lt;P&gt;          and vondt le sy-datum       &lt;/P&gt;&lt;P&gt;          and bisdt ge sy-datum.      &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;   select clint kschl  from table3&lt;/P&gt;&lt;P&gt;     into table it_table3&lt;/P&gt;&lt;P&gt;   for all entries in it_table1.&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;   if not it_table3 is initial.&lt;/P&gt;&lt;P&gt;     sort it_table3 by clint.&lt;/P&gt;&lt;P&gt;   endif.  &lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;   select clint imerk lkenz from table4&lt;/P&gt;&lt;P&gt;       into table it_table4&lt;/P&gt;&lt;P&gt;   for all entries in it_table1.&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;   if not it_table4 is initial.&lt;/P&gt;&lt;P&gt;     sort it_table4 by clint.&lt;/P&gt;&lt;P&gt;   endif.    &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;loop at it_table1.&lt;/P&gt;&lt;P&gt;  read table it_table2 with key clint  = it_table1-clint&lt;/P&gt;&lt;P&gt;                                        binary search.&lt;/P&gt;&lt;P&gt; if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;   read table it_table3 with key clint = it_table1-clint &lt;/P&gt;&lt;P&gt;                                     binary search.&lt;/P&gt;&lt;P&gt;  if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;   move:it_table3-kschl to it_table2-kschl.&lt;/P&gt;&lt;P&gt;   modify it_table2  transporting kschl.&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;   read table it_table4 with key clint = it_table2-clint &lt;/P&gt;&lt;P&gt;                                     binary search.&lt;/P&gt;&lt;P&gt;   if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;      check it_table4-lkenz is initial.&lt;/P&gt;&lt;P&gt;      move: it_table4-imerk to it_table2-imerk.&lt;/P&gt;&lt;P&gt;      modify it_table2 transporting imerk.&lt;/P&gt;&lt;P&gt;   endif.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt; endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;select objek atinn atwrt lkenz &lt;/P&gt;&lt;P&gt; for all entries in it_table2.&lt;/P&gt;&lt;P&gt; from table5&lt;/P&gt;&lt;P&gt;  into it_table5&lt;/P&gt;&lt;P&gt;where it_table5-lkenz ='0'.&lt;/P&gt;&lt;P&gt;       &lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt; sort it_table5 by objek attin.&lt;/P&gt;&lt;P&gt; delete adjacent duplicates.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; select a&lt;SUB&gt;atinn a&lt;/SUB&gt;atnam&lt;/P&gt;&lt;P&gt;           b~atbez&lt;/P&gt;&lt;P&gt;           c&lt;SUB&gt;atzhl c&lt;/SUB&gt;adzhl&lt;/P&gt;&lt;P&gt;    for all entries in it_table1&lt;/P&gt;&lt;P&gt;        into table itab&lt;/P&gt;&lt;P&gt;        from table6 as a&lt;/P&gt;&lt;P&gt;       inner join table7 as b&lt;/P&gt;&lt;P&gt;          on b&lt;SUB&gt;atinn = a&lt;/SUB&gt;atinn&lt;/P&gt;&lt;P&gt;         and b~spras = i_spras&lt;/P&gt;&lt;P&gt;       inner join table8 as c&lt;/P&gt;&lt;P&gt;          on c&lt;SUB&gt;atinn = a&lt;/SUB&gt;atinn&lt;/P&gt;&lt;P&gt;         and c~atwrt = ausp-atwrt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  loop at it_table2.&lt;/P&gt;&lt;P&gt;read table it_table5 with key objek atinn &lt;/P&gt;&lt;P&gt;           where objek = it_table2-objek&lt;/P&gt;&lt;P&gt;                 atinn = it_table2-atinn&lt;/P&gt;&lt;P&gt;                   binary search.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;  read table itab with key atinn&lt;/P&gt;&lt;P&gt;               where atinn = it_table2-imerk&lt;/P&gt;&lt;P&gt;                     binary search.&lt;/P&gt;&lt;P&gt;    if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;      move: it_table5-atwrt to itab-atwrt.&lt;/P&gt;&lt;P&gt;      modify itab transporting atwrt.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select atinn atzhl adzhl atwtb from table9&lt;/P&gt;&lt;P&gt;        into it_table9&lt;/P&gt;&lt;P&gt;       where spras = i_spras.&lt;/P&gt;&lt;P&gt;         &lt;/P&gt;&lt;P&gt;if not it_table9 is initial.&lt;/P&gt;&lt;P&gt;  sort it_table9 by atwtb.&lt;/P&gt;&lt;P&gt;  delete adjacent duplicates.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;loop at itab  into irec.&lt;/P&gt;&lt;P&gt;    clear orec.&lt;/P&gt;&lt;P&gt;    move-corresponding irec  to orec.&lt;/P&gt;&lt;P&gt;     read table it_table9 with key atwtb where atinn = irec-atinn&lt;/P&gt;&lt;P&gt;                                               atzhl = irec-atzhl&lt;/P&gt;&lt;P&gt;                                               adzhl = irec-adzhl&lt;/P&gt;&lt;P&gt;                                               binary search.&lt;/P&gt;&lt;P&gt;  if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;    append orec  to o_classtab.&lt;/P&gt;&lt;P&gt;  endif.  &lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Aug 2007 11:59:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-tuning/m-p/2624737#M603031</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-08T11:59:06Z</dc:date>
    </item>
    <item>
      <title>Re: Performance Tuning</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-tuning/m-p/2624738#M603032</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dipika,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have a couple of points to work on, to enhance the performance of this code that you have placed. I have gone through your code and observed these points.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Usage of 'INTO CORRESPONDING FIELDS OF' should be avoided. Instead define the order of the fields of the internal table in the same order of that of the table and use 'INTO TABLE &amp;lt;Internal Table name&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Avoid using SELECT....ENDSELECT. Try to use SELECT ... INTO TABLE..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) Do not use SELECT SINGLE.. or any SELECT... statements within a LOOP ... ENDLOOP. Instead use FOR ALL ENTRIES OF, in the beginning of the code in the SELECT statements and read those tables wherever and whenever needed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you take care of the above points you shall be able to improve code's &amp;lt;b&amp;gt;performance by more than 40%.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward points if this helps,&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Kiran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Aug 2007 12:06:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-tuning/m-p/2624738#M603032</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-08T12:06:08Z</dc:date>
    </item>
    <item>
      <title>Re: Performance Tuning</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-tuning/m-p/2624739#M603033</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;Dont use select inside the loop. Try to avoid this by using for all entries it will increase your performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try to follow the following guide line while coding it will boost the performance of your program,&lt;/P&gt;&lt;P&gt;Avoid using SELECT...ENDSELECT... construct and use SELECT ... INTO TABLE. &lt;/P&gt;&lt;P&gt;Use WHERE clause in your SELECT statement to restrict the volume of data retrieved. &lt;/P&gt;&lt;P&gt;Design your Query to Use as much index fields as possible from left to right in your WHERE statement &lt;/P&gt;&lt;P&gt;Either enable buffering in your database table or create Indexes to speed up the query. &lt;/P&gt;&lt;P&gt;Use FOR ALL ENTRIES in your SELECT statement to retrieve the matching records at one shot. &lt;/P&gt;&lt;P&gt;Avoid using nested SELECT statement, SELECT within LOOPs. &lt;/P&gt;&lt;P&gt;Avoid using INTO CORRESPONDING FIELDS OF TABLE. Instead use INTO TABLE. &lt;/P&gt;&lt;P&gt;Avoid using SELECT * and Select only the required fields from the table. &lt;/P&gt;&lt;P&gt;Avoid nested loops when working with large internal tables. &lt;/P&gt;&lt;P&gt;Use assign instead of into in LOOPs for table types with large work areas &lt;/P&gt;&lt;P&gt;When in doubt call transaction SE30 and use the examples and check your code &lt;/P&gt;&lt;P&gt;Whenever using READ TABLE use BINARY SEARCH addition to speed up the search. Be sure to sort the internal table before binary search. &lt;/P&gt;&lt;P&gt;Use "CHECK" instead of IF/ENDIF whenever possible. &lt;/P&gt;&lt;P&gt;Use "CASE" instead of IF/ENDIF whenever possible. &lt;/P&gt;&lt;P&gt;Use "MOVE" with individual variable/field moves instead of "MOVE-CORRESPONDING", creates more coding but is more effcient. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it will solve your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward if helpful.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Aug 2007 12:07:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-tuning/m-p/2624739#M603033</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-08T12:07:52Z</dc:date>
    </item>
    <item>
      <title>Re: Performance Tuning</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-tuning/m-p/2624740#M603034</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dipika,&lt;/P&gt;&lt;P&gt;                in extension to the above inputs try finding an alternate solution to using an inner join if it is posssible.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Aug 2007 12:10:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-tuning/m-p/2624740#M603034</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-08T12:10:26Z</dc:date>
    </item>
    <item>
      <title>Re: Performance Tuning</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-tuning/m-p/2624741#M603035</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Aug 2007 10:22:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-tuning/m-p/2624741#M603035</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-21T10:22:45Z</dc:date>
    </item>
  </channel>
</rss>

