P_InspOperationAggregate1
Aggregation on inspection operation
P_InspOperationAggregate1 is a Composite CDS View that provides data about "Aggregation on inspection operation" in SAP S/4HANA. It reads from 1 data source (I_InspectionSubset) and exposes 3 fields with key fields InspectionLot, InspPlanOperationInternalID. Part of development package VDM_QM_INSPECTION.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_InspectionSubset | I_InspectionSubset | from |
Annotations (7)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PINSPOPAGGR1 | view | |
| AbapCatalog.preserveKey | true | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| VDM.private | true | view | |
| VDM.viewType | #COMPOSITE | view |
Fields (3)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | InspectionLot | I_InspectionSubset | InspectionLot | |
| KEY | InspPlanOperationInternalID | I_InspectionSubset | InspPlanOperationInternalID | |
| MaterialSampleCount |
@AbapCatalog.sqlViewName: 'PINSPOPAGGR1'
@AbapCatalog.preserveKey: true
@AbapCatalog.compiler.compareFilter: true
@ClientHandling.algorithm: #SESSION_VARIABLE
@AccessControl.authorizationCheck: #NOT_REQUIRED
@VDM.private:true
@VDM.viewType: #COMPOSITE
define view P_InspOperationAggregate1 as select from I_InspectionSubset
{
key I_InspectionSubset.InspectionLot,
key I_InspectionSubset.InspPlanOperationInternalID,
//Counts number of subsets/inspection points which refers to material sample
sum(case
when I_InspectionSubset.InspSubsetUsageDcsnValuation is null or
I_InspectionSubset.InspSubsetUsageDcsnValuation = ' ' or
I_InspectionSubset.InspSubsetUsageDcsnValuation = 'F' then 1
when I_InspectionSubset.InspSubsetUsageDcsnValuation = '+' then 999999 //to force int4-type
else 0 end) as MaterialSampleOpenCount,
sum(case
when I_InspectionSubset.InspSubsetUsageDcsnValuation = 'A' then 1
when I_InspectionSubset.InspSubsetUsageDcsnValuation = '+' then 999999 //to force int4-type
else 0 end) as MaterialSampleAcceptedCount,
sum(case when I_InspectionSubset.InspSubsetUsageDcsnValuation = 'R' then 1
when I_InspectionSubset.InspSubsetUsageDcsnValuation = '+' then 999999 //to force int4-type
else 0 end) as MaterialSampleRejectedCount,
count(*) as MaterialSampleCount
}
where I_InspectionSubset.MaterialSample is not null or I_InspectionSubset.MaterialSample != ''
group by I_InspectionSubset.InspectionLot,
I_InspectionSubset.InspPlanOperationInternalID
Learn More
- What Is a CDS View in SAP S/4HANA?
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- CDS View Annotations — A Complete Guide
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA