--Label of view
@EndUserText.label: 'Chemical Composition'
@AbapCatalog:
{
-- SQL view name (16 characters)
sqlViewName: 'ICCOMPOSITION',
--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,
privilegedAssociations: [ '_CreatedByUser', '_LastChangedByUser', '_ReleasedByUser' ]
}
--Client Handling of the view
@ClientHandling.algorithm: #SESSION_VARIABLE
--VDM view type
@VDM.viewType: #BASIC
@ObjectModel:
{
--Performance Annotations
usageType:
{
dataClass: #MASTER,
sizeCategory: #L,
serviceQuality: #B
},
representativeKey: 'ChmlCompositionUUID'
}
define view I_ChmlComposition
--Select data from master table of 'Chemical composition'
as select from ehfndv_ccmps as ChemicalComposition
--Link to detail data 'Components/substances'
association [0..*] to I_ChmlComponent as _ChmlComponent on $projection.ChmlCompositionUUID = _ChmlComponent.ChmlCompositionUUID
--Link to chemical compliance information
association [0..1] to I_ChmlCmplncInfo as _ChmlCmplncInfo on $projection.ChmlCmplncInfoUUID = _ChmlCmplncInfo.ChmlCmplncInfoUUID
association [0..1] to I_Substance as _Substance on $projection.SubstanceUUID = _Substance.SubstanceUUID
--Link to user data
association [0..1] to I_User as _CreatedByUser on $projection.CreatedByUser = _CreatedByUser.UserID
association [0..1] to I_User as _LastChangedByUser on $projection.LastChangedByUser = _LastChangedByUser.UserID
association [0..1] to I_User as _ReleasedByUser on $projection.ReleasedByUser = _ReleasedByUser.UserID
--Link to customizing data
association [0..1] to I_ChmlCompositionType as _CompositionType on $projection.ChmlCompositionType = _CompositionType.ChmlCompositionType
association [0..1] to I_ProdCmplncLegalArea as _LegalArea on $projection.ProdCmplncLegalArea = _LegalArea.ProdCmplncLegalArea
association [0..1] to I_ChmlCompositionType as _LegalAreaRef on $projection.ProdCmplncLegalAreaRef = _LegalAreaRef.ChmlCompositionType
--Link to domain values
association [0..1] to I_ChmlCompositionStatus as _CompositionStatus on $projection.ChmlCompositionStatus = _CompositionStatus.ChmlCompositionStatus
association [0..1] to I_ProdCmplncPhrs as _ChmlCmplncProdCatztnPhrs on $projection.ChmlCmplncProdCatztnPhrsUUID = _ChmlCmplncProdCatztnPhrs.ProdCmplncPhrsUUID
{
--UUID of composition
key ChemicalComposition.chmlcompositionuuid as ChmlCompositionUUID,
@Semantics.systemDateTime.createdAt: true
cast(creationutcdatetime as ehfnd_bo_crea_date_time preserving type ) as CreationUTCDateTime,
@ObjectModel.readOnly: true
@Semantics.user.createdBy: true
cast(createdbyuser as ehfnd_bo_crea_uname preserving type ) as CreatedByUser,
@Semantics.systemDateTime.lastChangedAt: true
cast(lastchangeutcdatetime as ehfnd_bo_lchg_date_time preserving type ) as LastChangeUTCDateTime,
@ObjectModel.readOnly: true
@Semantics.user.lastChangedBy: true
cast(lastchangedbyuser as ehfnd_bo_lchg_uname preserving type ) as LastChangedByUser,
--UUID of chemical compliance info
@ObjectModel.foreignKey.association: '_ChmlCmplncInfo'
ChemicalComposition.chmlcmplncinfouuid as ChmlCmplncInfoUUID,
--UUID of referenced supplier material
ChemicalComposition.chmlsuplrmatluuid as ChmlSuplrMatlUUID,
--UUID of referenced substance
ChemicalComposition.substanceuuid as SubstanceUUID,
--Composition Type
@ObjectModel.foreignKey.association: '_CompositionType'
ChemicalComposition.chmlcompositiontype as ChmlCompositionType,
-- Legal Area
prodcmplnclegalarea as ProdCmplncLegalArea,
--Release Status
@ObjectModel.foreignKey.association: '_CompositionStatus'
ChemicalComposition.chmlcompositionstatus as ChmlCompositionStatus,
--Release date/time
ChemicalComposition.releasedatetime as ReleaseDateTime,
--Released by user
@Semantics.user.responsible: true
ChemicalComposition.releasedbyuser as ReleasedByUser,
ChemicalComposition.validitystartdatetime as ValidityStartDateTime,
ChemicalComposition.validityenddatetime as ValidityEndDateTime,
--Common: ProdCmplncLegalAreaRef
ChemicalComposition.prodcmplnclegalarearef as ProdCmplncLegalAreaRef,
--Analytical+Legal Composition: Product Categorization (substance or mixture)
ChemicalComposition.chmlcmplncprodcatztnphrsuuid as ChmlCmplncProdCatztnPhrsUUID,
--Trade Secret: PCTrdScrtCalculationSetting
ChemicalComposition.pctrdscrtcalculationsetting as PCTrdScrtCalculationSetting,
--Polymer Composition: PolymerCompositionIntIDRef
ChemicalComposition.polymercompositionintid as PolymerCompositionIntID,
--Polymer Composition: PolymerCompositionName
ChemicalComposition.polymercompositionname as PolymerCompositionName,
/*Association*/
_ChmlComponent,
_ChmlCmplncInfo,
_Substance,
_CreatedByUser,
_LastChangedByUser,
_ReleasedByUser,
_CompositionType,
_CompositionStatus,
_LegalArea,
_LegalAreaRef,
_ChmlCmplncProdCatztnPhrs
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"EHFNDV_CCMPS"
],
"ASSOCIATED":
[
"I_CHMLCMPLNCINFO",
"I_CHMLCOMPONENT",
"I_CHMLCOMPOSITIONSTATUS",
"I_CHMLCOMPOSITIONTYPE",
"I_PRODCMPLNCLEGALAREA",
"I_PRODCMPLNCPHRS",
"I_SUBSTANCE",
"I_USER"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/