Chemical Compliance Information with active and draft data
I_ChmlCmplncInfoActiveDraft is a Composite CDS View that provides data about "Chemical Compliance Information with active and draft data" in SAP S/4HANA. It reads from 1 data source (I_ChmlCmplncInfo) and exposes 7 fields. It has 1 association to related views.
--Label of view@EndUserText.label: 'Chemical Compliance Information with active and draft data'
@AbapCatalog:
{
-- SQL view name (16 characters)
sqlViewName: 'ICCIADR',
--If it's true, the filter conditions are compared and, if they match, the associated join expression is evaluated only once
compiler.compareFilter: true,
preserveKey: true
}
--Access Control: Authorizations Checks
@AccessControl:
{
authorizationCheck: #CHECK
}
--Client Handling of the view@ClientHandling.algorithm: #SESSION_VARIABLE
--VDM view type
@VDM.viewType: #COMPOSITE@ObjectModel:
{
--Performance Annotations
usageType:
{
dataClass: #TRANSACTIONAL,
sizeCategory: #M,
serviceQuality: #C
}
}
defineview I_ChmlCmplncInfoActiveDraft
--Select data from basic view of chemical chemical compliance information
asselectfrom I_ChmlCmplncInfo as ChemicalComplianceInfo
--join data from draft table of chemical compliance information
leftouter to one join I_ChmlCmplncInfoDraft as ChemicalComplianceInfoDraft on ChemicalComplianceInfo.ChmlCmplncInfoUUID = ChemicalComplianceInfoDraft.ActiveChmlCmplncInfoUUID
/*+[hideWarning] { "IDS" : [ "CARDINALITY_CHECK" ] } */association [1..1] to P_ChmlCmplConstants as _Constants on _Constants.Constant1 = _Constants.Constant1
{
--UUID of active chemical compliance information
key ChemicalComplianceInfo.ChmlCmplncInfoUUID as ActiveChmlCmplncInfoUUID,
----UUID of active or draft chemical compliance information
casewhen ChemicalComplianceInfoDraft.ChmlCmplncInfoUUID isnotnullthen ChemicalComplianceInfoDraft.ChmlCmplncInfoUUID
else ChemicalComplianceInfo.ChmlCmplncInfoUUID
endas ChmlCmplncInfoUUID,
--Indicator: Is Active Entitycast( casewhen ChemicalComplianceInfoDraft.ChmlCmplncInfoUUID isnotnullthen _Constants[inner].ConstantFalse
else _Constants[inner].ConstantTrue
endas sdraft_is_active preserving type ) as ChmlCmplncInfoIsActiveEntity,
// needed for DCL
ChemicalComplianceInfo.ProdStewardshipRespUnit as ProdStewardshipRespUnit,
ChemicalComplianceInfo.MaterialIsSold as MaterialIsSold,
ChemicalComplianceInfo.MaterialIsTransported as MaterialIsTransported,
ChemicalComplianceInfo.MaterialIsSourced as MaterialIsSourced,
ChemicalComplianceInfo.MaterialIsProduced as MaterialIsProduced,
ChemicalComplianceInfo.MaterialIsDisposed as MaterialIsDisposed,
ChemicalComplianceInfo.MaterialIsEmissionRelevant as MaterialIsEmissionRelevant
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_CHMLCMPLNCINFO",
"I_CHMLCMPLNCINFODRAFT",
"P_CHMLCMPLCONSTANTS"
],
"ASSOCIATED":
[
"P_CHMLCMPLCONSTANTS"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/