Shared Top Border

Enterprise Resource
Planning Portal

 

Advertise | Founder BLOG

ERPGenie.COM ABAP Tips and Tricks Database

THE ultimate
ERP website

 

Forums | Vote for us |

Google    Other Search Options

Home arrow Tips and Tricks arrow ABAP Reports arrow SELECT Statement
SELECT Statement PDF Print E-mail
User Rating: / 0
PoorBest 
Written by Anon.   
Friday, 09 March 2007
Regardless of the various options associated with the SELECT statement the following guidelines--and some are restatements of coding/DDIC standards--must be kept in mind when coding a SELECT in an ABAP custom report program:
  1. When using the SELECT statement, specify as many conditions for the (key) fields using the WHERE clause as possible.  It is important to keep the order of the fields used the same as in the table (or index), starting with the first key field.
  2. Always specify your conditions in the WHERE (or LIKE) clause instead of checking them yourself with CHECK statements. The database system can then use an index (if possible) and the network load is considerably less.
  3. When the full key is available code for the SELECT SINGLE statement. This method is the most efficient way of checking for existence of at least one valid selection if the complete primary key is provided otherwise the recommended alternative is using the UP TO 1 ROWS option.
  4. Avoid using the SELECT…ENDSELECT.  Replace it with SELECT INTO an internal table.
  5. Do not use the ORDER BY or GROUP BY, unless there is an index for the fields used.  Instead read into an internal table and sort / compute in the application server.
  6. Be aware that complex WHERE conditions for pool and cluster tables usually cannot be passed to the database management system, therefore they are processed by the SAP database interface through post-selection.
  7. If you want to find the maximum, minimum, sum, average value or the count of rows for a database column, use a select list with aggregate functions instead of computing the aggregates yourself.

Related Items:

 
< Prev   Next >

Google Search

Google Ads

Shared Bottom Border

Contact Us | Polls | Add URL | Contribute | Privacy | Terms | Feedback

Discussion Forum | BLOG | Consultants: Post your resume | Companies: Advertise on ERPGenie.COM | Post Job
Financials Consultant | Consultant Review | Gallia Consulting | Supply Chain Project | SAP Financials Forum
GenieHoldings.COM, Inc. | Genie Press | WorkflowGenie | ESAGenie | ERPTopSites | ABAP Tips and Tricks | SAP Solutions Database

EDIGenie | Searching Survivor