C_ChmlCmplncReqPrps is a Consumption CDS View that provides data about "Purpose Overview of a Chemical Compliance Request" in SAP S/4HANA. It reads from 1 data source (I_ChmlCmplncReqPrps) and exposes 12 fields with key fields CmplncPrpsUUID, ChmlCmplncRequestUUID, ChmlCmplncPrpsAssgmtUUID. It has 5 associations to related views.
@EndUserText.label: 'Purpose Overview of a Chemical Compliance Request'
@AbapCatalog:
{
sqlViewName: 'CCCREQPRPSASS',
compiler.compareFilter: true
}@AccessControl:
{
authorizationCheck: #CHECK
}@ClientHandling.algorithm: #SESSION_VARIABLE@VDM.viewType: #CONSUMPTION@ObjectModel:
{
semanticKey: [ 'CmplncPrpsUUID' ],
usageType:
{
/*Service Quality - reflects the quality of service with respect to the expected performance of the CDS view:
#A: may be consumed within business logic for high volume transactions or background processing
#B: may be consumed within business logic for transactions or background processing
*/
dataClass: #MIXED,
sizeCategory: #M,
serviceQuality: #C
}
}
@UI : {
headerInfo: {
typeName: 'Compliance Purpose to Verify',
typeNamePlural: 'Compliance Purposes to Verify',
title.value: 'CmplncPrpsName'
},
presentationVariant : {
sortOrder: [{by: 'ChmlCmplncRequestSortOrder', direction : #ASC}, {by: 'CmplncPrpsName', direction: #ASC }],
groupBy: ['ChmlCmplncRequestSortOrder'],
requestAtLeast: ['CmplncPrpsUUID',
'ChmlCmplncReqChgType',
'CmplncPrpsName'
]
},
-- used for the table line highlight indicator
lineItem:
{
criticality: 'Criticality'
}
}
--Search
@Search.searchable : truedefineview C_ChmlCmplncReqPrps
asselectfrom I_ChmlCmplncReqPrps as ChmlCmplnReqPrps
leftouter to one join I_ChmlCmplncReqPrpsAssgmt as _ChmlCmplncReqPrpsAssgmt on _ChmlCmplncReqPrpsAssgmt.ChmlCmplncRequestUUID = ChmlCmplnReqPrps.ChmlCmplncRequestUUID
and _ChmlCmplncReqPrpsAssgmt.CmplncPrpsUUID = ChmlCmplnReqPrps.CmplncPrpsUUID
association [1..1] to C_ChmlCmplncReqProcMkt as _ChmlCmplncReq on $projection.ChmlCmplncRequestUUID = _ChmlCmplncReq.ChmlCmplncRequestUUID
association [0..1] to P_ChmlCmplncPrpsMktRqmtCt as _PrpsMktRqmtCt on $projection.CmplncPrpsUUID = _PrpsMktRqmtCt.CmplncPrpsUUID
association [0..1] to P_ChmlCmplncPrpsDGRqmtCt as _PrpsDgRqmtCt on $projection.CmplncPrpsUUID = _PrpsDgRqmtCt.CmplncPrpsUUID
association [0..1] to P_ChmlCmplncPrpsSdsRqmtCt as _PrpsSdsRqmtCt on $projection.CmplncPrpsUUID = _PrpsSdsRqmtCt.CmplncPrpsUUID
// association [0..*] to I_CmplncPrpsText as _CmplncPrpsText on $projection.CmplncPrpsUUID = _CmplncPrpsText.CmplncPrpsUUID
association [0..*] to C_CmplncPrpsNameWithFallback as _CmplncPrpsTextFallback on $projection.CmplncPrpsUUID = _CmplncPrpsTextFallback.CmplncPrpsUUID
{
// Purpose UUID / Name
@UI:
{
lineItem:
{
position: 10,
importance: #HIGH,
label: 'Compliance Purpose'
},
textArrangement: #TEXT_ONLY
}
@ObjectModel:
{
text.element: ['CmplncPrpsFallbackName'],
readOnly: true
}key ChmlCmplnReqPrps.CmplncPrpsUUID,
@UI.hidden: true@ObjectModel.readOnly: truekey ChmlCmplnReqPrps.ChmlCmplncRequestUUID,
@UI.hidden: true@ObjectModel.readOnly: truekey ChmlCmplncPrpsAssgmtUUID,
-- Default Purpose Name
@UI.hidden: true@ObjectModel.readOnly: true
_CmplncPrpsTextFallback.CmplncPrps as CmplncPrpsFallbackName,
-- Purpose Name without default - used for search, because onDefault Purpose Name search not possible
@UI.hidden: true@ObjectModel.readOnly: true@Search: { defaultSearchElement: true, fuzzinessThreshold: 0.8 }
_CmplncPrpsTextFallback.CmplncPrpsName as CmplncPrpsName,
-- Purpose Name English - used for search
@UI.hidden: true@ObjectModel.readOnly: true@Search: { defaultSearchElement: true, fuzzinessThreshold: 0.8 }
_CmplncPrpsTextFallback.CmplncPrpsEnglishName as CmplncPrpsEnglishName,
-- Purpose Number - used for search
@UI.hidden: true@ObjectModel.readOnly: true@Search: { defaultSearchElement: true, fuzzinessThreshold: 0.8 }
ChmlCmplnReqPrps._Purpose.CmplncPrps as CmplncPrps,
-- Change Type
@UI: {
textArrangement: #TEXT_ONLY
}@ObjectModel:
{
readOnly: true,
text.element: [ 'ChmlCmplncReqChgTypeName' ]
}cast( casewhen _ChmlCmplncReqPrpsAssgmt.ChmlCmplncPrpsAssgmtUUID isnotnullthen
_ChmlCmplncReqPrpsAssgmt.ChmlCmplncReqChgType
else
'EXISTING'
endas ehfnd_crq_change_type ) as ChmlCmplncReqChgType,
@UI.hidden: true@ObjectModel.readOnly: true@ObjectModel.virtualElement@ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EHPMA_CPLREQ_PRPS_CALC_EXIT'
cast('' as val_text) as ChmlCmplncReqChgTypeName,
-- Item criticality
@UI.hidden: truecasewhen _ChmlCmplncReqPrpsAssgmt.ChmlCmplncPrpsAssgmtUUID isnotnullthencase _ChmlCmplncReqPrpsAssgmt.ChmlCmplncReqChgType
when 'MANUAL' then 3
else 0
endelse 0
endas Criticality,
-- Internal sort order@UI.hidden: true@ObjectModel.readOnly: truecasewhen _ChmlCmplncReqPrpsAssgmt.ChmlCmplncPrpsAssgmtUUID isnotnullthencase _ChmlCmplncReqPrpsAssgmt.ChmlCmplncReqChgType
when 'MANUAL' then 0
when 'REQUESTED' then 1
else 2
endelse 2
endas ChmlCmplncRequestSortOrder,
// Number of Compliance Requirement - Marketability
@UI:
{
lineItem:
{
position: 20,
importance: #HIGH
}
}
@ObjectModel.readOnly: true
_PrpsMktRqmtCt.NmbrOfChmlCmplncMktRqmts,
// Number of Compliance Requirement - Dangerous Goods
@UI:
{
lineItem:
{
position: 30,
importance: #HIGH
}
}
@ObjectModel.readOnly: true
_PrpsDgRqmtCt.NmbrOfChmlCmplncDngrsGdsRqmts,
// Number of Compliance Requirement - Safety Data Sheet
@UI:
{
lineItem:
{
position: 40,
importance: #HIGH
}
}
@ObjectModel.readOnly: true
_PrpsSdsRqmtCt.NmbrOfChmlCmplncDataShtRqmts,
/* Associations */
_ChmlCmplncReq
}