<?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: Please Improve Performance of Code in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-improve-performance-of-code/m-p/2346078#M517501</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I dont have any selection values.&lt;/P&gt;&lt;P&gt;Its fetch the total Custmer Master Data from DB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Subbu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 11 Jun 2007 14:58:22 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-11T14:58:22Z</dc:date>
    <item>
      <title>Please Improve Performance of Code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-improve-performance-of-code/m-p/2346072#M517495</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;How to improve performance of this following code.&lt;/P&gt;&lt;P&gt;Please help me.&lt;/P&gt;&lt;P&gt;Its too urgent.&lt;/P&gt;&lt;P&gt;**********************&lt;/P&gt;&lt;P&gt;TYPES  : BEGIN OF ICUSTOMER,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         KUNNR TYPE KUNNR,&lt;/P&gt;&lt;P&gt;         NAME1 TYPE NAME1,&lt;/P&gt;&lt;P&gt;         SORTL TYPE SORTL,&lt;/P&gt;&lt;P&gt;         KTOKD TYPE KTOKD,&lt;/P&gt;&lt;P&gt;         TELF1 TYPE TELF1,&lt;/P&gt;&lt;P&gt;         TELFX TYPE TELFX,&lt;/P&gt;&lt;P&gt;         STRAS TYPE STRAS,&lt;/P&gt;&lt;P&gt;         REGIO TYPE REGIO,&lt;/P&gt;&lt;P&gt;         ORT01 TYPE ORT01,&lt;/P&gt;&lt;P&gt;         LAND1 TYPE LAND1,&lt;/P&gt;&lt;P&gt;         PSTLZ TYPE PSTLZ,&lt;/P&gt;&lt;P&gt;         LOEVM TYPE LOEVM,&lt;/P&gt;&lt;P&gt;         NODEL TYPE NODEL,&lt;/P&gt;&lt;P&gt;         ADRNR TYPE ADRNR,&lt;/P&gt;&lt;P&gt;         SPRAS TYPE SPRAS,&lt;/P&gt;&lt;P&gt;         ZTERM TYPE DZTERM,&lt;/P&gt;&lt;P&gt;         TRANSPZONE TYPE LZONE,&lt;/P&gt;&lt;P&gt;         ATINN TYPE ATINN,&lt;/P&gt;&lt;P&gt;         ATWTB TYPE ATWTB,&lt;/P&gt;&lt;P&gt;         STR_SUPPL1 TYPE AD_STRSPP1,&lt;/P&gt;&lt;P&gt;         STR_SUPPL2 TYPE AD_STRSPP2,&lt;/P&gt;&lt;P&gt;         END OF ICUSTOMER.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES : BEGIN OF ICAWN ,&lt;/P&gt;&lt;P&gt;       ATINN TYPE CAWN-ATINN,&lt;/P&gt;&lt;P&gt;       ATWTB TYPE CAWNT-ATWTB,&lt;/P&gt;&lt;P&gt;       END OF ICAWN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : I_ICUSTOMER TYPE STANDARD TABLE OF ICUSTOMER. " OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;DATA : WA_ICUSTOMER TYPE ICUSTOMER.&lt;/P&gt;&lt;P&gt;DATA : I_ICAWN TYPE STANDARD TABLE OF ICAWN.  " OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;DATA : WA_ICAWN TYPE ICAWN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: FIELD_POSITION LIKE DD03L-POSITION.&lt;/P&gt;&lt;P&gt;DATA: HOLD_POSITION LIKE DD03L-POSITION.&lt;/P&gt;&lt;P&gt;DATA: HOLD_LINE_COUNT  LIKE SY-TABIX .&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS : &amp;lt;FC&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select k1&lt;SUB&gt;KUNNR k1&lt;/SUB&gt;NAME1 k1&lt;SUB&gt;SORTL k1&lt;/SUB&gt;KTOKD k1&lt;SUB&gt;TELF1 k1&lt;/SUB&gt;TELFX k1&lt;SUB&gt;STRAS k1&lt;/SUB&gt;REGIO&lt;/P&gt;&lt;P&gt;         k1&lt;SUB&gt;ORT01 k1&lt;/SUB&gt;LAND1 k1&lt;SUB&gt;PSTLZ k1&lt;/SUB&gt;LOEVM k1&lt;SUB&gt;NODEL k1&lt;/SUB&gt;ADRNR k1~SPRAS&lt;/P&gt;&lt;P&gt;         K2~ZTERM&lt;/P&gt;&lt;P&gt;         A&lt;SUB&gt;TRANSPZONE A&lt;/SUB&gt;STR_SUPPL1 A~STR_SUPPL2&lt;/P&gt;&lt;P&gt;         INTO corresponding fields of TABLE I_ICUSTOMER FROM&lt;/P&gt;&lt;P&gt;         KNA1 AS K1&lt;/P&gt;&lt;P&gt;         INNER JOIN KNB1 AS K2 ON K2&lt;SUB&gt;KUNNR = K1&lt;/SUB&gt;KUNNR&lt;/P&gt;&lt;P&gt;         INNER JOIN ADRC AS A ON A&lt;SUB&gt;ADDRNUMBER = K1&lt;/SUB&gt;ADRNR&lt;/P&gt;&lt;P&gt;         WHERE ( k1~KTOKD = 'Z001' OR&lt;/P&gt;&lt;P&gt;                k1~KTOKD = 'Z002' OR&lt;/P&gt;&lt;P&gt;                k1~KTOKD = 'Z003' OR&lt;/P&gt;&lt;P&gt;                k1~KTOKD = 'Z004' OR&lt;/P&gt;&lt;P&gt;                k1~KTOKD = 'ZSAI' ) and&lt;/P&gt;&lt;P&gt;                k2~bukrs = '0100'.       " To Avoid duplicate records.&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_DATA_FOUND.&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 I_ICUSTOMER INTO WA_ICUSTOMER WHERE KTOKD = 'Z001'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   SELECT T2&lt;SUB&gt;ATINN T3&lt;/SUB&gt;ATWTB INTO WA_ICAWN UP TO 1 ROWS&lt;/P&gt;&lt;P&gt;     FROM AUSP AS T1&lt;/P&gt;&lt;P&gt;     INNER JOIN CAWN AS T2&lt;/P&gt;&lt;P&gt;     ON T2&lt;SUB&gt;ATINN = T1&lt;/SUB&gt;ATINN AND&lt;/P&gt;&lt;P&gt;        T2&lt;SUB&gt;ATWRT = T1&lt;/SUB&gt;ATWRT&lt;/P&gt;&lt;P&gt;     INNER JOIN CAWNT AS T3&lt;/P&gt;&lt;P&gt;     ON T3&lt;SUB&gt;ATINN = T1&lt;/SUB&gt;ATINN AND&lt;/P&gt;&lt;P&gt;        T3&lt;SUB&gt;ATZHL = T2&lt;/SUB&gt;ATZHL&lt;/P&gt;&lt;P&gt;    WHERE T1~OBJEK = WA_ICUSTOMER-KUNNR  AND&lt;/P&gt;&lt;P&gt;           T3~SPRAS = 'EN' AND&lt;/P&gt;&lt;P&gt;           T3~ADZHL = '0' .&lt;/P&gt;&lt;P&gt;     CHECK SY-SUBRC EQ 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    WA_ICUSTOMER-atinn = wa_ICAWN-atinn.&lt;/P&gt;&lt;P&gt;    WA_ICUSTOMER-atwtb = wa_ICAWN-atwtb.&lt;/P&gt;&lt;P&gt;    MODIFY I_ICUSTOMER FROM WA_ICUSTOMER INDEX SY-TABIX.&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;LOOP AT I_ICUSTOMER INTO WA_ICUSTOMER.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CUSTOMER-KUNNR      = WA_ICUSTOMER-KUNNR.&lt;/P&gt;&lt;P&gt;  CUSTOMER-NAME1      = WA_ICUSTOMER-NAME1.&lt;/P&gt;&lt;P&gt;  CUSTOMER-SORTL      = WA_ICUSTOMER-SORTL.&lt;/P&gt;&lt;P&gt;  CUSTOMER-TELF1      = WA_ICUSTOMER-TELF1.&lt;/P&gt;&lt;P&gt;  CUSTOMER-TELFX      = WA_ICUSTOMER-TELFX.&lt;/P&gt;&lt;P&gt;  CUSTOMER-STRAS      = WA_ICUSTOMER-STRAS.&lt;/P&gt;&lt;P&gt;  CUSTOMER-STR_SUPPL1 = WA_ICUSTOMER-STR_SUPPL1.&lt;/P&gt;&lt;P&gt;  CUSTOMER-STR_SUPPL2 = WA_ICUSTOMER-STR_SUPPL2.&lt;/P&gt;&lt;P&gt;  CUSTOMER-REGIO      = WA_ICUSTOMER-REGIO.&lt;/P&gt;&lt;P&gt;  CUSTOMER-ORT01      = WA_ICUSTOMER-ORT01.&lt;/P&gt;&lt;P&gt;  CUSTOMER-LAND1      = WA_ICUSTOMER-LAND1.&lt;/P&gt;&lt;P&gt;  CUSTOMER-PSTLZ      = WA_ICUSTOMER-PSTLZ.&lt;/P&gt;&lt;P&gt;  if WA_icustomer-ktokd = 'Z002'.&lt;/P&gt;&lt;P&gt;  CUSTOMER-TRANSPZONE = WA_ICUSTOMER-TRANSPZONE.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;  CUSTOMER-TRANSPZONE = ''.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;  if WA_icustomer-ktokd = 'Z001' or WA_icustomer-ktokd = 'Z004'.&lt;/P&gt;&lt;P&gt;  CUSTOMER-ZTERM      = WA_ICUSTOMER-ZTERM.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;  CUSTOMER-ZTERM      = ''.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CUSTOMER-LOEVM      = WA_ICUSTOMER-LOEVM.&lt;/P&gt;&lt;P&gt;  CUSTOMER-NODEL      = WA_ICUSTOMER-NODEL.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; if WA_ICUSTOMER-KTOKD = 'Z001'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CUSTOMER-ATINN      = WA_ICUSTOMER-ATINN.&lt;/P&gt;&lt;P&gt;  CUSTOMER-ATWTB     = WA_ICUSTOMER-ATWTB.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; ELSE.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   IF WA_ICUSTOMER-KTOKD = 'Z001'.&lt;/P&gt;&lt;P&gt;    CUSTOMER-KTOKD = 'SP'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ELSEIF WA_ICUSTOMER-KTOKD = 'Z002'.&lt;/P&gt;&lt;P&gt;    CUSTOMER-KTOKD = 'SH'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ELSEIF WA_ICUSTOMER-KTOKD = 'Z003'.&lt;/P&gt;&lt;P&gt;    CUSTOMER-KTOKD = 'PY'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ELSEIF WA_ICUSTOMER-KTOKD = 'Z004'.&lt;/P&gt;&lt;P&gt;    CUSTOMER-KTOKD = 'BP'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ELSEIF WA_ICUSTOMER-KTOKD = 'ZSAI'.&lt;/P&gt;&lt;P&gt;    CUSTOMER-KTOKD = 'IC'.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  append CUSTOMER.&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;Thanks,&lt;/P&gt;&lt;P&gt;Subu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2007 12:58:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-improve-performance-of-code/m-p/2346072#M517495</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-11T12:58:35Z</dc:date>
    </item>
    <item>
      <title>Re: Please Improve Performance of Code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-improve-performance-of-code/m-p/2346073#M517496</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you done a performance trace or runtime analysis to pinpoint the source of the problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2007 13:46:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-improve-performance-of-code/m-p/2346073#M517496</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-11T13:46:01Z</dc:date>
    </item>
    <item>
      <title>Re: Please Improve Performance of Code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-improve-performance-of-code/m-p/2346074#M517497</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for Replay Rob.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have been checked Performance Trace but didnt check runtime analysis because in my system SE30 is not working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please concentrate on inner joins select statment b/w loop endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It will take more for excuting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Subbu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2007 14:19:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-improve-performance-of-code/m-p/2346074#M517497</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-11T14:19:25Z</dc:date>
    </item>
    <item>
      <title>Re: Please Improve Performance of Code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-improve-performance-of-code/m-p/2346075#M517498</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The SELECT on KNA1 isn't using an index.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2007 14:26:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-improve-performance-of-code/m-p/2346075#M517498</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-11T14:26:30Z</dc:date>
    </item>
    <item>
      <title>Re: Please Improve Performance of Code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-improve-performance-of-code/m-p/2346076#M517499</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What i will do Rob.&lt;/P&gt;&lt;P&gt;Please give me a Help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2007 14:48:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-improve-performance-of-code/m-p/2346076#M517499</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-11T14:48:55Z</dc:date>
    </item>
    <item>
      <title>Re: Please Improve Performance of Code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-improve-performance-of-code/m-p/2346077#M517500</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;pass the values from kna1-kunnr to you're selection. that's the index on kna1&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2007 14:55:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-improve-performance-of-code/m-p/2346077#M517500</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-11T14:55:02Z</dc:date>
    </item>
    <item>
      <title>Re: Please Improve Performance of Code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-improve-performance-of-code/m-p/2346078#M517501</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I dont have any selection values.&lt;/P&gt;&lt;P&gt;Its fetch the total Custmer Master Data from DB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Subbu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2007 14:58:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-improve-performance-of-code/m-p/2346078#M517501</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-11T14:58:22Z</dc:date>
    </item>
    <item>
      <title>Re: Please Improve Performance of Code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-improve-performance-of-code/m-p/2346079#M517502</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:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. do not use INTO corresponding fields of  clause in select statement.&lt;/P&gt;&lt;P&gt;2. Never use logic like this :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;select from dbtab....&lt;/P&gt;&lt;P&gt;&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;Instead use &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select &amp;lt;fld_list&amp;gt; from dbtab  into itab2&lt;/P&gt;&lt;P&gt;for all entries in itab&lt;/P&gt;&lt;P&gt;where...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort itab by key_flds&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;read table itab2... binary search.&lt;/P&gt;&lt;P&gt;"process&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. why you want last itab customer instead of that u can add few field in i_cust... and modify that itab itself in one loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: second option is most improtant&lt;/P&gt;&lt;P&gt;Jogdand M B&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2007 06:11:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-improve-performance-of-code/m-p/2346079#M517502</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-12T06:11:35Z</dc:date>
    </item>
    <item>
      <title>Re: Please Improve Performance of Code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-improve-performance-of-code/m-p/2346080#M517503</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Also, change the multiple if statements at the end to a CASE statement. &lt;/P&gt;&lt;P&gt;This will make your code more clearer to understand. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of IF WA_ICUSTOMER-KTOKD = 'Z001'.&lt;/P&gt;&lt;P&gt;CUSTOMER-KTOKD = 'SP'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ELSEIF WA_ICUSTOMER-KTOKD = 'Z002'.&lt;/P&gt;&lt;P&gt;CUSTOMER-KTOKD = 'SH'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ELSEIF WA_ICUSTOMER-KTOKD = 'Z003'.&lt;/P&gt;&lt;P&gt;CUSTOMER-KTOKD = 'PY'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ELSEIF WA_ICUSTOMER-KTOKD = 'Z004'.&lt;/P&gt;&lt;P&gt;CUSTOMER-KTOKD = 'BP'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ELSEIF WA_ICUSTOMER-KTOKD = 'ZSAI'.&lt;/P&gt;&lt;P&gt;CUSTOMER-KTOKD = 'IC'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CASE WA_ICUSTOMER-KTOKD.&lt;/P&gt;&lt;P&gt;     WHEN 'Z001'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        do something&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;     WHEN 'Z002'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        do something else&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;     WHEN OTHERS.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        nothing else matched&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ENDCASE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Next point: you do the following statement:&lt;/P&gt;&lt;P&gt;"LOOP AT I_ICUSTOMER INTO WA_ICUSTOMER WHERE KTOKD = 'Z001'.".&lt;/P&gt;&lt;P&gt;As internal table I_ICUSTOMER is a standard table, this statement will lead looping through each record of this table, to find all records where KTOKD is 'Z001'. Try to change I_ICUSTOMER to a sorted table on this field, which can in case of a huge number of records lead to a much better performance. Check the help on sorted and hashed tables. Note that loop at .. where.... with hashed tables also gives a table scan, so you must use sorted tables...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2007 06:35:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-improve-performance-of-code/m-p/2346080#M517503</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-12T06:35:31Z</dc:date>
    </item>
    <item>
      <title>Re: Please Improve Performance of Code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-improve-performance-of-code/m-p/2346081#M517504</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;In my case we need to get data from multiple DB tables.&lt;/P&gt;&lt;P&gt;So i have to use inner joins.&lt;/P&gt;&lt;P&gt;Can we use for all entries in inner joins select statment.&lt;/P&gt;&lt;P&gt;Please help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Subbu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2007 07:11:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-improve-performance-of-code/m-p/2346081#M517504</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-12T07:11:47Z</dc:date>
    </item>
    <item>
      <title>Re: Please Improve Performance of Code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-improve-performance-of-code/m-p/2346082#M517505</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;why is the necesity to  progamm it and don't build a query with SQ01 ??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2007 08:00:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-improve-performance-of-code/m-p/2346082#M517505</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-12T08:00:05Z</dc:date>
    </item>
    <item>
      <title>Re: Please Improve Performance of Code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-improve-performance-of-code/m-p/2346083#M517506</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;yes it is possible to use inner join and for all entries in same sql statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is ur code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT I_ICUSTOMER INTO WA_ICUSTOMER WHERE KTOKD = 'Z001'.

SELECT T2~ATINN T3~ATWTB INTO WA_ICAWN UP TO 1 ROWS
FROM AUSP AS T1
INNER JOIN CAWN AS T2
ON T2~ATINN = T1~ATINN AND
T2~ATWRT = T1~ATWRT
INNER JOIN CAWNT AS T3
ON T3~ATINN = T1~ATINN AND
T3~ATZHL = T2~ATZHL
WHERE T1~OBJEK = WA_ICUSTOMER-KUNNR AND
T3~SPRAS = 'EN' AND
T3~ADZHL = '0' .
CHECK SY-SUBRC EQ 0.

WA_ICUSTOMER-atinn = wa_ICAWN-atinn.
WA_ICUSTOMER-atwtb = wa_ICAWN-atwtb.
MODIFY I_ICUSTOMER FROM WA_ICUSTOMER INDEX SY-TABIX.
ENDSELECT.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;modified code will be :&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;if i_icustomer is not initial.
SELECT T2~ATINN T3~ATWTB INTO table itab_ICAWN  "see change
FROM AUSP AS T1
INNER JOIN CAWN AS T2
ON T2~ATINN = T1~ATINN AND
T2~ATWRT = T1~ATWRT
INNER JOIN CAWNT AS T3
ON T3~ATINN = T1~ATINN AND
T3~ATZHL = T2~ATZHL
for all entries in i_icustomer
WHERE T1~OBJEK = i_ICUSTOMER-KUNNR AND "see change
T3~SPRAS = 'EN' AND
T3~ADZHL = '0' .
endif. "see change

loop at i_icustomer.
read table itab_icusomer with key ......
"update here atinn and atwtb

WA_ICUSTOMER-atinn = wa_ICAWN-atinn. "modify here
WA_ICUSTOMER-atwtb = wa_ICAWN-atwtb. "moify here
MODIFY I_ICUSTOMER transporting atinn atwtb.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will help u. revert if u hv any doubt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jogdand M B&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2007 08:00:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-improve-performance-of-code/m-p/2346083#M517506</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-12T08:00:41Z</dc:date>
    </item>
    <item>
      <title>Re: Please Improve Performance of Code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-improve-performance-of-code/m-p/2346084#M517507</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Jogdand,&lt;/P&gt;&lt;P&gt;But what i put in key field area...&lt;/P&gt;&lt;P&gt;read table itab_icusomer with key ????&lt;/P&gt;&lt;P&gt;Here I want to which fields i need to mention..&lt;/P&gt;&lt;P&gt;please tel me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2007 08:33:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-improve-performance-of-code/m-p/2346084#M517507</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-12T08:33:44Z</dc:date>
    </item>
    <item>
      <title>Re: Please Improve Performance of Code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-improve-performance-of-code/m-p/2346085#M517508</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;try this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
if i_icustomer is not initial.
SELECT T2~ATINN T3~ATWTB INTO table itab_ICAWN  "see change
FROM AUSP AS T1
INNER JOIN CAWN AS T2
ON T2~ATINN = T1~ATINN AND
T2~ATWRT = T1~ATWRT
INNER JOIN CAWNT AS T3
ON T3~ATINN = T1~ATINN AND
T3~ATZHL = T2~ATZHL
for all entries in i_icustomer
WHERE T1~OBJEK = i_ICUSTOMER-KUNNR AND "see change
T3~SPRAS = 'EN' AND
T3~ADZHL = '0' .
endif. "see change
 
loop at i_icustomer.
read table itab_icusomer with key OBJEK = I_ICUSTOMER-KUNNR . "see KEY field 
"update here atinn and atwtb
 
WA_ICUSTOMER-atinn = wa_ICAWN-atinn. "modify here
WA_ICUSTOMER-atwtb = wa_ICAWN-atwtb. "moify here
MODIFY I_ICUSTOMER transporting atinn atwtb.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;revert back if u hv any doubt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jogdand M B&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2007 08:56:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-improve-performance-of-code/m-p/2346085#M517508</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-12T08:56:07Z</dc:date>
    </item>
    <item>
      <title>Re: Please Improve Performance of Code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-improve-performance-of-code/m-p/2346086#M517509</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have done like that only but i am getting syntax error like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When using the addition "FOR ALL ENTRIES IN itab", the fields "OBJEK"and "I_ICUSTOMER-KUNNR" must have the same type and length.		&lt;/P&gt;&lt;P&gt;I couldn't understand why getting this error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Subbu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2007 09:05:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-improve-performance-of-code/m-p/2346086#M517509</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-12T09:05:23Z</dc:date>
    </item>
    <item>
      <title>Re: Please Improve Performance of Code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-improve-performance-of-code/m-p/2346087#M517510</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Because both objek and kunnr are not same data type and lenth.&lt;/P&gt;&lt;P&gt;So we are getting this type of error.&lt;/P&gt;&lt;P&gt;what i wil do.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2007 09:10:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-improve-performance-of-code/m-p/2346087#M517510</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-12T09:10:34Z</dc:date>
    </item>
    <item>
      <title>Re: Please Improve Performance of Code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-improve-performance-of-code/m-p/2346088#M517511</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;What u want to do actually?  bcoz codes below, i m not able to find link between tables in following sql:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  select t2&lt;SUB&gt;atinn t3&lt;/SUB&gt;atwtb into table itab_icawn  "see change&lt;/P&gt;&lt;P&gt;  from ausp as t1&lt;/P&gt;&lt;P&gt;  inner join cawn as t2&lt;/P&gt;&lt;P&gt;  on t2&lt;SUB&gt;atinn = t1&lt;/SUB&gt;atinn and&lt;/P&gt;&lt;P&gt;  t2&lt;SUB&gt;atwrt = t1&lt;/SUB&gt;atwrt&lt;/P&gt;&lt;P&gt;  inner join cawnt as t3&lt;/P&gt;&lt;P&gt;  on t3&lt;SUB&gt;atinn = t1&lt;/SUB&gt;atinn and&lt;/P&gt;&lt;P&gt;  t3&lt;SUB&gt;atzhl = t2&lt;/SUB&gt;atzhl&lt;/P&gt;&lt;P&gt;  for all entries in i_icustomer&lt;/P&gt;&lt;P&gt;  where t3~kunnr = i_icustomer-kunnr and "see change&lt;/P&gt;&lt;P&gt;  t3~spras = 'EN' and&lt;/P&gt;&lt;P&gt;  t3~adzhl = '0' .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Give me your (functional) requirement briefly ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My earlier posts where purely based on performance issues, anyway, just give me ur req. then i will be abe to do something.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jogdand M B&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2007 10:06:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-improve-performance-of-code/m-p/2346088#M517511</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-12T10:06:46Z</dc:date>
    </item>
    <item>
      <title>Re: Please Improve Performance of Code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-improve-performance-of-code/m-p/2346089#M517512</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;--&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2007 10:09:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-improve-performance-of-code/m-p/2346089#M517512</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-12T10:09:06Z</dc:date>
    </item>
    <item>
      <title>Re: Please Improve Performance of Code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-improve-performance-of-code/m-p/2346090#M517513</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to create a RFC for get Customer Master Data .&lt;/P&gt;&lt;P&gt;Tables Kna1, Knb1, Adrc, Cawn.&lt;/P&gt;&lt;P&gt;Some fields in Kna1,&lt;/P&gt;&lt;P&gt;         TRANSPZONE, STR_SUPPL1, STR_SUPPL2 from ADRC,&lt;/P&gt;&lt;P&gt;         ZTERM from KNB1,&lt;/P&gt;&lt;P&gt;         ATINN from CAWN, (Classification Data)&lt;/P&gt;&lt;P&gt;               &lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Subbu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2007 10:22:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-improve-performance-of-code/m-p/2346090#M517513</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-12T10:22:39Z</dc:date>
    </item>
    <item>
      <title>Re: Please Improve Performance of Code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-improve-performance-of-code/m-p/2346091#M517514</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;try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;if i_icustomer is not initial.
SELECT T2~ATINN T3~ATWTB INTO table itab_ICAWN  "see change
FROM AUSP AS T1
INNER JOIN CAWN AS T2
ON T2~ATINN = T1~ATINN AND
T2~ATWRT = T1~ATWRT
INNER JOIN CAWNT AS T3
ON T3~ATINN = T1~ATINN AND
T3~ATZHL = T2~ATZHL
for all entries in i_icustomer
WHERE T2~ATINN = i_ICUSTOMER-ATINN AND "see change
T3~SPRAS = 'EN' AND
T3~ADZHL = '0' .
endif. "see change
 
loop at i_icustomer.
read table itab_icusomer with key ATTIN = I_ICUSTOMER-ATTIN . "see KEY field 
"update here atinn and atwtb
 
WA_ICUSTOMER-atinn = wa_ICAWN-atinn. "modify here
WA_ICUSTOMER-atwtb = wa_ICAWN-atwtb. "moify here
MODIFY I_ICUSTOMER transporting atinn atwtb.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For details refer ur thread :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="423764"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jogdand M B&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2007 10:51:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-improve-performance-of-code/m-p/2346091#M517514</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-12T10:51:08Z</dc:date>
    </item>
  </channel>
</rss>

