Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

performance

Former Member
0 Likes
530

Hi,

how to increse performance of an object

4 REPLIES 4
Read only

Former Member
0 Likes
513

Hi,

Which object?

If you are talking about reports then there are lots of ground rules

such as

No LOOPS into LOOPS

No select statements in LOOPS

No select without proper where clause

and lots like this

You can use the transaction ST05, etc standard SAP tools to check the performance of the code.

Reward points if useful.

Regards,

Atish

Read only

Former Member
0 Likes
513

Hi Muni,

1 Always check the driver internal tables is not empty, while using FOR ALL ENTRIES

2 Avoid for all entries in JOINS

3 Try to avoid joins and use FOR ALL ENTRIES.

4 Try to restrict the joins to 1 level only ie only for 2 tables

5 Avoid using Select *.

6 Avoid having multiple Selects from the same table in the same object.

7 Try to minimize the number of variables to save memory.

8 The sequence of fields in 'where clause' must be as per primary/secondary index ( if any)

9 Avoid creation of index as far as possible

10 Avoid operators like <>, > , < & like % in where clause conditions

11 Avoid select/select single statements in loops.

12 Try to use 'binary search' in READ internal table. Ensure table is sorted before using BINARY SEARCH.

13 Avoid using aggregate functions (SUM, MAX etc) in selects ( GROUP BY , HAVING,)

14 Avoid using ORDER BY in selects

15 Avoid Nested Selects

16 Avoid Nested Loops of Internal Tables

17 Try to use FIELD SYMBOLS.

18 Try to avoid into Corresponding Fields of

19 Avoid using Select Distinct, Use DELETE ADJACENT.

To clarify the following doubts:

1. Suppose if we are in 3rd list and want to jump to 8th list, how is it possible?

You can try SY-LSIND.

2. What exactly the statement "select for all entries" mean?

You can only use FOR ALL ENTRIES IN ...WHERE ...in a SELECT statement.

SELECT ... FOR ALL ENTRIES IN itab WHERE cond returns the union of the solution sets of all SELECT

statements that would result if you wrote a separate statement for each line of the internal table replacing the symbol

itab-f with the corresponding value of component f in the WHERE condition.Duplicates are discarded from the result

set. If the internal table itab does not contain any entries, the system treats the statement as though there were

no WHERE cond condition, and selects all records (in the current client).

for example:

SELECT * FROM sflight INTO wa_sflight

FOR ALL ENTRIES IN ftab

WHERE CARRID = ftab-carrid AND

CONNID = ftab-connid AND

fldate = '20010228'.

this condition, return all entries of the sflight

3. Is it possible to create a table without the data element?

Yes, there is option of direct type in se11.

4. Suppose in selection screen if we provide two values for the fields then how to populate the other fields?

You can go for select option, there you can choose low and high values.

5. How to send the sap-script in pdf format thru email?

It is automatically converted to PDF once the Basis people have the auto conversion rules configured.

6. How many selection-screens does a report have?

Any number of selction screen can be there

Rashi Agnihotri

You haven't provided us with many information about your problem.

Anyway a few tips you can use:

1. restrict the the fields retrieved by your select sentences to the minimal set. (avoid select *)

2. try to use specify where clause so the abap sql optimizer chooses the right index.

3. avoid sentences like select lifnr name1 into corresponding fields of lfa1 from lfa1 where ....

(you should declare a working area and select into the working area, is twice faster)

4. use hashed tables instead of standard tables. They are faster.

5. Avoid the use of collect as much as you can.

Performance tuning for Data Selection Statement

http://www.sap-img.com/abap/performance-tuning-for-data-selection-statement.htm

Debugger

http://help.sap.com/saphelp_47x200/helpdata/en/c6/617ca9e68c11d2b2ab080009b43351/content.htm

http://www.cba.nau.edu/haney-j/CIS497/Assignments/Debugging.doc

http://help.sap.com/saphelp_erp2005/helpdata/en/b3/d322540c3beb4ba53795784eebb680/frameset.htm

Run Time Analyser

http://help.sap.com/saphelp_47x200/helpdata/en/c6/617cafe68c11d2b2ab080009b43351/content.htm

SQL trace

http://help.sap.com/saphelp_47x200/helpdata/en/d1/801f7c454211d189710000e8322d00/content.htm

CATT - Computer Aided Testing Too

http://help.sap.com/saphelp_47x200/helpdata/en/b3/410b37233f7c6fe10000009b38f936/frameset.htm

Test Workbench

http://help.sap.com/saphelp_47x200/helpdata/en/a8/157235d0fa8742e10000009b38f889/frameset.htm

Coverage Analyser

http://help.sap.com/saphelp_47x200/helpdata/en/c7/af9a79061a11d4b3d4080009b43351/content.htm

Runtime Monitor

http://help.sap.com/saphelp_47x200/helpdata/en/b5/fa121cc15911d5993d00508b6b8b11/content.htm

Memory Inspector

http://help.sap.com/saphelp_47x200/helpdata/en/a2/e5fc84cc87964cb2c29f584152d74e/content.htm

ECATT - Extended Computer Aided testing tool.

http://help.sap.com/saphelp_47x200/helpdata/en/20/e81c3b84e65e7be10000000a11402f/frameset.htm

Just refer to these links...

Reward Points if it is helpful

Thanks

Seshu

Read only

Former Member
0 Likes
513
Read only

Former Member
0 Likes
513

A few tips you can use for finetuning a Report

1) Use mostly primary key to access data.

2) before READ u sort the itab

3) use mostly the indexes fields in ur where clause.

4) restrict the the fields retrieved by your select sentences to the minimal set. (avoid select *)

5) try to use specify where clause so the abap sql optimizer chooses the right index.

6) avoid sentences like select lifnr name1 into corresponding fields of lfa1 from lfa1 where ....

(you should declare a working area and select into the working area, is twice faster)

7) use hashed tables instead of standard tables. They are faster.

😎 Avoid the use of collect as much as you can.

******************************************************

1 Always check the driver internal tables is not empty , while using FOR ALL ENTRIES

2 Avoid for all entries in JOINS

3 Try to avoid joins and use FOR ALL ENTRIES.

4 Try to restrict the joins to 1 level only ie only for 2 tables

5 Avoid using Select *.

6 Avoid having multiple Selects from the same table in the same object.

7 Try to minimize the number of variables to save memory.

8 The sequence of fields in 'where clause' must be as per primary/secondary index ( if any)

9 Avoid creation of index as far as possible

10 Avoid operators like <>, > , < & like % in where clause conditions

11 Avoid select/select single statements in loops.

12 Try to use 'binary search' in READ internal table. Ensure table is sorted before using BINARY SEARCH.

13 Avoid using aggregate functions (SUM, MAX etc) in selects ( GROUP BY , HAVING,)

14 Avoid using ORDER BY in selects

15 Avoid Nested Selects

16 Avoid Nested Loops of Internal Tables

17 Try to use FIELD SYMBOLS.

18 Try to avoid into Corresponding Fields of

19 Avoid using Select Distinct , Use DELETE ADJACENT.

Need ur reward points if its useful

Regards

ravi