I_ChmlCmplncInfoSrch is a Composite CDS View that provides data about "Chemical Compliance Info UP Launchpad Search" in SAP S/4HANA. It reads from 1 data source (I_ChmlCmplncInfo) and exposes 17 fields with key field ChmlCmplncInfoUUID. It has 5 associations to related views.
$projection.ChmlCmplncInfoUUID = _MaterialDataPrimary.ChmlCmplncInfoUUID and _MaterialDataPrimary.MatlAssgmtIsPrimary = 'X' ----------------------------------------------------------------------------------------------------------------------------------------------------------------- -- Associations used for searching. -----------------------------------------------------------------------------------------------------------------------------------------------------------------
_PurposeAssignment.ChmlCmplncInfoUUID = $projection.ChmlCmplncInfoUUID ----------------------------------------------------------------------------------------------------------------------------------------------------------------- -- Associations used for filtering hits. This information will shown in facets for additional filtering. -----------------------------------------------------------------------------------------------------------------------------------------------------------------
@EndUserText.label: 'Chemical Compliance Info UP Launchpad Search'
@AccessControl.authorizationCheck: #NOT_REQUIRED -- According to the wiki page for Search Model we need DCL only on the top CDS search model view which is ESH_S_CHMLCMPLNCINFOSRCH
@VDM.viewType: #COMPOSITE@AbapCatalog: {
sqlViewName: 'ICCIUPSRCH',
preserveKey: true
}@ObjectModel:
{
--Link: https://wiki.wdf.sap.corp/wiki/display/SuiteCDS/CDS+View+Performance
usageType:
{
dataClass: #MASTER,
sizeCategory: #L,
serviceQuality: #B
}
}
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
-- This viewis used for launchpad search of Unpackaged Products. The guidelines for CDS-based Search Models says that the search should be done on Interface View.
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
defineview I_ChmlCmplncInfoSrch
asselectfrom I_ChmlCmplncInfo as ChemicalCompliance
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Associations used for response information. This information will be only shown not search on.
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
association [0..1] to I_ChmlCmplncMatlAssgmt as _MaterialDataPrimary on $projection.ChmlCmplncInfoUUID = _MaterialDataPrimary.ChmlCmplncInfoUUID
and _MaterialDataPrimary.MatlAssgmtIsPrimary = 'X'
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Associations used for searching.
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
association [0..*] to I_ChmlCmplncMatlAssgmt as _MaterialAssignment on _MaterialAssignment.ChmlCmplncInfoUUID = $projection.ChmlCmplncInfoUUID
association [0..*] to I_ChmlCmplncPrpsAssgmt as _PurposeAssignment on _PurposeAssignment.ChmlCmplncInfoUUID = $projection.ChmlCmplncInfoUUID
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Associations used for filtering hits. This information will shown in facets for additional filtering.
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
association [0..*] to I_ChmlCmplncApplAssgmt as _Applications on _Applications.ChmlCmplncInfoUUID = $projection.ChmlCmplncInfoUUID
association [0..*] to I_ChmlCmplncMktReq as _Countries on _Countries.ChmlCmplncInfoUUID = $projection.ChmlCmplncInfoUUID
{
key ChemicalCompliance.ChmlCmplncInfoUUID as ChmlCmplncInfoUUID,
ChemicalCompliance.ChmlCmplncInternalName,
ChemicalCompliance.ChmlCmplncInfoUUID as ChmlCmplncInfoNavgnLink,
ChemicalCompliance.Specification as Specification,
_MaterialDataPrimary.Material as Material,
_MaterialDataPrimary._Product._Text[ 1: Language = $session.system_language ].ProductName as ProductName,
/**** Fields for DCL ****/
ProdStewardshipRespUnit,
MaterialIsTransported,
MaterialIsProduced,
MaterialIsSourced,
MaterialIsSold,
/**** Associations for searching ****/
_MaterialAssignment,
_PurposeAssignment,
_Applications,
_Countries,
/**** Associations for foreign keys ****/
_RespUnitForProductStewardship,
_MaterialDataPrimary._Product
}
where
ChemicalCompliance.ChmlCmplncInfoType = 'BU'
and(
ChemicalCompliance.MaterialIsSold = 'X'
or ChemicalCompliance.MaterialIsTransported = 'X'
or ChemicalCompliance.MaterialIsProduced = 'X'
)
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_CHMLCMPLNCINFO",
"I_CHMLCMPLNCMATLASSGMT",
"I_PRODUCT",
"I_PRODUCTTEXT"
],
"ASSOCIATED":
[
"I_CHMLCMPLNCAPPLASSGMT",
"I_CHMLCMPLNCMATLASSGMT",
"I_CHMLCMPLNCMKTREQ",
"I_CHMLCMPLNCPRPSASSGMT",
"I_PRODUCT",
"I_RESPONSIBLEUNIT"
],
"BASE":
[
"I_CHMLCMPLNCINFO",
"I_CHMLCMPLNCMATLASSGMT"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/