I_PckgdCmplRqRsltMkt is a Composite CDS View that provides data about "CmplRqRslt Marketability for Packaged Products" in SAP S/4HANA. It reads from 1 data source (I_CmplRqRslt) and exposes 24 fields with key field CmplRqRsltUUID. It has 3 associations to related views.
@AbapCatalog.sqlViewName: 'IPCKGDCRRM'
@EndUserText.label: 'CmplRqRslt Marketability for Packaged Products'
@AbapCatalog.preserveKey:true@AbapCatalog.compiler.compareFilter:true
--Access Control: Authorizations Checks
@AccessControl:
{
authorizationCheck: #MANDATORY,
personalData.blocking: #NOT_REQUIRED
}
--Client Handling of the view@ClientHandling:
{
type: #INHERITED,
algorithm: #SESSION_VARIABLE
}
--VDM view type
@VDM.viewType: #COMPOSITE@ObjectModel:
{
--Performance Annotations
--Mandatory for non-private CDS views
--Optional for private CDS views
--Link: https://wiki.wdf.sap.corp/wiki/display/SuiteCDS/CDS+View+Performance
usageType:
{
dataClass: #MIXED,
sizeCategory: #XL,
serviceQuality: #C
}
}
defineview I_PckgdCmplRqRsltMkt
asselectfrom I_CmplRqRslt as CmplRqRslt
// Joinis to make sure that only CRVs of the ApplicationComponent 'PMA' are selected --> Where clause!
join I_CmplRqVers as CmplRqVers on CmplRqVers.CmplRqVersUUID = CmplRqRslt.CmplRqVersUUID
// Make sure that only CRRs for packagedproducts are selected
join I_ChmlCmplncProdAssgmt as PackagedProduct on PackagedProduct.ChmlCmplncInfoUUID = CmplRqRslt.ChmlCmplncInfoUUID
// Provide the full name of the Processor; e.g. "John Doe"
association [0..1] to I_BusinessUserBasic as _ProcessorUser on $projection.Processor = _ProcessorUser.BusinessPartner
// Provide the full name of the User who released a CRR
association [0..1] to I_BusinessUserBasic as _ReleasedByUser on $projection.ReleasedByUser = _ReleasedByUser.BusinessPartner
association [1..*] to I_ChmlCmplncMatlAssgmt as _ChmlCmplncMatlAssgmt on $projection.ChmlCmplncInfoUUID = _ChmlCmplncMatlAssgmt.ChmlCmplncInfoUUID
{
key CmplRqRslt.CmplRqRsltUUID,
CmplRqRslt.ChmlCmplncInfoUUID,
cast( PackagedProduct.ChmlCmplncProdUUID as ehfnd_cci_up_uuid preserving type ) as ChmlCmplncProdUUID,
CmplRqRslt.SubstanceUUID,
CmplRqRslt.ChmlSuplrMatlUUID,
CmplRqRslt.CmplRqVersUUID,
CmplRqRslt.ComplianceRequirement,
_ChmlCmplncMatlAssgmt.Material as Product,
CmplRqRslt.CmplRqRsltProcessingStatus,
CmplRqRslt.CmplRqRsltManualStatus,
CmplRqRslt.CmplRqRsltCalculatedStatus,
// Changed the logic of determination of CmplRqRsltCmplncSts due to merge of CRRs (IP and CA)
cast(
case// If CRR isin progress...
when CmplRqRslt.CmplRqRsltProcessingStatus = 'IP'
thencase// ...and manual status is 'Use Calculated'/'Unknown' and the calculated status isnot initial...
when CmplRqRslt.CmplRqRsltManualStatus = '03' and CmplRqRslt.CmplRqRsltCalculatedStatus isnot initial // Check for initial since the default value of CmplRqRsltCalculatedStatus is ''
// ...take the calculated status
then CmplRqRslt.CmplRqRsltCalculatedStatus
// ... and manual status isnot 'Unknown' OR calculated status is initial
when CmplRqRslt.CmplRqRsltManualStatus <> '03' or CmplRqRslt.CmplRqRsltCalculatedStatus is initial
// ... take the manual status
then CmplRqRslt.CmplRqRsltManualStatus
end// If CRR isin released...
when CmplRqRslt.CmplRqRsltProcessingStatus = 'RE'
// ... take the released compliance status
then CmplRqRslt.CmplRqRsltReldCmplncSts
endas ehfnd_crr_comp_stat preserving type ) as CmplRqRsltCmplncSts,
CmplRqRslt.Processor,
cast( _ProcessorUser.PersonFullName as ehfnd_processor_name preserving type ) as CmplRqRsltPrelimProcessorName,
CmplRqRslt.ReleasedByUser,
cast( _ReleasedByUser.PersonFullName as ehfnd_released_by_user_name preserving type ) as ReleasedByUserName,
//_CmplRqRsltTransientFields.ReldCmplRqRsltUUID,
cast( CmplRqRslt.CmplRqVersUUID as ehfnd_crr_reld_uuid preserving type ) as ReldCmplRqRsltUUID,
/* Associations */
_ChmlCmplncInfo,
_CmplRqVers,
_Substance,
_SupplierMaterial,
_ProcessorUser,
_ReleasedByUser,
_ChmlCmplncMatlAssgmt,
_ChmlCmplncMatlAssgmt._Product
}
where
CmplRqVers.CmplRqApplicationComponent = 'PMA'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_BUSINESSUSERBASIC",
"I_CHMLCMPLNCMATLASSGMT",
"I_CHMLCMPLNCPRODASSGMT",
"I_CMPLRQRSLT",
"I_CMPLRQVERS"
],
"ASSOCIATED":
[
"I_BUSINESSUSERBASIC",
"I_CHMLCMPLNCINFO",
"I_CHMLCMPLNCMATLASSGMT",
"I_CHMLSUPLRMATL",
"I_CMPLRQVERSENHANCED",
"I_PRODUCT",
"I_SUBSTANCEENHANCED"
],
"BASE":
[
"I_CHMLCMPLNCMATLASSGMT",
"I_CMPLRQRSLT"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/