<?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 problem in smartform(abap) in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-problem-in-smartform-abap/m-p/1764897#M330860</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you'll find that if you follow Max's example, the database percentage will actually go up!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But this is because his code is more efficient on the non-database portion of the program. It will eliminate a lot of network traffic between the database and the application&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My point is that looking at the database percentage doesn't really tell you much. A program that retrieves a lot of data but doesn't manipulate it will naturally have a high database percentage. One that doesn't get much data but processes heavily what it does get will have a lower database percentage.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The important things to keep in mind are to use an index (which you are already doing) and avoid nested loops (which doesn't apply here).&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, 21 Dec 2006 20:11:21 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-12-21T20:11:21Z</dc:date>
    <item>
      <title>Performance problem in smartform(abap)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-problem-in-smartform-abap/m-p/1764895#M330858</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI floks &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i did some development in new smartform its working fine but i have issue in data base performance is 76% . but i utilize similar below code with various conditions in various 12 places . is it possible to reduce performance this type of code . check it and mail me how can i do it . if possible can suggest me fast .how much % is best for this type of performance issues.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : BEGIN OF ITVBRPC OCCURS 0,&lt;/P&gt;&lt;P&gt;       LV_POSNR LIKE VBRP-POSNR,&lt;/P&gt;&lt;P&gt;       END OF ITVBRPC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : BEGIN OF ITKONVC OCCURS 0,&lt;/P&gt;&lt;P&gt;        LV_KNUMH LIKE KONV-KNUMH,&lt;/P&gt;&lt;P&gt;        LV_KSCHL LIKE KONV-KSCHL,&lt;/P&gt;&lt;P&gt;       END OF ITKONVC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:  BEGIN OF ITKONHC OCCURS 0,&lt;/P&gt;&lt;P&gt;       LV_KNUMH LIKE KONH-KNUMH,&lt;/P&gt;&lt;P&gt;       LV_KSCHL LIKE KONH-KSCHL,&lt;/P&gt;&lt;P&gt;       LV_KZUST LIKE KONH-KZUST,&lt;/P&gt;&lt;P&gt;       END OF ITKONHC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF ITKONVC1 OCCURS 0,&lt;/P&gt;&lt;P&gt;       LV_KWERT LIKE KONV-KWERT,&lt;/P&gt;&lt;P&gt;       END OF ITKONVC1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA :  BEGIN OF ITCALCC OCCURS 0,&lt;/P&gt;&lt;P&gt;       LV_KWERT LIKE KONV-KWERT,&lt;/P&gt;&lt;P&gt;       END OF ITCALCC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: COUNTC(3) TYPE n,&lt;/P&gt;&lt;P&gt;       TOTALC LIKE KONV-KWERT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT POSNR FROM VBRP INTO ITVBRPC&lt;/P&gt;&lt;P&gt;  WHERE VBELN = INV_HEADER-VBELN AND ARKTX = WA_INVDATA-ARKTX .&lt;/P&gt;&lt;P&gt;APPEND ITVBRPC.&lt;/P&gt;&lt;P&gt;ENDSELECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT ITVBRPC.&lt;/P&gt;&lt;P&gt;SELECT KNUMH KSCHL FROM KONV INTO ITKONVC WHERE KNUMV =&lt;/P&gt;&lt;P&gt;LV_VBRK-KNUMV AND KPOSN = ITVBRPC-LV_POSNR AND KSCHL = 'ZLAC'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND ITKONVC.&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;SORT ITKONVC BY LV_KNUMH.&lt;/P&gt;&lt;P&gt;DELETE ADJACENT DUPLICATES FROM ITKONVC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT ITKONVC.&lt;/P&gt;&lt;P&gt;SELECT KNUMH KSCHL KZUST FROM KONH INTO ITKONHC WHERE KNUMH = ITKONVC-LV_KNUMH AND KSCHL = 'ZLAC' AND KZUST = 'Z02'.&lt;/P&gt;&lt;P&gt;APPEND ITKONHC.&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 ITKONHC.&lt;/P&gt;&lt;P&gt;SELECT KWERT FROM KONV INTO ITKONVC1 WHERE KNUMH = ITKONHC-LV_KNUMH AND&lt;/P&gt;&lt;P&gt;KSCHL = ITKONHC-LV_KSCHL AND KNUMV = LV_VBRK-KNUMV.&lt;/P&gt;&lt;P&gt;MOVE ITKONVC1-LV_KWERT TO ITCALCC-LV_KWERT.&lt;/P&gt;&lt;P&gt;APPEND ITCALCC.&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 ITCALCC.&lt;/P&gt;&lt;P&gt; COUNTC = COUNTC + 1.&lt;/P&gt;&lt;P&gt; TOTALC = TOTALC + ITCALCC-LV_KWERT.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MOVE ITKONHC-LV_KSCHL TO LV_CKSCHL.&lt;/P&gt;&lt;P&gt;MOVE TOTALC TO LV_CKWERT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it's urgent ..........&lt;/P&gt;&lt;P&gt;thanks .&lt;/P&gt;&lt;P&gt;bbbbye&lt;/P&gt;&lt;P&gt;suresh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Dec 2006 19:21:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-problem-in-smartform-abap/m-p/1764895#M330858</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-21T19:21:40Z</dc:date>
    </item>
    <item>
      <title>Re: Performance problem in smartform(abap)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-problem-in-smartform-abap/m-p/1764896#M330859</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;U can use for all entries instead of to insert the select statament into loop:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT POSNR FROM VBRP INTO TABLE ITVBRPC
            WHERE VBELN = INV_HEADER-VBELN 
              AND ARKTX = WA_INVDATA-ARKTX .

IF SY-SUBRC = 0.
  SELECT KNUMH KSCHL FROM KONV INTO TABLE ITKONVC
    FOR ALL ENTRIES IN  ITVBRPC 
         WHERE KNUMV = LV_VBRK-KNUMV 
           AND KPOSN = ITVBRPC-LV_POSNR 
           AND KSCHL = 'ZLAC'.
  
  SELECT KNUMH KSCHL KZUST FROM KONH INTO TABLE ITKONHC
          FOR ALL ENTRIES ITKONVC
                WHERE KNUMH = ITKONVC-LV_KNUMH 
                  AND KSCHL = 'ZLAC' AND KZUST = 'Z02'.
  IF SY-SUBRC = 0.
   SELECT KWERT FROM KONV INTO TABLE ITCALCC 
          FOR ALL ENTRIES ITKONHC
                  WHERE KNUMV = LV_VBRK-KNUMV
                    AND KSCHL = ITKONHC-LV_KSCHL 
                    AND KNUMH = ITKONHC-LV_KNUMH. 

   ENDIF.
 ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Dec 2006 19:25:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-problem-in-smartform-abap/m-p/1764896#M330859</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-21T19:25:43Z</dc:date>
    </item>
    <item>
      <title>Re: Performance problem in smartform(abap)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-problem-in-smartform-abap/m-p/1764897#M330860</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you'll find that if you follow Max's example, the database percentage will actually go up!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But this is because his code is more efficient on the non-database portion of the program. It will eliminate a lot of network traffic between the database and the application&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My point is that looking at the database percentage doesn't really tell you much. A program that retrieves a lot of data but doesn't manipulate it will naturally have a high database percentage. One that doesn't get much data but processes heavily what it does get will have a lower database percentage.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The important things to keep in mind are to use an index (which you are already doing) and avoid nested loops (which doesn't apply here).&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, 21 Dec 2006 20:11:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-problem-in-smartform-abap/m-p/1764897#M330860</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-21T20:11:21Z</dc:date>
    </item>
    <item>
      <title>Re: Performance problem in smartform(abap)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-problem-in-smartform-abap/m-p/1764898#M330861</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;u can use INTO TABLE instead of INTO &amp;amp; ENDSELECTION.&lt;/P&gt;&lt;P&gt;u can use FOR ALL ENTRIES instead of LOOPS &amp;amp; NESTED LOOPS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REGDS&lt;/P&gt;&lt;P&gt;KIRAN&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Dec 2006 08:05:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-problem-in-smartform-abap/m-p/1764898#M330861</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-27T08:05:36Z</dc:date>
    </item>
  </channel>
</rss>

