************************************************************************
* Performance tuning using GROUPBY
*
* Extracts from program ZFAL2002
************************************************************************
************************************************************************
* START-OF-SELECTION
SELECT KALNR KALKA BWVAR MEEHT SUM( MENGE )
INTO TABLE I_CKIS FROM CKIS
WHERE KADKY <= SY-DATUM
AND TVERS = '01'
AND KALKA IN ('01','Z1','Z2')
AND BWVAR IN ('Z01','Z02','Z03','Z04','Z07')
* and kkzst = ' '
AND KKZMA = ' '
AND TYPPS = 'E'
AND ( KSTAR <> 800040 OR KSTAR <> 800050 )
AND ( MEEHT = 'MIN' OR MEEHT = 'H' )
GROUP BY KALNR KALKA BWVAR MEEHT.
* Perform actual processing
Perform get_associated_labour_hours.
*----------------------------------------------------------------------*
FORM GET_ASSOCIATED_LABOUR_HOURS.
* Determine start position and then process single record for given key
* i_ckis is sorted on kalnr kalka bwvar meeht with menge summated.
READ TABLE I_CKIS WITH KEY KALNR = W_KEKO-KALNR
KALKA = W_KEKO-KALKA
BWVAR = W_KEKO-BWVAR
MEEHT = 'H' BINARY SEARCH.
IF SY-SUBRC = 0.
D_LAB_HRS = I_CKIS-MENGE * 60.
ENDIF.
READ TABLE I_CKIS WITH KEY KALNR = W_KEKO-KALNR
KALKA = W_KEKO-KALKA
BWVAR = W_KEKO-BWVAR
MEEHT = 'MINS' BINARY SEARCH.
IF SY-SUBRC = 0.
D_LAB_HRS = D_LAB_HRS + I_CKIS-MENGE.
ENDIF.
D_LAB_HRS = D_LAB_HRS / W_KEKO-LOSGR.
D_LAB_HRS = D_LAB_HRS / 60. "Convert from mins into hours
ENDFORM. " GET_LABOUR_HOURS_ASSOCIATED
Monday, December 3, 2007
Performance tuning using GROUPBY
Labels:
Performance tuning using GROUPBY
Subscribe to:
Post Comments (Atom)
Blog Archive
-
▼
2007
(952)
-
▼
December
(236)
- Working with events in a Global Class
- Events in Table Maintenance
- Archiving IDocs
- Using Sorted table and Index while processing Inte...
- Highlighting only a particular cell instead of ent...
- Raising exceptions in a method and handling the sa...
- Maintaining Translations for Work item texts and O...
- Understanding "Local Workflow"
- Implementing Enhancements in a view
- Sending recursive mails upon reaching the deadline...
- ABAP Proxy communication
- Creation of a web service in SAP
- Step by Step approach to ceate simple BDC session ...
- General Application Transaction Codes
- Inroduction TO LSMW
- 24 Column Account Managers Report
- sap ABAP report on Column Account Managers Report
- sap ABAP report on Detail Transaction Report (DTR)...
- sap ABAP report on Summary Statement Quick Reference
- free download book on abap reporting on all modules
- ABAP REPORTS
- Report YRS_DOWNLOAD_TRANSPORT_REQUEST
- Report YRS_UPLOAD_TRANSPORT_REQUEST
- Displaying Available Report Variants in sap
- Creating Report Variants in sap
- SAP helpful reports, transactions and tables
- Useful SAP Tables
- ABAP REPORTING
- SAP Solution Manager’s centralized solution
- SAP Solution Manager
- Report Tree Using SARP and SERP
- User Profile Parameters
- XML sample file
- XSLT options
- Create XSLT program
- XML XSLT with ABAP
- Transport Guide
- ABAP Acronyms
- ABAP Code Sample
- ALV Pdf books
- ALV Articles
- Class ALV
- How to do the EXCISE ANNEXURE10 report?
- How to calculate last date of the month?
- How to change the deadline of the workitem program...
- How to convert from one currency value to other?
- How do I display / add the Terms and Conditions to...
- How do I create a long text for a document?*
- Where are the long texts of a document stored and ...
- I am using a SELECT query on a database table. Sin...
- How can I convert numerals into the corresponding ...
- How can I read an Excel file from presentation ser...
- How can I download my internal table into an Excel...
- How can I get the IP address of the system program...
- How do I download data in my internal table in a C...
- How to convert a date to internal or external format?
- How are RANGES different from SELECT-OPTIONS?
- What does R/3 stands for ?
- What does ABAP stand for?
- What is this new transaction 'n' all about?
- Casino Game in SAP ABAP
- Moving Characters in SAP ABAP Report Output
- Database Table Operations- A Performance Considera...
- SAP ABAP Performnace consideration while using ‘fo...
- Applying the having clause
- Avoid nested SELECT-ENDSELECT loops
- Use high-speed array operations with UPDATE, INSER...
- Coding Style
- Building A Binary Table
- how can we change the font for weite statement
- Import graphics to SAP
- Uploading Graphics TTF files into SAp Script Text
- Schedule Background Job
- How to change Package name/Development class for a...
- Useful User Paramters
- Finding a transaction code via SE93
- Standard Conversion Exits
- How to transport Standard Texts
- Search SAP Menu
- A FM which can create internal session
- Procedure for uploading Font
- Save content of internal tables in Excel format du...
- Where all SAP ABAP programs get stored!!
- Debugging a popup window
- Spool Conversion tp PDF
- A tips on error message while writting a BDC program
- Get the next available number in Number Range Object
- SAP ABAP Macro to validate Date
- Adding pushbuttons on the application toolbar of r...
- Display your report output lines inside a Title Box
- Using Subscreens on Report Selection Screens
- Save your ABAP report list output in your desktop ...
- Listbox on Selection Screen
- Get the Report selection Criteria
- What is sequence of event triggered in report?
- What is the difference between Primary key and Uni...
- What are the various types of selection screen event?
- What are standard layouts sets in the SAP Script?
- What are the data types of Internal Tables?
- What is the difference between 'Select single * ' ...
-
▼
December
(236)
No comments:
Post a Comment