--Label of view
@EndUserText.label: 'Chemical Component'
@AbapCatalog:
{
-- SQL view name (16 characters)
sqlViewName: 'ICCOMPONENT',
--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: #BASIC
@ObjectModel:
{
--Performance Annotations
usageType:
{
dataClass: #MASTER,
sizeCategory: #XL,
serviceQuality: #C
}
}
/*+[hideWarning] { "IDS" : [ "CARDINALITY_CHECK" ] } */
define view I_ChmlComponent
--Select data from master table 'Chemical Component'
as select from ehfndv_ccmps_cmp as ChemicalComponent
--Link to parent 'Chemical Composition'
association [1..1] to I_ChmlComposition as _ChemicalComposition on $projection.ChmlCompositionUUID = _ChemicalComposition.ChmlCompositionUUID
--Link to 'Chemcial Compliance Info' as root
association [1..1] to I_ChmlCmplncInfo as _ChmlCmplncInfo on $projection.ChmlCmplncInfoUUID = _ChmlCmplncInfo.ChmlCmplncInfoUUID
association [0..1] to I_Substance as _HostSubstance on $projection.HostSubstanceUUID = _HostSubstance.SubstanceUUID
--Link to Substance
association [0..1] to I_SubstanceEnhanced as _Substance on $projection.SubstanceUUID = _Substance.SubstanceUUID
--Link to Role of Ingredient
association [0..1] to I_ChmlCompType as _ComponentType on $projection.ChmlCompType = _ComponentType.ChmlCompType
--Link to Unit of Measure
association [0..1] to I_UnitOfMeasure as _UnitOfMeasure on $projection.ChmlCompQtyUnit = _UnitOfMeasure.UnitOfMeasure
--Link Operator of Lower Limit
association [0..1] to I_ChmlComponentOptrLowrLmt as _OperatorLowerLimit on $projection.ChmlCompOperatorLowerLimit = _OperatorLowerLimit.ChmlCompOperatorLowerLimit
--Link Operator of Upper Limit
association [0..1] to I_ChmlComponentOptrUprLmt as _OperatorUpperLimit on $projection.ChmlCompOperatorUpperLimit = _OperatorUpperLimit.ChmlCompOperatorUpperLimit
association [0..1] to I_ChmlComposition as _PolymerComposition on $projection.SubstanceUUID = _PolymerComposition.SubstanceUUID
and $projection.PolymerCompositionIntIDRef = _PolymerComposition.PolymerCompositionIntID
and _PolymerComposition.ChmlCompositionStatus = 'RE'
and _PolymerComposition.ChmlCompositionType = 'POLYMER'
{
--UUID of component
key ChemicalComponent.chmlcompuuid as ChmlCompUUID,
--UUID of chemical compliance information
@ObjectModel.foreignKey.association: '_ChmlCmplncInfo'
ChemicalComponent.chmlcmplncinfouuid as ChmlCmplncInfoUUID,
--UUID of referenced supplier material
ChemicalComponent.chmlsuplrmatluuid as ChmlSuplrMatlUUID,
--UUID of referenced substance (host substance)
ChemicalComponent.hostsubstanceuuid as HostSubstanceUUID,
--UUID of chemical composition
ChemicalComponent.chmlcompositionuuid as ChmlCompositionUUID,
--Date/Time of creation
@Semantics.systemDateTime.createdAt: true
ChemicalComponent.creationutcdatetime as CreationUTCDateTime,
--Created by
@Semantics.user.createdBy: true
ChemicalComponent.createdbyuser as CreatedByUser,
--Date/Time of change
@Semantics.systemDateTime.lastChangedAt: true
ChemicalComponent.lastchangeutcdatetime as LastChangeUTCDateTime,
--Changed by
@Semantics.user.lastChangedBy: true
ChemicalComponent.lastchangedbyuser as LastChangedByUser,
--UUID of Substance (component)
@ObjectModel.foreignKey.association: '_Substance'
ChemicalComponent.substanceuuid as SubstanceUUID,
--Indicator: Is a component removed - Neccessary for Calculation of Component Status
ChemicalComponent.chmlcompisremoved as ChmlCompIsRemoved,
--Role of Ingredient
@ObjectModel.foreignKey.association: '_ComponentType'
cast( ChemicalComponent.chmlcomptype as ehfnd_cci_ccomp_type_nce preserving type ) as ChmlCompType,
--Concentration of component
@Semantics.quantity.unitOfMeasure: 'ChmlCompQtyUnit'
/*=> if you specify "@Semantics.quantity.unitOfMeasure", you have to expose the unit of measure in the consumption view*/
ChemicalComponent.chmlcompqty as ChmlCompQty,
--Concentration as text (for correct formatting with decimals exactly as entered by user)
ChemicalComponent.chmlcompqtyastext as ChmlCompQtyAsText,
--Unit of measurment of concentration
@Semantics.unitOfMeasure: true
@ObjectModel.foreignKey.association: '_UnitOfMeasure'
ChemicalComponent.chmlcompqtyunit as ChmlCompQtyUnit,
--Operator Lower limit of concentration
@ObjectModel.foreignKey.association: '_OperatorLowerLimit'
ChemicalComponent.chmlcompoperatorlowerlimit as ChmlCompOperatorLowerLimit,
--Lower limit of concentration
@Semantics.quantity.unitOfMeasure: 'ChmlCompQtyUnit'
ChemicalComponent.chmlcompqtylowerlimit as ChmlCompQtyLowerLimit,
--Lower limit as text (for correct formatting with decimals exactly as entered by user)
ChemicalComponent.chmlcompqtylowerlimitastext as ChmlCompQtyLowerLimitAsText,
--Operator Upper limit of concentration
@ObjectModel.foreignKey.association: '_OperatorUpperLimit'
ChemicalComponent.chmlcompoperatorupperlimit as ChmlCompOperatorUpperLimit,
--Upper limit of concentration
@Semantics.quantity.unitOfMeasure: 'ChmlCompQtyUnit'
ChemicalComponent.chmlcompqtyupperlimit as ChmlCompQtyUpperLimit,
--Upper limit as text (for correct formatting with decimals exactly as entered by user)
ChemicalComponent.chmlcompqtyupperlimitastext as ChmlCompQtyUpperLimitAsText,
--Refrence of polymer composition integrate with Anlytical composition
ChemicalComponent.polymercompositionintidref as PolymerCompositionIntIDRef,
--Trade Secret: Identity is Masked
ChemicalComponent.pctrdscrtidentityismasked as PCTrdScrtIdentityIsMasked,
--Trade Secret: Range is marked
ChemicalComponent.pctrdscrtrangeismasked as PCTrdScrtRangeIsMasked,
/*Association*/
_ChemicalComposition,
_ChmlCmplncInfo,
_HostSubstance,
_Substance,
_PolymerComposition,
_ComponentType,
_UnitOfMeasure,
_OperatorLowerLimit,
_OperatorUpperLimit
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"EHFNDV_CCMPS_CMP"
],
"ASSOCIATED":
[
"I_CHMLCMPLNCINFO",
"I_CHMLCOMPONENTOPTRLOWRLMT",
"I_CHMLCOMPONENTOPTRUPRLMT",
"I_CHMLCOMPOSITION",
"I_CHMLCOMPTYPE",
"I_SUBSTANCE",
"I_SUBSTANCEENHANCED",
"I_UNITOFMEASURE"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/