R_ProdSpecCmpstnHdrWithUsage

DDL: R_PRODSPECCMPSTNHDRWITHUSAGE SQL: RPSCMPHWUSG Type: view COMPOSITE

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)

SourceAliasJoin Type
I_SpecValAssgmtHeader header from
I_ProdSpecNonHistoric prodspec inner
I_SpecValAssgmtUsage usage inner
I_SpecValAssgmt va inner

Associations (3)

CardinalityTargetAliasCondition
[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)

NameValueLevelField
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)

KeyFieldSource TableSource FieldDescription
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]
;