C_ProdCmplncServiceRequestProd is a Consumption CDS View that provides data about "Product Compliance Service Requests Prod" in SAP S/4HANA. It reads from 1 data source (I_ChmlCmplncInfo) and exposes 12 fields with key field ChmlCmplncInfoUUID. It has 3 associations to related views.
$projection.ChmlCmplncInfoUUID = _PrimeMatReferenced.ChmlCmplncInfoUUID -- Document information to show the language (used in virtual elements coding for filtering)
$projection.ChmlCmplncInfoUUID = _SftyDataSht.ChmlCmplncInfoUUID -- Data bucket information via a Custom Entity (ABAP Implementation - so only accessible via OData / SADL)
@EndUserText.label: 'Product Compliance Service Requests Prod'
@AbapCatalog.sqlViewName: 'CPCMPLSERVREQPVH'
@AbapCatalog.compiler.compareFilter: true@AbapCatalog.preserveKey: true@AccessControl.authorizationCheck: #MANDATORY// blocking of personal data not required (no personal data fields exposed for material; user can not be blocked)
@AccessControl.personalData.blocking: #NOT_REQUIRED@VDM.viewType: #CONSUMPTION@ClientHandling.algorithm: #SESSION_VARIABLE@ObjectModel:
{
usageType:
{
dataClass: #MASTER,
sizeCategory: #L, // <= 10 000 000
serviceQuality: #D // <= 20 msec
}
}
@Search.searchable: truedefineview C_ProdCmplncServiceRequestProd
asselectfrom I_ChmlCmplncInfo as _ChmlCmplncInfo
leftouter to one join I_ChmlComposition as _Composition on _Composition.ChmlCmplncInfoUUID = _ChmlCmplncInfo.ChmlCmplncInfoUUID
and _Composition.ChmlCompositionStatus = 'RE'
and _Composition.ChmlCompositionType = 'ANALYTIC1'
// leftouter to one join I_ChmlComposition as _CompositionIp on _CompositionIp.ChmlCmplncInfoUUID = _ChmlCmplncInfo.ChmlCmplncInfoUUID
// and _CompositionIp.ChmlCompositionStatus = 'IP'
// and _CompositionIp.ChmlCompositionType = 'ANALYTIC1'
leftouter to one join I_PhysicalChemicalProperty as _PhysChemProperty on _PhysChemProperty.ChmlCmplncInfoUUID = _ChmlCmplncInfo.ChmlCmplncInfoUUID
and _PhysChemProperty.PCPrptyProcgSts = 'RE'
// leftouter to one join I_PhysicalChemicalProperty as _PhysChemPropertyIp on _PhysChemPropertyIp.ChmlCmplncInfoUUID = _ChmlCmplncInfo.ChmlCmplncInfoUUID
// and _PhysChemPropertyIp.PCPrptyProcgSts = 'IP'
leftouter to one join I_PCSftyProperty as _SftyRelated on _SftyRelated.ChmlCmplncInfoUUID = _ChmlCmplncInfo.ChmlCmplncInfoUUID
and _SftyRelated.PCPrptyProcgSts = 'RE'
// leftouter to one join I_PCSftyProperty as _SftyRelatedIp on _SftyRelatedIp.ChmlCmplncInfoUUID = _ChmlCmplncInfo.ChmlCmplncInfoUUID
// and _SftyRelatedIp.PCPrptyProcgSts = 'IP'
// used to filter existing service requests on the create dialog
leftouter to one join P_LatestSrvcReqForProduct as _LatestSrvcReqForProduct on _LatestSrvcReqForProduct.ChmlCmplncInfoUUID = _ChmlCmplncInfo.ChmlCmplncInfoUUID
-- Combined name of CCI
association [0..1] to C_ChmlCmplncPrimMatl as _PrimeMatReferenced on $projection.ChmlCmplncInfoUUID = _PrimeMatReferenced.ChmlCmplncInfoUUID
-- Document information to show the language (used in virtual elements coding for filtering)
association [0..*] to C_ProdCmplncProdReqSftyDataSht as _SftyDataSht on $projection.ChmlCmplncInfoUUID = _SftyDataSht.ChmlCmplncInfoUUID
-- Data bucket information via a Custom Entity (ABAP Implementation - so only accessible via OData / SADL)
association [0..*] to C_ProdCmplncProdReqSendData as _SendData on $projection.ChmlCmplncInfoUUID = _SendData.ChmlCmplncInfoUUID
{
key _ChmlCmplncInfo.ChmlCmplncInfoUUID,
_Composition.ChmlCompositionUUID,
_PhysChemProperty.PhysChmlPrptyUUID,
_SftyRelated.PCSftyPrptyUUID,
// Diaglog Select Product for Request Creation
// product name
_PrimeMatReferenced.ChmlCmplncInfoCombinedName,
// number
_PrimeMatReferenced.Material,
// product group//@ObjectModel.text.association: '_PrimeMatReferenced._MaterialData._ProductGroupText'
_PrimeMatReferenced._MaterialData.ProductGroup,
--Description of Product Group@Search.ranking: #HIGH@ObjectModel.readOnly: true@Search.defaultSearchElement: true// @Semantics.text: true
_PrimeMatReferenced._MaterialData._ProductGroup_2._ProductGroupText[1: Language = $session.system_language ].ProductGroupName as ProductGroupName,
// Dialog Confirm Request Creation
// analytical composition released date
// _Composition.ReleaseDateTime as AnalyticCmpstnReleaseDateTime,
// physical-chemical properties released date
// _PhysChemProperty.ValidityStartDateTime as PhysChemPrptyReleaseDateTime,
// safety-related properties released date
// _SftyRelated.ValidityStartDateTime as PCSftyPrptyReleaseDateTime,
cast ( casewhen _LatestSrvcReqForProduct.LastChangeDateTime isnullthen ' ' else 'X' endas ehfnd_boolean preserving type ) as ProdCmplncServiceReqIsExisting,
// cast ( casewhen _PhysChemPropertyIp.PhysChmlPrptyUUID isnullthen ' ' else 'X' endas ehfnd_boolean preserving type ) as PhysChemPropertyIsInProgress,
// cast ( casewhen _CompositionIp.ChmlCompositionUUID isnullthen ' ' else 'X' endas ehfnd_boolean preserving type ) as CompositionIsInProgress,
// cast ( casewhen _SftyRelatedIp.PCSftyPrptyUUID isnullthen ' ' else 'X' endas ehfnd_boolean preserving type ) as PCSftyPrptyIsInProgress,
_SftyDataSht,
@ObjectModel.filter.enabled: false
_SendData,
_PrimeMatReferenced._MaterialData._ProductGroup_2
}
where
_ChmlCmplncInfo.ChmlCmplncInfoType = 'BU'