‎2008 Mar 28 12:32 PM
Hi experts,
i have a program tht is taking long time due to performance issue.
pls let me know bout the factors tht affects the performance of the reports
ASAP
regards
mahammad
‎2008 Mar 28 12:34 PM
‎2008 Mar 28 12:43 PM
Hi,
Some of the tips to improve the Performance of a Program.
1. Avoid using SELECT...ENDSELECT...or SELECT *. Construct and use SELECT ... INTO TABLE.
2. Use FOR ALL ENTRIES in your SELECT statement to retrieve the matching records at one shot. And dont forget to check if the internal table is empty before you use For All Entries statement.
3 Avoid using nested SELECT statement, SELECT within LOOPs.
4. Try not to use INTO CORRESPONDING FIELDS OF TABLE. Instead use INTO TABLE.
5. Dont use nested loops when working with large internal tables.
6. Whenever using READ TABLE use BINARY SEARCH addition to speed up the search. Be sure to sort the internal table before binary search. This is a general thumb rule but typically if you are sure that the data in internal table is less than 200 entries you need not do SORT and use BINARY SEARCH since this is an overhead in performance.
7. Use "CHECK" instead of IF/ENDIF whenever possible.
8.. Use "CASE" instead of IF/ENDIF whenever possible.
9. Use "MOVE" with individual variable/field moves instead of "MOVE-
CORRESPONDING".
10. You can use the transaction SE30 and use the examples and check your code if you have any further doubts.
Reward if useful.
Regards,
Adapala.
‎2008 Mar 28 12:43 PM
Hi,
To troubleshoot performance, you need these tcode tools:-
ST04 Database ß in here, check especially for Expensive SQLs (Detail Analysis à SQL Request)
ST02 SAP buffers
ST06 OS stats
ST05 SQL trace
SE30 Abap runtime analysis
A few step which you can exercise to sort/identify performance issues.
ST03, ST02, ST04 are the tcode for workload, tuning and DB Performance Monitoring codes.
ST06 FOR Operation System Monitoring.
SM51 OR SM50 is process overview which tells you the workprocess sequence. ( Ideally 10-15 process with OLTP and batch process scheduled at peak and off peak times respectively) say 8-17 hrs and 17-8 hrs for Batch Process)
Operation Mode can be configured in RZ04 tcode.
Check for top CPU in ST06 tcode. CPU should not exceed more than 60% for long time for any process.
Based of No. of instances ( Application Servers ) should have adequately sized.
Most resources intensive process have to be scheduled in Batch Process ( in Background in Non Peak Hours )
Look for unnecessary Jobs Active During Prime Time
Look for Parameters Set To Your Business Process.
( RZ10, RZ11 ) Check Snote:0124361
Hope this helps.
Regards
Sourabh Verma
‎2008 Mar 28 12:49 PM
Hello Hussain,
<b>Simply follow these three anf get benifit from them.</b>
Check code if there is any select statements in side loop or nested select then remove from loop and try to increase program performance.
If you want to reduce the execution time of a report.
1. use For all entries instead of using Joins.
2. use select f1 f2 from table into table itab.
instead of select * from table into corresponding fields.
3. perform sorting.
*********Reward points ,if found useful