R_ProdSpecCmpstnHdrWithUsage
Product Spec. Comp. Header with Usage
R_ProdSpecCmpstnHdrWithUsage is a Composite CDS View that provides data about "Product Spec. Comp. Header with Usage" in SAP S/4HANA. It reads from 4 data sources (I_SpecValAssgmtHeader, I_ProdSpecNonHistoric, I_SpecValAssgmtUsage, I_SpecValAssgmt) and exposes 24 fields with key fields ProdSpecCmpstnHeader, ProdSpecCmpstnHdrChangeState, SpecValAssgmtUsageChangeState, SpecValAssgmtUsageInternalID. It has 3 associations to related views.
Data Sources (4)
| Source | Alias | Join Type |
|---|---|---|
| I_SpecValAssgmtHeader | header | from |
| I_ProdSpecNonHistoric | prodspec | inner |
| I_SpecValAssgmtUsage | usage | inner |
| I_SpecValAssgmt | va | inner |
Associations (3)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [1..*] | I_ProductSpecification | _ProductSpecification | _ProductSpecification.ProductSpecificationInternalID = $projection.ProductSpecificationInternalID |
| [1..1] | I_ProdSpecNonHistoric | _ProdSpecNonHistoric | _ProdSpecNonHistoric.ProductSpecificationInternalID = $projection.ProductSpecificationInternalID |
| [1..1] | I_ProdSpecificationLastChange | _ProdSpecificationLastChange | _ProdSpecificationLastChange.ProductSpecificationInternalID = $projection.ProductSpecificationInternalID |
Annotations (11)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | RPSCMPHWUSG | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| EndUserText.label | Product Spec. Comp. Header with Usage | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.dataClass | #MASTER | view | |
| VDM.lifecycle.contract.type | #SAP_INTERNAL_API | view | |
| VDM.viewType | #COMPOSITE | view |
Fields (24)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | ProdSpecCmpstnHeader | |||
| KEY | ProdSpecCmpstnHdrChangeState | |||
| KEY | SpecValAssgmtUsageChangeState | I_SpecValAssgmtUsage | SpecValAssgmtUsageChangeState | |
| KEY | SpecValAssgmtUsageInternalID | I_SpecValAssgmtUsage | SpecValAssgmtUsageInternalID | |
| ProductSpecificationInternalID | ||||
| ProdSpecCmpstnHdrValAssgmtType | ||||
| SpecValAssgmtUsgeValdtyStrtDte | I_SpecValAssgmtUsage | SpecValAssgmtUsgeValdtyStrtDte | ||
| SpecValAssgmtUsgeValdtyEndDte | I_SpecValAssgmtUsage | SpecValAssgmtUsgeValdtyEndDte | ||
| ProdSpecCmpstnHdrRating | ||||
| ProdSpecCmpstnHdrValidityArea | ||||
| SpecValAssgmtUsageIsActive | I_SpecValAssgmtUsage | SpecValAssgmtUsageIsActive | ||
| SpecValAssgmtUsageIsDeleted | I_SpecValAssgmtUsage | SpecValAssgmtUsageIsDeleted | ||
| SpecValAssgmtUsageIsRelevant | I_SpecValAssgmtUsage | SpecValAssgmtUsageIsRelevant | ||
| ProdSpecCmpstnHdrIsDeleted | I_SpecValAssgmt | SpecValAssgmtIsDeleted | ||
| ProdSpecCmpstnHdrChangeNumber | ||||
| ProdSpecCmpstnHdrSortSequence | ||||
| ProdSpecCmpstnHdrValdtyStrtDte | ||||
| ProdSpecCmpstnHdrValdtyEndDte | ||||
| SpecValAssgmtRefValueCode | I_SpecValAssgmt | SpecValAssgmtRefValueCode | ||
| _ProductSpecification | _ProductSpecification | |||
| _ProdSpecNonHistoric | _ProdSpecNonHistoric | |||
| _ValueAssignmentType | _ValueAssignmentType | |||
| _SpecValAssgmtReferenceValue | I_SpecValAssgmt | _SpecValAssgmtReferenceValue | ||
| _ProdSpecificationLastChange | _ProdSpecificationLastChange |
@AbapCatalog.sqlViewName: 'RPSCMPHWUSG'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE
@EndUserText.label: 'Product Spec. Comp. Header with Usage'
@ObjectModel.usageType.sizeCategory: #L
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.dataClass: #MASTER
@VDM.lifecycle.contract.type: #SAP_INTERNAL_API
@VDM.viewType: #COMPOSITE
define view R_ProdSpecCmpstnHdrWithUsage
as select from I_SpecValAssgmtHeader as header
inner join I_SpecValAssgmt as va on header.SpecificationInternalID = va.SpecificationInternalID
and header.SpecValAssgmtHdr = va.SpecValAssgmtHdr
inner join I_SpecValAssgmtUsage as usage on va.SpecValAssgmt = usage.MasterTableElementInternalID
and header.SpecificationInternalID = usage.SpecificationInternalID
and va.SpecValAssgmtValidityStartDate <= usage.SpecValAssgmtUsgeValdtyEndDte
and va.SpecValAssgmtValidityEndDate >= usage.SpecValAssgmtUsgeValdtyStrtDte
inner join I_ProdSpecNonHistoric as prodspec on prodspec.ProductSpecificationInternalID = header.SpecificationInternalID
association [1..*] to I_ProductSpecification as _ProductSpecification on _ProductSpecification.ProductSpecificationInternalID = $projection.ProductSpecificationInternalID
association [1..1] to I_ProdSpecNonHistoric as _ProdSpecNonHistoric on _ProdSpecNonHistoric.ProductSpecificationInternalID = $projection.ProductSpecificationInternalID
association [1..1] to I_ProdSpecificationLastChange as _ProdSpecificationLastChange on _ProdSpecificationLastChange.ProductSpecificationInternalID = $projection.ProductSpecificationInternalID
{
key cast(va.SpecValAssgmt as /plmb/spc_prod_comp_hdr_id preserving type ) as ProdSpecCmpstnHeader,
key cast(va.SpecValAssgmtChangeState as /plmb/spc_prod_comp_hdr_ch_st preserving type ) as ProdSpecCmpstnHdrChangeState,
key usage.SpecValAssgmtUsageChangeState,
key usage.SpecValAssgmtUsageInternalID,
cast(header.SpecificationInternalID as /plmb/spc_prod_int_id preserving type ) as ProductSpecificationInternalID,
cast(header.SpecValAssgmtType as /plmb/spc_comp_hdr_type preserving type ) as ProdSpecCmpstnHdrValAssgmtType,
usage.SpecValAssgmtUsgeValdtyStrtDte,
usage.SpecValAssgmtUsgeValdtyEndDte,
cast(usage.SpecificationRating as /plmb/spc_comp_hdr_rating preserving type ) as ProdSpecCmpstnHdrRating,
cast(usage.SpecificationValidityArea as /plmb/spc_comp_hdr_val_area preserving type ) as ProdSpecCmpstnHdrValidityArea,
usage.SpecValAssgmtUsageIsActive,
usage.SpecValAssgmtUsageIsDeleted,
usage.SpecValAssgmtUsageIsRelevant,
va.SpecValAssgmtIsDeleted as ProdSpecCmpstnHdrIsDeleted,
cast(va.SpecValAssgmtChangeNumber as /plmb/spc_comp_hdr_ch_number preserving type ) as ProdSpecCmpstnHdrChangeNumber,
cast(va.SpecValAssgmtSortSequence as /plmb/spc_comp_hdr_sort_seq preserving type ) as ProdSpecCmpstnHdrSortSequence,
cast(va.SpecValAssgmtValidityStartDate as /plmb/spc_comp_hval_strt_dat preserving type ) as ProdSpecCmpstnHdrValdtyStrtDte,
cast(va.SpecValAssgmtValidityEndDate as /plmb/spc_comp_hval_end_dat preserving type ) as ProdSpecCmpstnHdrValdtyEndDte,
// reference value exposure
va.SpecValAssgmtRefValueCode,
_ProductSpecification,
_ProdSpecNonHistoric,
_ValueAssignmentType,
va._SpecValAssgmtReferenceValue,
_ProdSpecificationLastChange
}
where
SpecValAssgmtUsageIsActive = 'X'
and SpecValAssgmtInheritanceRoot = '00000000000000000000' // data should not come via inheritance
and SpecValAssgmtUsageIsDeleted = '' // usage is not exposed in above layers, deleted entries are removed here
and SpecValAssgmtUsageIsExcluded = ''
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_PRODSPECNONHISTORIC",
"I_SPECVALASSGMT",
"I_SPECVALASSGMTHEADER",
"I_SPECVALASSGMTUSAGE"
],
"ASSOCIATED":
[
"I_PRODSPECIFICATIONLASTCHANGE",
"I_PRODSPECNONHISTORIC",
"I_PRODUCTSPECIFICATION",
"I_SPECVALASSGMTREFERENCEVALUE",
"I_SPECVALASSGMTTYPE"
],
"BASE":
[
"I_SPECVALASSGMT",
"I_SPECVALASSGMTHEADER"
],
"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