@EndUserText.label: 'Produced and Remaining Substances in Material Based Comp.'
@AbapCatalog:
{
sqlViewName: 'IMCMPSTNLPRDSBTP',
compiler.compareFilter: true
}
@AccessControl:
{
authorizationCheck: #MANDATORY
}
--Client Handling of the view
@ClientHandling.algorithm: #SESSION_VARIABLE
@VDM.viewType: #TRANSACTIONAL
@VDM.lifecycle.contract.type: #SAP_INTERNAL_API
@ObjectModel:
{
--Transactional Annotations for the generated BO
modelCategory: #BUSINESS_OBJECT,
transactionalProcessingEnabled: true,
createEnabled: true,
updateEnabled: true,
deleteEnabled: true,
writeDraftPersistence: 'EHFNDW_MCMPS_SCP',
writeActivePersistence: 'EHFNDV_CCMPS_CMP',
semanticKey: [ 'ChmlCompUUID' ],
usageType:
{
dataClass: #MASTER,
sizeCategory: #XL,
serviceQuality: #C
}
}
define view I_MatlBsdProducedSubstTP
--Select data from basic view 'Substances as Component'
as select from I_SubstBsdCmpstnComponent as ProducedSubst
--Nodes/Detaildata; link to parent
association [1..1] to I_MatlBasedCompositionTP as _MatlBasedComposition on $projection.ChmlCompositionUUID = _MatlBasedComposition.ChmlCompositionUUID
{
--UUID of component
key ProducedSubst.ChmlCompUUID as ChmlCompUUID,
--ActiveChmlCompUUID
ProducedSubst.ChmlCompUUID as ActiveChmlCompUUID ,
--UUID of chemical compliance information (UP containing the SubstanceUUID)
ProducedSubst.ChmlCmplncInfoUUID as ChmlCmplncInfoUUID,
--UUID of chemical composition
@ObjectModel.mandatory: true
@ObjectModel.foreignKey.association: '_MatlBasedComposition'
ProducedSubst.ChmlCompositionUUID as ChmlCompositionUUID,
--Date/Time of creation
@Semantics.systemDateTime.createdAt: true
@ObjectModel.readOnly: true
ProducedSubst.CreationUTCDateTime as CreationUTCDateTime,
--Created by
@Semantics.user.createdBy: true
@ObjectModel.readOnly: true
ProducedSubst.CreatedByUser as CreatedByUser,
--Date/Time of change
@Semantics.systemDateTime.lastChangedAt: true
@ObjectModel.readOnly: true
ProducedSubst.LastChangeUTCDateTime as LastChangeUTCDateTime,
--Changed by
@Semantics.user.lastChangedBy: true
@ObjectModel.readOnly: true
ProducedSubst.LastChangedByUser as LastChangedByUser,
--UUID of Substance
@ObjectModel.foreignKey.association: '_Substance'
@ObjectModel.mandatory: true
ProducedSubst.SubstanceUUID as SubstanceUUID,
--Role of Ingredient
@ObjectModel.mandatory: 'EXTERNAL_CALCULATION'
@ObjectModel.foreignKey.association: '_ComponentType'
cast( ProducedSubst.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*/
ProducedSubst.ChmlCompQty as ChmlCompQty,
--Concentration as text (for correct formatting with decimals exactly as entered by user)
ProducedSubst.ChmlCompQtyAsText as ChmlCompQtyAsText,
--Unit of measurement of concentration
@Semantics.unitOfMeasure: true
@ObjectModel.foreignKey.association: '_UnitOfMeasure'
ProducedSubst.ChmlCompQtyUnit as ChmlCompQtyUnit,
--Operator Lower limit of concentration
@ObjectModel.foreignKey.association: '_OperatorLowerLimit'
ProducedSubst.ChmlCompOperatorLowerLimit as ChmlCompOperatorLowerLimit,
--Lower limit of concentration
@Semantics.quantity.unitOfMeasure: 'ChmlCompQtyUnit'
ProducedSubst.ChmlCompQtyLowerLimit as ChmlCompQtyLowerLimit,
--Lower limit as text (for correct formatting with decimals exactly as entered by user)
ProducedSubst.ChmlCompQtyLowerLimitAsText as ChmlCompQtyLowerLimitAsText,
--Operator Upper limit of concentration
@ObjectModel.foreignKey.association: '_OperatorUpperLimit'
ProducedSubst.ChmlCompOperatorUpperLimit as ChmlCompOperatorUpperLimit,
--Upper limit of concentration
@Semantics.quantity.unitOfMeasure: 'ChmlCompQtyUnit'
ProducedSubst.ChmlCompQtyUpperLimit as ChmlCompQtyUpperLimit,
--Upper limit as text (for correct formatting with decimals exactly as entered by user)
ProducedSubst.ChmlCompQtyUpperLimitAsText as ChmlCompQtyUpperLimitAsText,
--Reference Internal ID
ProducedSubst.PolymerCompositionIntIDRef as PolymerCompositionIntIDRef,
--Indicator: Is a component removed - Neccessary for Calculation of Component Status
ProducedSubst.ChmlCompIsRemoved as ChmlCompIsRemoved,
ProducedSubst.MatlBsdCmpstnSubstType as MatlBsdCmpstnSubstType,
/* Associations */
@ObjectModel.association.type: [ #TO_COMPOSITION_ROOT, #TO_COMPOSITION_PARENT ]
_MatlBasedComposition,
_ChmlCmplncInfo,
_Substance,
_ComponentType,
_UnitOfMeasure,
_OperatorLowerLimit,
_OperatorUpperLimit
}
where
ProducedSubst.ChmlCompositionType = 'MATLBSD2'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_SUBSTBSDCMPSTNCOMPONENT"
],
"ASSOCIATED":
[
"I_CHMLCMPLNCINFO",
"I_CHMLCOMPONENTOPTRLOWRLMT",
"I_CHMLCOMPONENTOPTRUPRLMT",
"I_CHMLCOMPTYPE",
"I_MATLBASEDCOMPOSITIONTP",
"I_SUBSTANCEENHANCED",
"I_UNITOFMEASURE"
],
"BASE":
[
"I_SUBSTBSDCMPSTNCOMPONENT"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/