Count Compliance Requirements of all Purposes per Product
P_ChmlCmplncPrpsRqmtCt is a Consumption CDS View that provides data about "Count Compliance Requirements of all Purposes per Product" in SAP S/4HANA. It reads from 1 data source (I_ChmlCmplncInfo) and exposes 1 field. Part of development package EHFND_BO_CCI.
//@EndUserText.label: 'Count Compliance Requirements of all Purposes per Product'
@AbapCatalog:
{
sqlViewName: 'PCCPRPSCRQMTCT',
compiler.compareFilter: true
}@AccessControl:
{
authorizationCheck: #NOT_REQUIRED
}
--Client Handling of the view@ClientHandling.algorithm: #SESSION_VARIABLE
--VDM view type
@VDM.viewType: #CONSUMPTION@VDM.private: true@ObjectModel.representativeKey: 'ChmlCmplncInfoUUID'
defineview P_ChmlCmplncPrpsRqmtCt
--Select data from basic view 'Chemical compliance information'
asselectfrom I_ChmlCmplncInfo as ChmlCmplInfo
--Join master table
--purpose assignment in chemical compliance information
join I_ChmlCmplncPrpsAssgmt as PurposeAssignment on ChmlCmplInfo.ChmlCmplncInfoUUID = PurposeAssignment.ChmlCmplncInfoUUID
--Purpose
join I_CmplncPrpsRqmtAssgmt as PrpsCRAssgnmt on PrpsCRAssgnmt.CmplncPrpsUUID = PurposeAssignment.CmplncPrpsUUID
--Compliance Requirements
join I_CmplRqVers as CRVersion on PrpsCRAssgnmt.CmplRqUUID = CRVersion.CmplRqUUID
{
--UUID of chemical compliance information
key ChmlCmplInfo.ChmlCmplncInfoUUID,
--Count compliance requirements
cast( count( distinct CRVersion.CmplRqUUID ) as ehfnd_cci_number_of_cr ) as NmbrOfCmplRqRslts
}
where
--TODO: chemcial compliance information not yet needed
/*CRVersion.CmplRqApplicationComponent = 'DG' // check if DG is needed for this viewor*/ CRVersion.CmplRqApplicationComponent = 'PMA'
and PrpsCRAssgnmt.CmplncPrpsRqmtAssgmtIsObslt = ''
groupby
ChmlCmplInfo.ChmlCmplncInfoUUID