C_ChmlCmplncPckgdProdAssgmt is a Consumption CDS View that provides data about "Packaged Product Assignment" in SAP S/4HANA. It reads from 1 data source (I_ChmlCmplncProdAssgmt) and exposes 17 fields with key field ChmlCmplncProdAssgmtUUID. It has 2 associations to related views. Part of development package EHFND_CNS_CCI.
@EndUserText.label: 'Packaged Product Assignment'
@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:
{
semanticKey: [ 'MaterialName' ],
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: #MASTER,
sizeCategory: #M,
serviceQuality: #C
}
}
@Metadata.allowExtensions: true@Search.searchable: truedefineviewentity C_ChmlCmplncPckgdProdAssgmt asselectfrom I_ChmlCmplncProdAssgmt
association [1..1] to C_ChmlCmplncMatlAssgmtTP as _MatAss on _MatAss.ChmlCmplncInfoUUID = $projection.ChmlCmplncInfoUUID
association [0..1] to C_ChmlCmplncPrimMatl as _UnpckgdProdMatDataPrimary on _UnpckgdProdMatDataPrimary.ChmlCmplncInfoUUID = $projection.ChmlCmplncProdUUID
{
key ChmlCmplncProdAssgmtUUID,
@ObjectModel.mandatory: true
ChmlCmplncInfoUUID,
@ObjectModel.mandatory: true
ChmlCmplncProdUUID,
@ObjectModel.readOnly: true@ObjectModel.text.element: ['MaterialName']@Search: {
defaultSearchElement : true,
fuzzinessThreshold: 0.7,
ranking: #MEDIUM
}
_MatAss.Material,
@ObjectModel.readOnly: true@Search: {
defaultSearchElement : true,
fuzzinessThreshold: 0.7,
ranking: #MEDIUM
}@Semantics.text:true
_MatAss.MaterialName,
@ObjectModel:
{
readOnly: true,
text.element: [ 'MaterialGroupName' ]
}
_MatAss.MaterialGroup,
@ObjectModel.readOnly: true
_MatAss.MaterialGroupName,
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
-- CCI Type and Roles
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
--Chemical Compliance Information Type
@ObjectModel.readOnly: true
_ChmlCmplncInfo.ChmlCmplncInfoType,
--Responsible Unit
@ObjectModel.readOnly: true
_ChmlCmplncInfo.ProdStewardshipRespUnit,
--Indicator: Chemical Compliance Information is transported
@ObjectModel.readOnly: true
_ChmlCmplncInfo.MaterialIsTransported,
--Indicator: Chemical Compliance Information is sold
@ObjectModel.readOnly: true
_ChmlCmplncInfo.MaterialIsSold,
--Indicator: Chemical Compliance Information is produced
@ObjectModel.readOnly: true
_ChmlCmplncInfo.MaterialIsProduced,
--Indicator: Chemical Compliance Information is sourced
@ObjectModel.readOnly: true
_ChmlCmplncInfo.MaterialIsSourced,
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Logistics Roles Info
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
@ObjectModel.virtualElement@ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EHFND_CCI_CHGROLE_CALC_EXIT'
@ObjectModel.readOnly: truecast('' as ehfnd_cci_log_role_info) as ChmlCmplncCurLogsRole,
@ObjectModel.virtualElement@ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EHFND_CCI_CHGROLE_CALC_EXIT'
@ObjectModel.readOnly: truecast('' as ehfnd_cci_chg_role_allwd preserving type) as ChmlCmplncChgLogsRoleIsAllwd,
/* Associations */
_ChmlCmplncInfoProduct,
_MatAss,
_UnpckgdProdMatDataPrimary
}
where _ChmlCmplncInfo.ChmlCmplncInfoType = 'PP'