I_ChmlCompositionActiveDraft is a Composite CDS View that provides data about "Chemical Composition with active and draft data" in SAP S/4HANA. It reads from 1 data source (I_ChmlComposition) and exposes 15 fields. Part of development package EHFND_BO_CCI.
--Label of view@EndUserText.label: 'Chemical Composition with active and draft data'
@AbapCatalog:
{
-- SQL view name (16 characters)
sqlViewName: 'ICCOMPOSITIONADR',
--If it's true, the filter conditions are compared and, if they match, the associated join expression is evaluated only once
compiler.compareFilter: 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_ChmlCompositionActiveDraft
--Select data from basic view of chemical composition
asselectfrom I_ChmlComposition as ChemicalComposition
--join data from draft table of chemical composition => selectwith session user to determine the draft of the own user
leftouter to one join I_ChmlCompositionDraft as ChemicalCompositionDraft on ChemicalComposition.ChmlCompositionUUID = ChemicalCompositionDraft.ActiveChmlCompositionUUID
and ChemicalCompositionDraft.LastChangedByUser = $session.user
{
--UUID of active chemical composition
key ChemicalComposition.ChmlCompositionUUID,
--UUID of chemical compliance information
ChemicalComposition.ChmlCmplncInfoUUID,
ChemicalComposition.ChmlSuplrMatlUUID,
ChemicalComposition.SubstanceUUID,
-- UUID of active instance
ChemicalComposition.ChmlCompositionUUID as ActiveChmlCompositionUUID,
-- UUID of draft instance
ChemicalCompositionDraft.ChmlCompositionUUID as ChmlCompositionDraftUUID,
--Composition Type
ChemicalComposition.ChmlCompositionType,
--Legal Area
ChemicalComposition.ProdCmplncLegalArea,
--PolymerCompositionIntID
ChemicalComposition.PolymerCompositionIntID,
--PolymerCompositionName
ChemicalComposition.PolymerCompositionName,
--Chemical Composition status
ChemicalComposition.ChmlCompositionStatus,
--Change date
ChemicalComposition.LastChangeUTCDateTime,
--Release date
ChemicalComposition.ValidityStartDateTime,
--Indicator: Is Active Entitycast( casewhen ChemicalCompositionDraft.ChmlCompositionUUID isnotnullthen ' '
else 'X'
endas sdraft_is_active preserving type ) as IsActiveEntity,
/*Association*/
ChemicalComposition._CompositionStatus,
ChemicalComposition._ChmlCmplncInfo,
ChemicalComposition._Substance,
ChemicalComposition._CompositionType
}