P_InspSpecQuantityCtrl
P_InspSpecQuantityCtrl is a Basic CDS View in SAP S/4HANA. It reads from 1 data source (qpmk) and exposes 29 fields with key fields InspectionSpecificationPlant, InspectionSpecification, InspectionSpecificationVersion. It has 1 association to related views.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| qpmk | qpmk | from |
Associations (1)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_UnitOfMeasure | _UnitOfMeasure | $projection.InspectionSpecificationUnit = _UnitOfMeasure.UnitOfMeasure |
Annotations (5)
| Name | Value | Level | Field |
|---|---|---|---|
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| VDM.private | true | view | |
| VDM.viewType | #BASIC | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| AbapCatalog.sqlViewName | PINSPQTYCTRL | view |
Fields (29)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | InspectionSpecificationPlant | qpmk | zaehler | |
| KEY | InspectionSpecification | qpmk | mkmnr | |
| KEY | InspectionSpecificationVersion | qpmk | version | |
| InspSpecDecimalPlaces | qpmk | stellen | ||
| InspectionSpecificationUnit | qpmk | masseinhsw | ||
| InspSpecTargetValue | qpmk | sollwert | ||
| InspSpecHasTargetValue | qpmk | sollwni | ||
| InspSpecUpperLimit | qpmk | toleranzob | ||
| tolobni | qpmk | tolobni | ||
| InspSpecLowerLimit | qpmk | toleranzun | ||
| tolunni | qpmk | tolunni | ||
| InspSpecFirstUpperSpecLimit | qpmk | grenzeob1 | ||
| grenzob1ni | qpmk | grenzob1ni | ||
| InspSpecFirstLowerSpecLimit | qpmk | grenzeun1 | ||
| grenzun1ni | qpmk | grenzun1ni | ||
| InspSpecSecondUpperSpecLimit | qpmk | grenzeob2 | ||
| grenzob2ni | qpmk | grenzob2ni | ||
| InspSpecSecondLowerSpecLimit | qpmk | grenzeun2 | ||
| grenzun2ni | qpmk | grenzun2ni | ||
| InspSpecUpperPlausibilityLimit | qpmk | plausioben | ||
| plausiobni | qpmk | plausiobni | ||
| InspSpecLowerPlausibilityLimit | qpmk | plausiunte | ||
| plausiunni | qpmk | plausiunni | ||
| InspSpecUpperSpecLimitChange | qpmk | tolerweiob | ||
| tolwobni | qpmk | tolwobni | ||
| InspSpecLowerSpecLimitChange | qpmk | tolerweiun | ||
| tolwunni | qpmk | tolwunni | ||
| UnitOfMeasureName | ||||
| _UnitOfMeasure | _UnitOfMeasure |
@ClientHandling.algorithm: #SESSION_VARIABLE
@VDM.private: true
@VDM.viewType: #BASIC
@AccessControl.authorizationCheck: #NOT_REQUIRED
@AbapCatalog.sqlViewName: 'PINSPQTYCTRL' //must start with "P"
define view P_InspSpecQuantityCtrl //must start with "P_"; same as DDL source name in upper-camelcase notation
as select from qpmk
//---> Decomment if you want to join further data sources
//left outer to one join DatabaseTableOrBasicCdsView2
// on qpmk.FieldName = DatabaseTableOrBasicCdsView2.FieldName2
association [0..1] to I_UnitOfMeasure as _UnitOfMeasure
on $projection.InspectionSpecificationUnit = _UnitOfMeasure.UnitOfMeasure
{
// key DatabaseFieldName //usage of global field names and cast to data element with proper labels is optional
key qpmk.zaehler as InspectionSpecificationPlant,
key qpmk.mkmnr as InspectionSpecification,
key qpmk.version as InspectionSpecificationVersion,
case substring(qpmk.steuerkz,1,1) // InspSpecIsQuantitative
when 'X' then cast ( '1' as qchar_type_basic ) // = Quantitative
else cast ( '2' as qchar_type_basic ) // = Qualitative
end as InspSpecCharacteristicType,
/* Provide only the "not-initial" (aka NI) fields for quantities and the corresponding quantity fields */
/* Re-use existing GFN */
qpmk.stellen as InspSpecDecimalPlaces,
qpmk.masseinhsw as InspectionSpecificationUnit,
qpmk.sollwert as InspSpecTargetValue,
qpmk.sollwni as InspSpecHasTargetValue,
qpmk.toleranzob as InspSpecUpperLimit,
qpmk.tolobni,
qpmk.toleranzun as InspSpecLowerLimit,
qpmk.tolunni,
// qpmk.klasanzahl,
// qpmk.klasbreite,
// qpmk.klasbrni,
// qpmk.klasmitte,
// qpmk.klasmini,
qpmk.grenzeob1 as InspSpecFirstUpperSpecLimit,
qpmk.grenzob1ni,
qpmk.grenzeun1 as InspSpecFirstLowerSpecLimit,
qpmk.grenzun1ni,
qpmk.grenzeob2 as InspSpecSecondUpperSpecLimit,
qpmk.grenzob2ni,
qpmk.grenzeun2 as InspSpecSecondLowerSpecLimit,
qpmk.grenzun2ni,
qpmk.plausioben as InspSpecUpperPlausibilityLimit,
qpmk.plausiobni,
qpmk.plausiunte as InspSpecLowerPlausibilityLimit,
qpmk.plausiunni,
qpmk.tolerweiob as InspSpecUpperSpecLimitChange,
qpmk.tolwobni,
qpmk.tolerweiun as InspSpecLowerSpecLimitChange,
qpmk.tolwunni,
_UnitOfMeasure._Text[1:Language=$session.system_language].UnitOfMeasureName,
/* Associtions */
_UnitOfMeasure
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_UNITOFMEASURE",
"I_UNITOFMEASURETEXT",
"QPMK"
],
"ASSOCIATED":
[
"I_UNITOFMEASURE"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/
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