<?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: bad performance in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bad-performance/m-p/12246777#M1985748</link>
    <description>&lt;P&gt;Try not to SHOUT. (I.e. please use mixed case). &lt;/P&gt;&lt;P&gt;As an ABAP beginner you should not be using PERFORMs and FORMs, you should be uses classes and methods. FORMs are obsolete, and are not to be used in the new programs.&lt;/P&gt;</description>
    <pubDate>Tue, 17 Nov 2020 06:32:10 GMT</pubDate>
    <dc:creator>matt</dc:creator>
    <dc:date>2020-11-17T06:32:10Z</dc:date>
    <item>
      <title>bad performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bad-performance/m-p/12246767#M1985738</link>
      <description>&lt;P&gt;how can i improve the performance &lt;BR /&gt;TYPE-POOLS SLIS.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;*TABLES :MARA,MARC,MAKT,T001W,T023T.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;DATA : BEGIN OF I_MARA ,&lt;BR /&gt; MATNR LIKE MARA-MATNR,&lt;BR /&gt; MATKL LIKE MARA-MATKL,&lt;BR /&gt; MAKTX LIKE MAKT-MAKTX,&lt;BR /&gt; SPRAS LIKE MAKT-SPRAS,&lt;BR /&gt; WGBEZ LIKE T023T-WGBEZ,&lt;BR /&gt; END OF I_MARA .&lt;BR /&gt;DATA : IT_MARA LIKE TABLE OF I_MARA .&lt;BR /&gt;DATA : BEGIN OF I_MARC ,&lt;BR /&gt; MATNR LIKE MARA-MATNR,&lt;BR /&gt; WERKS LIKE MARC-WERKS,&lt;BR /&gt; NAME1 LIKE T001W-NAME1,&lt;BR /&gt; SPRAS LIKE T001W-SPRAS,&lt;BR /&gt; END OF I_MARC.&lt;BR /&gt;DATA : IT_MARC LIKE STANDARD TABLE OF I_MARC .&lt;BR /&gt;&lt;BR /&gt;DATA: BEGIN OF I_MARAFINAL ,&lt;BR /&gt; MATNR LIKE MARA-MATNR,&lt;BR /&gt; MAKTX LIKE MAKT-MAKTX,&lt;BR /&gt; WERKS LIKE MARC-WERKS,&lt;BR /&gt; NAME1 LIKE T001W-NAME1,&lt;BR /&gt; MATKL LIKE MARA-MATKL,&lt;BR /&gt; WGBEZ LIKE T023T-WGBEZ,&lt;BR /&gt; END OF I_MARAFINAL.&lt;BR /&gt;DATA : IT_MARAFINAL LIKE TABLE OF I_MARAFINAL .&lt;BR /&gt;&lt;BR /&gt;DATA : IT_FCAT TYPE SLIS_T_FIELDCAT_ALV .&lt;BR /&gt;DATA : WA_FCAT TYPE SLIS_FIELDCAT_ALV.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;SELECT-OPTIONS : S_MATNR FOR I_MARA-MATNR.&lt;BR /&gt;SELECT-OPTIONS : S_WERKS FOR I_MARC-WERKS.&lt;BR /&gt;SELECT-OPTIONS : S_MATKL FOR I_MARA-MATKL.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;START-OF-SELECTION.&lt;BR /&gt; PERFORM GET_DATA.&lt;BR /&gt; PERFORM VALIDATE_FCAT.&lt;BR /&gt;&lt;BR /&gt;END-OF-SELECTION.&lt;BR /&gt; PERFORM DISPLAY_ALV.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;FORM GET_DATA.&lt;BR /&gt; CLEAR IT_MARAFINAL.&lt;BR /&gt; SELECT MARA~MATNR MARA~MATKL&lt;BR /&gt; MAKT~MAKTX MAKT~SPRAS&lt;BR /&gt; T023T~WGBEZ&lt;BR /&gt; INTO TABLE IT_MARA&lt;BR /&gt; FROM MARA&lt;BR /&gt; INNER JOIN MAKT ON MARA~MATNR = MAKT~MATNR&lt;BR /&gt; INNER JOIN T023T ON MARA~MATKL = T023T~MATKL&lt;BR /&gt; AND MAKT~SPRAS = T023T~SPRAS&lt;BR /&gt; WHERE MARA~MATNR IN S_MATNR&lt;BR /&gt; AND MARA~MATKL IN S_MATKL .&lt;BR /&gt;&lt;BR /&gt; SELECT MARC~MATNR MARC~WERKS&lt;BR /&gt; T001W~NAME1 T001W~SPRAS&lt;BR /&gt; INTO TABLE IT_MARC&lt;BR /&gt; FROM MARC&lt;BR /&gt; INNER JOIN T001W ON MARC~WERKS = T001W~WERKS&lt;BR /&gt; FOR ALL ENTRIES IN IT_MARA&lt;BR /&gt; WHERE MATNR = IT_MARA-MATNR&lt;BR /&gt; AND SPRAS = IT_MARA-SPRAS&lt;BR /&gt; AND MARC~WERKS IN S_WERKS .&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; LOOP AT IT_MARC INTO I_MARC .&lt;BR /&gt; READ TABLE IT_MARA INTO I_MARA WITH KEY MATNR = I_MARC-MATNR&lt;BR /&gt; SPRAS = I_MARC-SPRAS .&lt;BR /&gt;&lt;BR /&gt; IF sy-subrc = 0.&lt;BR /&gt;&lt;BR /&gt; I_MARAFINAL-MATNR = I_MARA-MATNR.&lt;BR /&gt; I_MARAFINAL-MAKTX = I_MARA-MAKTX.&lt;BR /&gt; I_MARAFINAL-WERKS = I_MARC-WERKS.&lt;BR /&gt; I_MARAFINAL-NAME1 = I_MARC-NAME1.&lt;BR /&gt; I_MARAFINAL-MATKL = I_MARA-MATKL.&lt;BR /&gt; I_MARAFINAL-WGBEZ = I_MARA-WGBEZ.&lt;BR /&gt; APPEND I_MARAFINAL TO IT_MARAFINAL.&lt;BR /&gt;&lt;BR /&gt; ENDIF.&lt;BR /&gt;* CLEAR IT_MARAFINAL.&lt;BR /&gt;&lt;BR /&gt; ENDLOOP.&lt;BR /&gt;ENDFORM.&lt;BR /&gt;&lt;BR /&gt;FORM DISPLAY_ALV.&lt;BR /&gt; CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'&lt;BR /&gt; EXPORTING&lt;BR /&gt; I_CALLBACK_PROGRAM = SY-REPID&lt;BR /&gt; IT_FIELDCAT = IT_FCAT&lt;BR /&gt; TABLES&lt;BR /&gt; T_OUTTAB = IT_MARAFINAL.&lt;BR /&gt;ENDFORM.&lt;BR /&gt;&lt;BR /&gt;FORM VALIDATE_FCAT.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Nov 2020 10:36:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bad-performance/m-p/12246767#M1985738</guid>
      <dc:creator>former_member713390</dc:creator>
      <dc:date>2020-11-16T10:36:24Z</dc:date>
    </item>
    <item>
      <title>Re: bad performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bad-performance/m-p/12246768#M1985739</link>
      <description>&lt;P&gt;Hi and welcome to
the SAP Community!&lt;/P&gt;&lt;P&gt;Thank
you for visiting SAP Community to get answers to your questions. Since you're
asking a question here for the first time, I recommend that you familiarize
yourself with &lt;A href="https://community.sap.com/resources/questions-and-answers"&gt;https://community.sap.com/resources/questions-and-answers&lt;/A&gt;
(if you haven't already), as it provides tips for preparing questions that draw
responses from our members. For example, you can outline what steps you took to
find answers (and why they weren't helpful). The more details you provide, the
more likely it is that members will be able to assist you. Should you wish, you
can revise your question by selecting Actions, then Edit (although once someone
answers your question, you'll lose the ability to edit the question -- but if
that happens, you can leave more details in a comment). Finally, if you're
hoping to connect with readers, please consider adding a picture to your
profile. Here's how you do it: &lt;A href="https://www.youtube.com/watch?v=F5JdUbyjfMA&amp;amp;list=PLpQebylHrdh5s3gwy-h6RtymfDpoz3vDS"&gt;https://www.youtube.com/watch?v=F5JdUbyjfMA&amp;amp;list=PLpQebylHrdh5s3gwy-h6RtymfDpoz3vDS&lt;/A&gt;.
By personalizing your profile with a photo of you, you encourage readers to
respond.&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Julia
SAP Community Moderator&lt;/P&gt;</description>
      <pubDate>Mon, 16 Nov 2020 10:36:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bad-performance/m-p/12246768#M1985739</guid>
      <dc:creator>former_member30</dc:creator>
      <dc:date>2020-11-16T10:36:33Z</dc:date>
    </item>
    <item>
      <title>Re: bad performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bad-performance/m-p/12246769#M1985740</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;to get the time-consuming parts of your program I suggest to start a trace in ST12 for it. &lt;/P&gt;&lt;P&gt;On a very first glance I recommend to define the table IT_MARA as sorted table with key components MATNR and SPRAS. With the current definition the READ TABLE has to iterate over the complete table for every record in table IT_MARC.&lt;/P&gt;&lt;P&gt;Alternatively you can sort IT_MARA by these fields and add a "BINARY SEARCH" to the READ TABLE statement. &lt;/P&gt;</description>
      <pubDate>Mon, 16 Nov 2020 11:14:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bad-performance/m-p/12246769#M1985740</guid>
      <dc:creator>jens_hoetger</dc:creator>
      <dc:date>2020-11-16T11:14:09Z</dc:date>
    </item>
    <item>
      <title>Re: bad performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bad-performance/m-p/12246770#M1985741</link>
      <description>&lt;P&gt;Inner join with table T023T and T001W is strange for me. you should have very limited data in these tables. You could get the full entries of these tables outside of the SELECT statement, and compose your data from internal tables&lt;/P&gt;</description>
      <pubDate>Mon, 16 Nov 2020 12:26:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bad-performance/m-p/12246770#M1985741</guid>
      <dc:creator>FredericGirod</dc:creator>
      <dc:date>2020-11-16T12:26:17Z</dc:date>
    </item>
    <item>
      <title>Re: bad performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bad-performance/m-p/12246771#M1985742</link>
      <description>&lt;P&gt;Could you add the MARC with a JOIN in the first select and remove the FOR ALL ENTRIES.&lt;/P&gt;&lt;UL&gt;
&lt;LI&gt;You could also remove T001W and T023T from the SELECT and enrich the internal table in a LOOP following the main SELECT. (small buffered tables)&lt;/LI&gt;&lt;LI&gt;Did you execute an Abap or SQL trace of your program?&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Mon, 16 Nov 2020 14:05:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bad-performance/m-p/12246771#M1985742</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2020-11-16T14:05:09Z</dc:date>
    </item>
    <item>
      <title>Re: bad performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bad-performance/m-p/12246772#M1985743</link>
      <description>&lt;P&gt;Hi &lt;SPAN class="mention-scrubbed"&gt;afsane_salehi&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;Instead of inner joins for these table - for all entries are best since all this tables will be having lesser amount of records - but make sure sy-subrc and is not intial checks before performing ALL Entires. &lt;/P&gt;&lt;P&gt;simple read inside loop and load final table through work area.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Nov 2020 17:17:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bad-performance/m-p/12246772#M1985743</guid>
      <dc:creator>Abinathsiva</dc:creator>
      <dc:date>2020-11-16T17:17:54Z</dc:date>
    </item>
    <item>
      <title>Re: bad performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bad-performance/m-p/12246773#M1985744</link>
      <description>&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;But I Dont Want To Remove Any Table I want to Keep All Of Them  And At Ahe Same Time Improve The Performance .&lt;/P&gt;</description>
      <pubDate>Mon, 16 Nov 2020 18:35:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bad-performance/m-p/12246773#M1985744</guid>
      <dc:creator>former_member713390</dc:creator>
      <dc:date>2020-11-16T18:35:49Z</dc:date>
    </item>
    <item>
      <title>Re: bad performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bad-performance/m-p/12246774#M1985745</link>
      <description>&lt;P&gt;Question: Why do you use the SO_WERKS in the SELECT on MARC and not in the SELECT on MARA?&lt;/P&gt;&lt;P&gt;This means that if there are materials that do not exist for the plant(s) you've selected, you're loading them into the application layer for nothing and slowing down the READ TABLE statements as well since there is more data there then needed. &lt;/P&gt;&lt;P&gt;Anyway, what Raymond says! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Nov 2020 19:44:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bad-performance/m-p/12246774#M1985745</guid>
      <dc:creator>Patrick_vN</dc:creator>
      <dc:date>2020-11-16T19:44:07Z</dc:date>
    </item>
    <item>
      <title>Re: bad performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bad-performance/m-p/12246775#M1985746</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;The best way to improve performance is to opt for CDS Views.&lt;/P&gt;&lt;P&gt;Refer:-&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.sap.com/viewer/f2e545608079437ab165c105649b89db/7.5.6/en-US/7c078765ec6d4e6b88b71bdaf8a2bd9f.html" target="test_blank"&gt;https://help.sap.com/viewer/f2e545608079437ab165c105649b89db/7.5.6/en-US/7c078765ec6d4e6b88b71bdaf8a2bd9f.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Tarun Gambhir&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2020 01:57:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bad-performance/m-p/12246775#M1985746</guid>
      <dc:creator>I355602</dc:creator>
      <dc:date>2020-11-17T01:57:46Z</dc:date>
    </item>
    <item>
      <title>Re: bad performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bad-performance/m-p/12246776#M1985747</link>
      <description>&lt;P&gt;First step:&lt;/P&gt;&lt;P&gt;When posting any code, use the CODE button in the editor here.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2020 06:31:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bad-performance/m-p/12246776#M1985747</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2020-11-17T06:31:15Z</dc:date>
    </item>
    <item>
      <title>Re: bad performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bad-performance/m-p/12246777#M1985748</link>
      <description>&lt;P&gt;Try not to SHOUT. (I.e. please use mixed case). &lt;/P&gt;&lt;P&gt;As an ABAP beginner you should not be using PERFORMs and FORMs, you should be uses classes and methods. FORMs are obsolete, and are not to be used in the new programs.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2020 06:32:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bad-performance/m-p/12246777#M1985748</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2020-11-17T06:32:10Z</dc:date>
    </item>
    <item>
      <title>Re: bad performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bad-performance/m-p/12246778#M1985749</link>
      <description>&lt;P&gt;Inner joins are very very rarely worse than FOR ALL ENTRIES. This has been demonstrated time and time again.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2020 06:32:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bad-performance/m-p/12246778#M1985749</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2020-11-17T06:32:52Z</dc:date>
    </item>
    <item>
      <title>Re: bad performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bad-performance/m-p/12246779#M1985750</link>
      <description>&lt;P&gt;Don't use BINARY SEARCH. Use a SORTED table.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2020 09:45:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bad-performance/m-p/12246779#M1985750</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2020-11-17T09:45:45Z</dc:date>
    </item>
    <item>
      <title>Re: bad performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bad-performance/m-p/12246780#M1985751</link>
      <description>&lt;P&gt;You should ask all your questions in the public forum. That way you will get more responses.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2020 09:47:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bad-performance/m-p/12246780#M1985751</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2020-11-17T09:47:09Z</dc:date>
    </item>
    <item>
      <title>Re: bad performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bad-performance/m-p/12246781#M1985752</link>
      <description>&lt;P&gt;I think since the OP is a beginner, perhaps they should master the basics of ABAP before trying CDS views.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2020 09:48:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bad-performance/m-p/12246781#M1985752</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2020-11-17T09:48:07Z</dc:date>
    </item>
    <item>
      <title>Re: bad performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bad-performance/m-p/12246782#M1985753</link>
      <description>&lt;P&gt;@matthew.billingham&lt;/P&gt;&lt;P&gt;Dear &lt;A href="https://answers.sap.com/users/2688/matthew.billingham.html"&gt;Matthew Billingham&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot for your useful instructions.  Unfortunately I couldn't find the public platform. I would appreciate if I can get help from you and ask my questions regarding the problems I may face. 
Best regards&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2020 18:40:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bad-performance/m-p/12246782#M1985753</guid>
      <dc:creator>former_member713390</dc:creator>
      <dc:date>2020-11-17T18:40:07Z</dc:date>
    </item>
    <item>
      <title>Re: bad performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bad-performance/m-p/12246783#M1985754</link>
      <description>&lt;P&gt;Join is usually (much) better than FAE. Adding small (buffered) table in the main SELECT would generally generate more load on the data server than loading (completely, or partially if you have selection criteria in the program) these small tables and then enriching the final table. (use sorted type internal tables and update final table in a single loop)&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 12:18:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bad-performance/m-p/12246783#M1985754</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2020-11-18T12:18:52Z</dc:date>
    </item>
  </channel>
</rss>

