P_ChmlCmplncPrpsRqmtCt

DDL: P_CHMLCMPLNCPRPSRQMTCT Type: view CONSUMPTION

P_ChmlCmplncPrpsRqmtCt is a Consumption CDS View in SAP S/4HANA. It reads from 1 data source (I_ChmlCmplncInfo) and exposes 1 field.

Data Sources (1)

SourceAliasJoin Type
I_ChmlCmplncInfo ChmlCmplInfo from

Annotations (7)

NameValueLevelField
AbapCatalog.sqlViewName PCCPRPSCRQMTCT view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.viewType #CONSUMPTION view
VDM.private true view
ObjectModel.representativeKey ChmlCmplncInfoUUID view

Fields (1)

KeyFieldSource TableSource FieldDescription
ChmlCmplncInfoUUID
//@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'

define view P_ChmlCmplncPrpsRqmtCt
  --Select data from basic view 'Chemical compliance information'
  as select from 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 view

  or*/  CRVersion.CmplRqApplicationComponent      = 'PMA'
  and PrpsCRAssgnmt.CmplncPrpsRqmtAssgmtIsObslt = ''
group by
  ChmlCmplInfo.ChmlCmplncInfoUUID
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_CHMLCMPLNCINFO",
"I_CHMLCMPLNCPRPSASSGMT",
"I_CMPLNCPRPSRQMTASSGMT",
"I_CMPLRQVERS"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/