AND (cityfrom = ‘FRANKFURT’ OR

city from = ‘NEWYORK’)

Use

SELECT * FROM spfli WHERE (carrid = ‘LH’ AND cityfrom = ‘FRANKFURT’)

OR (carrid = ‘LH’ AND cityfrom = ‘NEWYORK’).

20. ORDER BY will bypass buffer. So, performance will decrease. If you want to sort data, it is efficient to SORT them in an internal table rather than using ORDER BY. Only use an ORDER BY in your SELECT if the order matches the index, which should be used.

21. Whenever it is possible use APPEND LINES OF to append the internal Tables instead of using loop and then APPEND Statement.

22. Use DELETE WHERE…for deleting records from an internal table.

e.g.

Instead of

LOOP AT WHERE = ‘0001’

DELETE .

ENDLOOP.

Use

DELETE WHERE = ‘0001’.

23. Use WHERE clause in LOOP…….ENDLOOP

Use:Loop at itab where name EQ SY-UNAME

.. .

Endloop.

Instead Of:

Loop at itab from l_tabix.

If name = SY-UNAME.

Endif.

Endloop.

24. For good modularization, the decision of whether or not to execute a subroutine should be made before the subroutine is called.

25. If the number of entries in the Internal Table is high then use Hashed Table with Keys to access the table.

26. With READ or MODIFY Statements use TRANSPORTING and specify the fields being transported.

27. In order to improve performance in case of an LDB, individual tables can be excluded from selection. Under the section ‘Table Selection’ in the Documentation of LDB the fields with proper description has been given those fields can be set in the application report at the time of INITIALIZATION or at the START OF SELECTION. This can enhance the performance.

                                                                                                                                                           pg-3