SAP ABAP Data Element /BCV/QRM_AGGR_FUNCTION (Aggregation Function)
Hierarchy
SAP_BS_FND (Software Component) SAP Business Suite Foundation
   CA-EPT-BCV (Application Component) Business Context Viewer
     /BCV/QRM (Package) BCV Query Management Layer
Basic Data
Data Element /BCV/QRM_AGGR_FUNCTION
Short Description Aggregation Function  
Data Type
Category of Dictionary Type D   Domain
Type of Object Referenced     No Information
Domain / Name of Reference Type /BCV/QRM_AGGR_FUNCTION    
Data Type CHAR   Character String 
Length 10    
Decimal Places 0    
Output Length 10    
Value Table      
Further Characteristics
Search Help: Name    
Search Help: Parameters    
Parameter ID   
Default Component name    
Change document    
No Input History    
Basic direction is set to LTR    
No BIDI Filtering    
Field Label
  Length  Field Label  
Short 10 Aggr.Func. 
Medium 15 Aggr. Function 
Long 20 Aggregation Function 
Heading 40 Aggregation Function 
Documentation

Definition

Use

In this field, you specify the aggregation function of the query result field. The system uses this function during the grouping of result fields to determine the value of result fields that are not part of the group definition. The following aggregation functions are available:

  • Minimum Value
    During grouping, the system fills the result fields with the lowest value of this field in the current group.
  • Maximum Value
    During grouping, the system fills the result field with the highest value of this field in the current group.
  • Sum of Values
    During grouping, the system fills the result field with the sum of the values of this field in the current group.
  • Average of Values
    During grouping, the system fills the result field with the average of the values of this field in the current group.
  • Number of Values
    During grouping, the system fills the result field with the number of records in the current group.

Dependencies

You have to enable grouping by setting the Field in Group indicator for at least one result field.

You can use aggregation functions Sum of Values, Average of Values, and Number of Values only for result fields with numerical data types.

Example

Assume that a query contains the result fields DATE, QUANTITY1, QUANTITY2, and NUM_RECORDS. The grouping condition is set as DATE. For field QUANTITY1, you have specified the aggregation function Maximum Value. For field QUANTITY2, you have specified the Sum of Values aggregation function. For field NUM_RECORDS, you have specified the Number of Values aggregation function. The result data the system retrieves from the search connector look like this:

DATE    QUANTITY1    QUANTITY2    NUM_RECORDS

01.06.2008    50    100

01.06.2008    60    70

01.06.2008    30    50

03.06.2008    10    20

After grouping, the result data looks like this:

DATE    QUANTITY1    QUANTITY2    NUM_RECORDS

01.06.2008    60    220    3

03.06.2008    10    20    1

History
Last changed by/on SAP  20110908 
SAP Release Created in 701