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 | DID | |
| ProdSpecCmpstnHdrChangeNumber | ||||
| ProdSpecCmpstnHdrSortSequence | ||||
| ProdSpecCmpstnHdrValdtyStrtDte | ||||
| ProdSpecCmpstnHdrValdtyEndDte | ||||
| SpecValAssgmtRefValueCode | I_SpecValAssgmt | SpecValAssgmtRefValueCode | Reference Value | |
| _ProductSpecification | _ProductSpecification | |||
| _ProdSpecNonHistoric | _ProdSpecNonHistoric | |||
| _ValueAssignmentType | _ValueAssignmentType | |||
| _SpecValAssgmtReferenceValue | I_SpecValAssgmt | _SpecValAssgmtReferenceValue | ||
| _ProdSpecificationLastChange | _ProdSpecificationLastChange |
Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.
-- Derived SQL interpretation of CDS view R_ProdSpecCmpstnHdrWithUsage.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.
-- SQL view name: RPSCMPHWUSG
CREATE VIEW R_ProdSpecCmpstnHdrWithUsage AS
SELECT
cast(va.SpecValAssgmt as /plmb/spc_prod_comp_hdr_id preserving type ) AS ProdSpecCmpstnHeader,
cast(va.SpecValAssgmtChangeState as /plmb/spc_prod_comp_hdr_ch_st preserving type ) AS ProdSpecCmpstnHdrChangeState,
usage.SpecValAssgmtUsageChangeState AS SpecValAssgmtUsageChangeState,
usage.SpecValAssgmtUsageInternalID AS 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 AS SpecValAssgmtUsgeValdtyStrtDte,
usage.SpecValAssgmtUsgeValdtyEndDte AS 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 AS SpecValAssgmtUsageIsActive,
usage.SpecValAssgmtUsageIsDeleted AS SpecValAssgmtUsageIsDeleted,
usage.SpecValAssgmtUsageIsRelevant AS 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,
va.SpecValAssgmtRefValueCode AS SpecValAssgmtRefValueCode,
va._SpecValAssgmtReferenceValue AS _SpecValAssgmtReferenceValue
FROM I_SpecValAssgmtHeader AS header
INNER JOIN I_SpecValAssgmt AS va ON /* join condition not captured in parsed metadata */
INNER JOIN I_SpecValAssgmtUsage AS usage ON /* join condition not captured in parsed metadata */
INNER JOIN I_ProdSpecNonHistoric AS prodspec ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_ProductSpecification AS _ProductSpecification ON _ProductSpecification.ProductSpecificationInternalID = ProductSpecificationInternalID -- association [1..*]
LEFT OUTER JOIN I_ProdSpecNonHistoric AS _ProdSpecNonHistoric ON _ProdSpecNonHistoric.ProductSpecificationInternalID = ProductSpecificationInternalID -- association [1..1]
LEFT OUTER JOIN I_ProdSpecificationLastChange AS _ProdSpecificationLastChange ON _ProdSpecificationLastChange.ProductSpecificationInternalID = ProductSpecificationInternalID -- association [1..1]
;
Learn More
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- CDS View Annotations — A Complete Guide
- What Is a CDS View in SAP S/4HANA?
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- 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
- BSEG to ACDOCA: The Universal Journal Migration
- Business Partner Migration: KNA1/LFA1 to BUT000
- Material Document Migration: MSEG/MKPF to MATDOC
- How to Find the Right CDS View for an SAP Table
- BW Extractor to CDS View Migration Guide
- S/4HANA CDS View Deprecation: What You Need to Know
- ABAP CDS View Tutorial — From Basics to Real-World Examples
- RAP and CDS Views — Building Transactional Apps in SAP S/4HANA
- Sales Document Status Migration: VBUP/VBUK Removal in S/4HANA
- CO Tables in S/4HANA: COEP, COBK, COSS, COSP to ACDOCA