C_ProdCmplncServiceReqSubst is a Consumption CDS View that provides data about "PC Service Requests Private Substance" in SAP S/4HANA. It reads from 1 data source (I_SubstanceTP) and exposes 9 fields with key field SubstanceUUID. It has 1 association to related views.
@EndUserText.label: 'PC Service Requests Private Substance'
@AbapCatalog:
{
sqlViewName: 'CPCMPLSERVRQSUVH',
compiler.compareFilter: true,
preserveKey: true
}@AccessControl.authorizationCheck: #MANDATORY@VDM.viewType: #CONSUMPTION@ClientHandling.algorithm: #SESSION_VARIABLE@ObjectModel:
{
usageType:
{
dataClass: #MIXED,
sizeCategory: #L, // <= 10 000 000
serviceQuality: #C // <= 20 msec
}
}
@Metadata.ignorePropagatedAnnotations: true/*+[hideWarning] { "IDS" : [ "DOUBLE_JOIN" ] } */defineview C_ProdCmplncServiceReqSubst
asselectfrom I_SubstanceTP as _Substance
leftouter to one join I_PhysicalChemicalProperty as _PhysChemProperty on _PhysChemProperty.SubstanceUUID = _Substance.SubstanceUUID
and _PhysChemProperty.PCPrptyProcgSts = 'RE'
// leftouter to one join I_PhysicalChemicalProperty as _PhysChemPropertyIp on _PhysChemPropertyIp.SubstanceUUID = _Substance.SubstanceUUID
// and _PhysChemPropertyIp.PCPrptyProcgSts = 'IP'
leftouter to one join I_PCSftyProperty as _SftyRelated on _SftyRelated.SubstanceUUID = _Substance.SubstanceUUID
and _SftyRelated.PCPrptyProcgSts = 'RE'
// leftouter to one join I_PCSftyProperty as _SftyRelatedIp on _SftyRelatedIp.SubstanceUUID = _Substance.SubstanceUUID
// and _SftyRelatedIp.PCPrptyProcgSts = 'IP'
// used to filter existing service requests on the create dialog
leftouter to one join P_LatestSrvcReqForSubstance as _LatestSrvcReqForSubstance on _LatestSrvcReqForSubstance.SubstanceUUID = _Substance.SubstanceUUID
-- Data bucket information via a Custom Entity (ABAP Implementation - so only accessible via OData / SADL)
association [0..*] to C_ProdCmplncPrvtSubstSendData as _SendData on $projection.SubstanceUUID = _SendData.SubstanceUUID
{
key _Substance.SubstanceUUID, // used for the substance navigation
_PhysChemProperty.PhysChmlPrptyUUID,
_SftyRelated.PCSftyPrptyUUID,
_Substance.SubstanceName,
_Substance.SubstanceInternalName,
_Substance._ListedSubstance.ECNumber,
_Substance._ListedSubstance.CASNumber,
// Dialog Confirm Request Creation
// physical-chemical properties released date
// _PhysChemProperty.ValidityStartDateTime as PhysChemPrptyReleaseDateTime,
// safety-related properties released date
// _SftyRelated.ValidityStartDateTime as PCSftyPrptyReleaseDateTime,
cast ( casewhen _LatestSrvcReqForSubstance.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 _SftyRelatedIp.PCSftyPrptyUUID isnullthen ' ' else 'X' endas ehfnd_boolean preserving type ) as PCSftyPrptyIsInProgress,
@ObjectModel.filter.enabled: false
_SendData
}
where
_Substance.Specification <> ''
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_PCSFTYPROPERTY",
"I_PHYSICALCHEMICALPROPERTY",
"I_SUBSTACTIVEDRAFTLSTDSUBST",
"I_SUBSTANCETP",
"P_LATESTSRVCREQFORSUBSTANCE"
],
"ASSOCIATED":
[
"C_PRODCMPLNCPRVTSUBSTSENDDATA"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/