P_ChmlCmplncUse
Chemical Compliance Use
P_ChmlCmplncUse is a Consumption CDS View that provides data about "Chemical Compliance Use" in SAP S/4HANA. It reads from 2 data sources (I_ChmlCmplncInfoTP, I_ProdCmplncLegalArea) and exposes 5 fields with key fields ChmlCmplncInfoUUID, ProdCmplncLegalArea. It has 3 associations to related views. Part of development package EHFND_CNS_CCI.
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| I_ChmlCmplncInfoTP | ChemicalComplianceInfo | from |
| I_ProdCmplncLegalArea | ProdCmplncLegalArea | cross |
Associations (3)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_PCPrptyProcgSts | _ProcessingStatus | $projection.ProdCmplncUseProcgSts = _ProcessingStatus.PCPrptyProcgSts --Dummy constant selection to solve issues with case-statements with constants (not null-preserving) |
| [1..1] | P_CChmlCmplConstants | _Constants | _Constants.Constant1 = _Constants.Constant1 |
| [0..1] | I_ProdCmplncLegalArea | _ProdCmplncLegalArea | $projection.ProdCmplncLegalArea = _ProdCmplncLegalArea.ProdCmplncLegalArea |
Annotations (7)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PCCUSE | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| VDM.viewType | #CONSUMPTION | view | |
| VDM.private | true | view |
Fields (5)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | ChmlCmplncInfoUUID | I_ChmlCmplncInfoTP | ChmlCmplncInfoUUID | |
| KEY | ProdCmplncLegalArea | |||
| ProdCmplncUseUUIDendasProdCmplncUseUUID | ||||
| _ProcessingStatus | _ProcessingStatus | |||
| _ProdCmplncLegalArea | _ProdCmplncLegalArea |
@AbapCatalog:
{
sqlViewName: 'PCCUSE',
compiler.compareFilter: true,
preserveKey: true
}
@AccessControl:
{
authorizationCheck: #NOT_REQUIRED
}
@ClientHandling.algorithm: #SESSION_VARIABLE
@VDM.viewType: #CONSUMPTION
@VDM.private: true
define view P_ChmlCmplncUse
as select from I_ChmlCmplncInfoTP as ChemicalComplianceInfo
cross join I_ProdCmplncLegalArea as ProdCmplncLegalArea
--Join data from Use with status In Process
left outer to one join I_ProdCmplncUse as _ProdCmplncUseInProgress on ChemicalComplianceInfo.ChmlCmplncInfoUUID = _ProdCmplncUseInProgress.ChmlCmplncInfoUUID
and _ProdCmplncUseInProgress.ProdCmplncLegalArea = ProdCmplncLegalArea.ProdCmplncLegalArea
and _ProdCmplncUseInProgress.ProdCmplncUseProcgSts = 'IP'
--Join data from Use with status Released
left outer to one join I_ProdCmplncUse as _ProdCmplncUseReleased on ChemicalComplianceInfo.ChmlCmplncInfoUUID = _ProdCmplncUseReleased.ChmlCmplncInfoUUID
and _ProdCmplncUseReleased.ProdCmplncLegalArea = ProdCmplncLegalArea.ProdCmplncLegalArea
and _ProdCmplncUseReleased.ProdCmplncUseProcgSts = 'RE'
--Link to processing status
association [0..1] to I_PCPrptyProcgSts as _ProcessingStatus on $projection.ProdCmplncUseProcgSts = _ProcessingStatus.PCPrptyProcgSts
--Dummy constant selection to solve issues with case-statements with constants (not null-preserving)
association [1..1] to P_CChmlCmplConstants as _Constants on _Constants.Constant1 = _Constants.Constant1
association [0..1] to I_ProdCmplncLegalArea as _ProdCmplncLegalArea on $projection.ProdCmplncLegalArea = _ProdCmplncLegalArea.ProdCmplncLegalArea
{
@UI.hidden: true
key ChemicalComplianceInfo.ChmlCmplncInfoUUID as ChmlCmplncInfoUUID,
key cast( coalesce( _ProdCmplncUseInProgress.ProdCmplncLegalArea, _ProdCmplncUseReleased.ProdCmplncLegalArea) as ehfnd_legal_area preserving type ) as ProdCmplncLegalArea,
--Navigation Link UUID
case
when _ProdCmplncUseInProgress.ProdCmplncUseProcgSts = 'IP' then
_ProdCmplncUseInProgress.ProdCmplncUseUUID
when _ProdCmplncUseReleased.ProdCmplncUseProcgSts = 'RE' then
_ProdCmplncUseReleased.ProdCmplncUseUUID
end as ProdCmplncUseUUID,
--Delete allowed?
case
when _ProdCmplncUseInProgress.ProdCmplncUseProcgSts = 'IP' then
_Constants.ConstantTrue
when _ProdCmplncUseReleased.ProdCmplncUseProcgSts = 'RE' then
_Constants.ConstantFalse
end as ProdCmplncUseDeleteIsAllwd,
--Release allowed?
case
when _ProdCmplncUseInProgress.ProdCmplncUseProcgSts = 'IP' then
_Constants.ConstantTrue
when _ProdCmplncUseReleased.ProdCmplncUseProcgSts = 'RE' then
_Constants.ConstantFalse
end as ProdCmplncUseReleaseIsAllwd,
--Processing Status
case
when _ProdCmplncUseInProgress.ProdCmplncUseProcgSts = 'IP'
and _ProdCmplncUseReleased.ProdCmplncUseProcgSts is null then
_Constants.ConstantInitialVersion
when _ProdCmplncUseInProgress.ProdCmplncUseProcgSts = 'IP' then
_ProdCmplncUseInProgress.ProdCmplncUseProcgSts
when _ProdCmplncUseReleased.ProdCmplncUseProcgSts = 'RE' then
_ProdCmplncUseReleased.ProdCmplncUseProcgSts
end as ProdCmplncUseProcgSts,
--Criticality
case
when _ProdCmplncUseInProgress.ProdCmplncUseProcgSts = 'IP' then
_Constants.Constant2
when _ProdCmplncUseReleased.ProdCmplncUseProcgSts = 'RE' then
_Constants.Constant3
end as ProdCmplncUseProcgStsCritlty,
/* Associations */
_ProcessingStatus,
_ProdCmplncLegalArea
}
where
_ProdCmplncUseInProgress.ProdCmplncUseProcgSts = 'IP'
or _ProdCmplncUseReleased.ProdCmplncUseProcgSts = 'RE'
Learn More
- What Is a CDS View in SAP S/4HANA?
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- CDS View Annotations — A Complete Guide
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA