@EndUserText.label: 'Chemical Compliance of Unpackaged Product'
@AbapCatalog:
{
sqlViewName: 'CCCINFOTP',
compiler.compareFilter: true
}
@ClientHandling.algorithm: #SESSION_VARIABLE
@Metadata: {
allowExtensions: true
}
@AccessControl:
{
authorizationCheck: #MANDATORY,
// blocking of personal data not required (no personal data fields exposed for material (MARA))
personalData.blocking: #NOT_REQUIRED
}
@VDM.viewType: #CONSUMPTION
@ObjectModel:
{
compositionRoot: true,
transactionalProcessingDelegated: true,
createEnabled: true,
updateEnabled: 'EXTERNAL_CALCULATION',
deleteEnabled: 'EXTERNAL_CALCULATION',
draftEnabled: true,
//use the specification id as semantic key (instead of combined name)
semanticKey: [ 'Specification' ],
usageType:
{
dataClass: #MASTER,
sizeCategory: #M,
// Too many underlying tables, more than half of them for showing / navigating to the compositions:
// 9 each for Analytical and MatlBased Composition (CCI, IP Comp, IP Comp-Draft, IP Status, IP Action Name, RE Comp, RE Status, RE Action Name, NE Action Name)
serviceQuality: #C
}
}
// for CoPilot navigation
@Consumption.semanticObject: 'UnpackagedChemicalInfo'
@Search.searchable : true
define view C_ChmlCmplncInfoTP
--Select data from transactional view of Chemical Compliance Information
as select from I_ChmlCmplncInfoTP
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Nodes
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Linked Logistic Matererial
association [0..*] to C_ChmlCmplncMatlAssgmtTP as _MaterialAssignment on _MaterialAssignment.ChmlCmplncInfoUUID = $projection.ChmlCmplncInfoUUID
-- Linked Packaged Product
association [0..*] to C_ChmlCmplncProdAssgmt as _ActiveProductAssignment on _ActiveProductAssignment.ChmlCmplncProdUUID = $projection.ActiveChmlCmplncInfoUUID
-- Market Requests
association [0..*] to C_ChmlCmplncMktReqTP as _MarketRequest on _MarketRequest.ChmlCmplncInfoUUID = $projection.ChmlCmplncInfoUUID
-- Purposes
association [0..*] to C_ChmlCmplncPrpsAssgmtTP as _PurposeAssignment on _PurposeAssignment.ChmlCmplncInfoUUID = $projection.ChmlCmplncInfoUUID
-- Applications
association [0..*] to C_ChmlCmplncApplAssgmtTP as _Application on _Application.ChmlCmplncInfoUUID = $projection.ChmlCmplncInfoUUID
-- Uses
association [0..*] to C_ChmlCmplncUse as _Uses on _Uses.ChmlCmplncInfoUUID = $projection.ChmlCmplncInfoUUID
-- Compositions
association [0..*] to C_AssociatedProductComposition as _Composition on _Composition.ChmlCmplncInfoUUID = $projection.ChmlCmplncInfoUUID
association [0..1] to P_AssociatedAnlytlCmpstnProd as _AnlytlCmpstn on $projection.ChmlCmplncInfoUUID = _AnlytlCmpstn.ChmlCmplncInfoUUID
-- Properties
association [0..*] to C_ChmlCmplncInfoAssgdPCPrpty as _Properties on _Properties.ChmlCmplncInfoUUID = $projection.ChmlCmplncInfoUUID
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Additional Information
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Material Data for Primary Material
association [0..1] to C_ChmlCmplncPrimMatl as _MaterialDataPrimary on _MaterialDataPrimary.ChmlCmplncInfoUUID = $projection.ActiveChmlCmplncInfoUUID
-- Active or Draft
association [1..1] to I_ChmlCmplncInfoActiveDraft as _ActiveDraftCCI on $projection.ActiveChmlCmplncInfoUUID = _ActiveDraftCCI.ActiveChmlCmplncInfoUUID
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Value Helps --
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
association [0..1] to C_ChmlCmplncRespUnitDngrsGdsVH as _RespDangerousGoodsVH on _RespDangerousGoodsVH.ResponsibleUnit = $projection.DngrsGdsRespUnit
association [0..1] to C_ChmlCmplncRespUnitProductVH as _RespProductStewardshipVH on _RespProductStewardshipVH.ResponsibleUnit = $projection.ProdStewardshipRespUnit
association [0..1] to P_CChmlCmplConstants as _CChmlCmplConstants on _CChmlCmplConstants.Constant0 = _CChmlCmplConstants.Constant0
{
@ObjectModel.readOnly: true
--UUID of Chemical Compliance Information
key I_ChmlCmplncInfoTP.ChmlCmplncInfoUUID,
--UUID of active Chemical Compliance Information
I_ChmlCmplncInfoTP.ActiveChmlCmplncInfoUUID,
--Navigation Link (used for role header navigation)
@ObjectModel.readOnly: true
I_ChmlCmplncInfoTP.ActiveChmlCmplncInfoUUID as ChmlCmplncInfoNavgnLink,
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
// General data of chemical compliance information
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
--Internal Name of Chemical Compliance Information
ChmlCmplncInternalName,
--Number of Unprocessed Requests
@ObjectModel.readOnly: true
@ObjectModel.virtualElement
@ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EHFND_CCI_UNPROC_REQ_EXIT'
cast( 0 as ehfnd_cci_number_of_req ) as NmbrOfUnprocessedChmlCmplncReq,
--Name of Chemical Compliance Information (either material name of primary material or internal name)
@ObjectModel.readOnly: true
_MaterialDataPrimary.ChmlCmplncInfoCombinedName,
--Responsible Unit of Product Stewardship
@ObjectModel:
{
mandatory: true,
foreignKey.association: '_RespProductStewardshipVH',
text.element: [ 'ProdStewardshipRespUnitName' ]
}
@Semantics.text: true
cast(ProdStewardshipRespUnit as ehfnd_cci_responsible_unit preserving type ) as ProdStewardshipRespUnit,
--Description of Responsible Unit of Product Stewardship
@ObjectModel.readOnly: true
@Semantics.text: true
_RespProductStewardshipVH.ResponsibleUnitName as ProdStewardshipRespUnitName,
-- Responsible Unit for Dangerous Goods
@ObjectModel:
{
mandatory: true,
foreignKey.association: '_RespDangerousGoodsVH',
text.element: [ 'DngrsGdsRespUnitName' ]
}
@Semantics.text: true
DngrsGdsRespUnit,
--Description of Responsible Unit of Dangerous Goods
@ObjectModel.readOnly: true
@Semantics.text: true
_RespDangerousGoodsVH.ResponsibleUnitName as DngrsGdsRespUnitName,
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
-- CCI Type and Roles
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
--Chemical Compliance Information Type
ChmlCmplncInfoType,
-- Logistics Roles
@ObjectModel.readOnly: true
MaterialIsTransported,
@ObjectModel.readOnly: true
MaterialIsSold,
@ObjectModel.readOnly: true
MaterialIsProduced,
@ObjectModel.readOnly: true
MaterialIsSourced,
@ObjectModel.readOnly: true
MaterialIsDisposed,
@ObjectModel.readOnly: true
MaterialIsEmissionRelevant,
--R&D Indicator: Product is in research
ChmlCmplncProdIsResearched,
@Semantics.booleanIndicator: true
@ObjectModel.readOnly: true
_ActiveDraftCCI.ChmlCmplncInfoIsActiveEntity as ChmlCmplncInfoIsActiveEntity,
@ObjectModel.readOnly: true
I_ChmlCmplncInfoTP.ActiveChmlCmplncInfoUUID as CmplRqRsltNavgnLink,
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
// Data of assigned material with indicator "primary material"
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
--Primary Material of Chemical Compliance Information (assigned in material assignment)
@ObjectModel.readOnly: true
_MaterialDataPrimary.Material,
--Material Name of Primary Material
@ObjectModel.readOnly: true
@Semantics.text: true
_MaterialDataPrimary.MaterialName,
// -----------------------------------------------------------------------------------------------------------------------------------------------------------------
// // Data of purpose assignment
// -----------------------------------------------------------------------------------------------------------------------------------------------------------------
// --Purpose Assignment Status
// @UI:
// {
// fieldGroup:
// {
// qualifier: 'PurposeAssStatus',
// position: 10,
// importance: #HIGH
// },
// textArrangement: #TEXT_ONLY
// }
// @ObjectModel:
// {
// text.element: [ 'ChmlCmplncPrpsAssgmtStatusName' ]
// }
// @Consumption.valueHelp: '_PrpsAssignmentStatusVH'
// ChmlCmplncPrpsAssgmtStatus,
//
// --Description of purpose assignment status
// @UI.hidden: true
// @ObjectModel.readOnly: true
// @Semantics.text: true
// _PurposeAssignmentStatus._Text[1: Language = $session.system_language ].ChmlCmplncPrpsAssgmtStatusName,
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
// Specification Data
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
--Specification with intent-based navigation
@ObjectModel.readOnly: true
Specification,
@ObjectModel.readOnly: true
@Semantics.systemDate.lastChangedAt: true
LastChangeUTCDateTime,
@ObjectModel.text.element: ['LastChangedByUserName']
@ObjectModel.readOnly: true
LastChangedByUser as LastChangedByUser,
@Semantics.name.fullName: true
@ObjectModel.readOnly: true
cast( _LastChangedByUser.UserDescription as ehfnd_bo_lchg_uname_enhanced preserving type ) as LastChangedByUserName,
@ObjectModel.readOnly: true
@ObjectModel.virtualElement
@ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EHFND_CAL_POLYMER_OECD_EXIT'
@Semantics.booleanIndicator: true
cast( '' as ehfnd_sub_polymer_oecd ) as PolymerIsBsdOnOECDDef,
--- Product Categorization
@ObjectModel.readOnly: true
@ObjectModel.text.element: ['ChmlCmplncProdCatztnPhrsText']
@UI:{
textArrangement: #TEXT_ONLY
}
_AnlytlCmpstn.ChmlCmplncProdCatztnPhrsUUID as ChmlCmplncProdCatztnPhrsUUID,
@ObjectModel.readOnly: true
@ObjectModel:{
virtualElement: true,
virtualElementCalculatedBy: 'ABAP:CL_EHFND_PRPTY_PHRS_EXIT'
}
cast('' as ehfnd_phrs_text ) as ChmlCmplncProdCatztnPhrsText,
-------------------------------------------------------------------------------------------------------
/*Navigation Links: PhysChem, EcoTox, SafetyRelated*/
-------------------------------------------------------------------------------------------------------
--PhysChem Property: UUID for Navigation into PhysChem Property
@Semantics.uuid: true
@ObjectModel.readOnly: true
@ObjectModel.virtualElement
@ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EHFND_NAVGN_LINK_CALC_EXT'
cast(_CChmlCmplConstants.ConstantEmptyRaw16 as ehfnd_physchem_uuid ) as PCPhysPrptyNavgnLinkUUID,
--PhysChem Property: Is active entity
@ObjectModel.readOnly: true
@ObjectModel.virtualElement
@ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EHFND_NAVGN_LINK_CALC_EXT'
cast( '' as sdraft_is_active preserving type ) as PCPhysPrptyIsActive,
--Safety Related Property: UUID for Navigation into Safety Related Property
@ObjectModel.readOnly: true
@ObjectModel.virtualElement
@ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EHFND_NAVGN_LINK_CALC_EXT'
cast(_CChmlCmplConstants.ConstantEmptyRaw16 as ehfnd_sr_uuid ) as PCSftyPrptyNavgnLinkUUID,
--Safety Related Property: Is active entity
@ObjectModel.readOnly: true
@ObjectModel.virtualElement
@ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EHFND_NAVGN_LINK_CALC_EXT'
cast( '' as sdraft_is_active preserving type ) as PCSftyPrptyIsActive,
--Ecotox Property: UUID for Navigation into Ecotox Property
@ObjectModel.readOnly: true
@ObjectModel.virtualElement
@ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EHFND_NAVGN_LINK_CALC_EXT'
cast(_CChmlCmplConstants.ConstantEmptyRaw16 as ehfnd_ectx_uuid ) as PCEctxPrptyNavgnLinkUUID,
--Ecotox Property: Is active entity
@ObjectModel.readOnly: true
@ObjectModel.virtualElement
@ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EHFND_NAVGN_LINK_CALC_EXT'
cast( '' as sdraft_is_active preserving type ) as PCEctxPrptyIsActive,
-------------------------------------------------------------------------------------------------------
--Information for Navigation to associated compositions
-------------------------------------------------------------------------------------------------------
--Analytical composition: Released UUID
@ObjectModel.readOnly: true
@ObjectModel.virtualElement
@ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EHFND_NAVGN_LINK_CALC_EXT'
cast(_CChmlCmplConstants.ConstantEmptyRaw16 as ehfnd_cci_ccmps_uuid ) as AnalyticCmpstnNavgnLinkUUID,
--Analytical composition: Is active entity
@ObjectModel.readOnly: true
@ObjectModel.virtualElement
@ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EHFND_NAVGN_LINK_CALC_EXT'
cast( '' as sdraft_is_active preserving type ) as AnalyticCmpstnIsActive,
--Material based composition: Navigation Link
@ObjectModel.readOnly: true
@ObjectModel.virtualElement
@ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EHFND_NAVGN_LINK_CALC_EXT'
cast(_CChmlCmplConstants.ConstantEmptyRaw16 as ehfnd_cci_ccmps_uuid ) as MatlBsdCmpstnNavgnLinkUUID,
--Material based composition: Is active entity
@ObjectModel.readOnly: true
@ObjectModel.virtualElement
@ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EHFND_NAVGN_LINK_CALC_EXT'
cast( '' as sdraft_is_active preserving type ) as MatlBsdCmpstnIsActive,
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
/* Associations */
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
@ObjectModel.association.type: [ #TO_COMPOSITION_CHILD ]
_MaterialAssignment,
@ObjectModel.association.type: [ #TO_COMPOSITION_CHILD ]
_MarketRequest,
@ObjectModel.association.type: [ #TO_COMPOSITION_CHILD ]
_PurposeAssignment,
@ObjectModel.association.type: [ #TO_COMPOSITION_CHILD ]
_Application,
_Composition,
_Properties,
_Uses,
_ActiveProductAssignment,
_MaterialDataPrimary,
_RespProductStewardshipVH,
_RespDangerousGoodsVH
}
-- Only for Unpackaged Product
where
ChmlCmplncInfoType = 'BU'
and(
MaterialIsSold = 'X'
or MaterialIsProduced = 'X'
// or MaterialIsTransported = 'X' - No longer a mandatory role - PSSPROD-3445
)
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"C_CHMLCMPLNCPRIMMATL",
"C_CHMLCMPLNCRESPUNITDNGRSGDSVH",
"C_CHMLCMPLNCRESPUNITPRODUCTVH",
"I_CHMLCMPLNCINFOACTIVEDRAFT",
"I_CHMLCMPLNCINFOTP",
"I_USER",
"P_ASSOCIATEDANLYTLCMPSTNPROD",
"P_CCHMLCMPLCONSTANTS"
],
"ASSOCIATED":
[
"C_ASSOCIATEDPRODUCTCOMPOSITION",
"C_CHMLCMPLNCAPPLASSGMTTP",
"C_CHMLCMPLNCINFOASSGDPCPRPTY",
"C_CHMLCMPLNCMATLASSGMTTP",
"C_CHMLCMPLNCMKTREQTP",
"C_CHMLCMPLNCPRIMMATL",
"C_CHMLCMPLNCPRODASSGMT",
"C_CHMLCMPLNCPRPSASSGMTTP",
"C_CHMLCMPLNCRESPUNITDNGRSGDSVH",
"C_CHMLCMPLNCRESPUNITPRODUCTVH",
"C_CHMLCMPLNCUSE",
"I_CHMLCMPLNCINFOACTIVEDRAFT",
"P_ASSOCIATEDANLYTLCMPSTNPROD",
"P_CCHMLCMPLCONSTANTS"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/