I_ChmlCmplncCmplRqRslt is a Composite CDS View that provides data about "Compliance Requirement Results for UP and PP" in SAP S/4HANA. It reads from 2 data sources (I_ChmlCmplncInfo, I_ChmlCmplncInfo) and exposes 19 fields with key fields ChmlCmplncInfoUUID, ChmlCmplncProdUUID, CmplRqVersUUID, ChmlCmplncProdUUID, CmplRqVersUUID. It has 2 associations to related views. Part of development package EHFND_BO_CCI.
@AbapCatalog.sqlViewName: 'ICCCRR'
@AbapCatalog.compiler.compareFilter: true@EndUserText.label: 'Compliance Requirement Results for UP and PP'
--Access Control: Authorizations Checks
@AccessControl:
{
authorizationCheck: #CHECK
}
--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
}
}
@Search.searchable: false/*----------------------------------------------------------------------------------------------------------------------
Purpose: This view returns the CRR information of unpackaged product and its related packaged products
This view provides information for the all views: In Progress and Released Versions, but showing only the released compliance status
It returns always one record for each CRV-CCI combination:
- the "in process" result if an "in process" result exists
- the "released" result if a "released" result exists
- a combined result if both - an "in process" and a "released" result exists
------------------------------------------------------------------------------------------------------------------------*/defineview I_ChmlCmplncCmplRqRslt
// Take into account CRRs of the unpackaged product
asselectfrom I_ChmlCmplncInfo as UnpackagedProduct
// use ChmlCmplncProdUUID to have the same associationlikein the lower select (no issue as info and prod UUID are equal here)
association [0..*] to I_ChmlCmplncCmplRqRsltCombined as _Combined on _Combined.ChmlCmplncInfoUUID = $projection.ChmlCmplncInfoUUID
association [0..1] to I_ChmlCmplncInfo as _ChmlCmplncInfo on _ChmlCmplncInfo.ChmlCmplncInfoUUID = $projection.ChmlCmplncProdUUID
{
// UUID of unpackaged product
key UnpackagedProduct.ChmlCmplncInfoUUID as ChmlCmplncInfoUUID,
// as the UUID of packaged product does not exist we set the UUID of the unpackaged product instead
key UnpackagedProduct.ChmlCmplncInfoUUID as ChmlCmplncProdUUID,
key _Combined.CmplRqVersUUID,
// CRR Info
_Combined.ReldCmplRqRsltUUID,
_Combined.CmplRqRsltProcessingStatus,
casewhen _Combined.PrelimCmplRqRsltUUID isnotnullthen _Combined.PrelimCmplRqRsltUUID
when _Combined.ReldCmplRqRsltUUID isnotnullthen _Combined.ReldCmplRqRsltUUID
endas CmplRqRsltUUID,
// If no released status is set, ne released version exists. So the value shall be "No released version exists".
// --> Therefore we set the domain value to '03'
casewhen _Combined.CmplRqRsltReldCmplncSts isnotnullthen _Combined.CmplRqRsltReldCmplncSts
when _Combined.CmplRqRsltReldCmplncSts isnullthen '03'
endas CmplRqRsltReldCmplncSts,
-- Indicator that there is an in progress version
cast(
casewhen _Combined.PrelimCmplRqRsltUUID isnotnullthen 'X'
endas ehfnd_crr_has_prelim_version preserving type
) as CmplRqRsltHasInProgressVersion,
--Released On
_Combined.ReleaseDate,
--Released By
_Combined.ReleasedByUser,
_Combined,
_ChmlCmplncInfo
}
-- Only for Unpackaged Product
where
UnpackagedProduct.ChmlCmplncInfoType = 'BU'
and(
UnpackagedProduct.MaterialIsSold = 'X'
or UnpackagedProduct.MaterialIsTransported = 'X'
or UnpackagedProduct.MaterialIsProduced = 'X'
)
// Take into account CRRs of the packaged product(s)
unionallselectfrom I_ChmlCmplncInfo as UnpackagedProduct
join I_ChmlCmplncProdAssgmt as PackagedProduct on PackagedProduct.ChmlCmplncProdUUID = UnpackagedProduct.ChmlCmplncInfoUUID
association [0..*] to I_ChmlCmplncCmplRqRsltCombined as _Combined on _Combined.ChmlCmplncInfoUUID = $projection.ChmlCmplncInfoUUID
association [0..1] to I_ChmlCmplncInfo as _ChmlCmplncInfo on _ChmlCmplncInfo.ChmlCmplncInfoUUID = $projection.ChmlCmplncProdUUID
{
// UUID of packaged product
key PackagedProduct.ChmlCmplncInfoUUID as ChmlCmplncInfoUUID, // incase of a packaged product set UUID of the packaged product
// UUID of unpackaged product
key UnpackagedProduct.ChmlCmplncInfoUUID as ChmlCmplncProdUUID,
key _Combined.CmplRqVersUUID,
// CRR Info
_Combined.ReldCmplRqRsltUUID,
_Combined.CmplRqRsltProcessingStatus,
casewhen _Combined.PrelimCmplRqRsltUUID isnotnullthen _Combined.PrelimCmplRqRsltUUID
when _Combined.ReldCmplRqRsltUUID isnotnullthen _Combined.ReldCmplRqRsltUUID
endas CmplRqRsltUUID,
// If no released status is set, ne released version exists. So the value shall be "No released version exists".
// --> Therefore we set the domain value to '03'
casewhen _Combined.CmplRqRsltReldCmplncSts isnotnullthen _Combined.CmplRqRsltReldCmplncSts
when _Combined.CmplRqRsltReldCmplncSts isnullthen '03'
endas CmplRqRsltReldCmplncSts,
-- Indicator that there is an in progress version
cast(
casewhen _Combined.PrelimCmplRqRsltUUID isnotnullthen 'X'
endas ehfnd_crr_has_prelim_version preserving type
) as CmplRqRsltHasInProgressVersion,
--Released On
_Combined.ReleaseDate,
--Released By
_Combined.ReleasedByUser,
_Combined,
_ChmlCmplncInfo
}
-- Only for Unpackaged Product
where
UnpackagedProduct.ChmlCmplncInfoType = 'BU'
and(
UnpackagedProduct.MaterialIsSold = 'X'
or UnpackagedProduct.MaterialIsTransported = 'X'
or UnpackagedProduct.MaterialIsProduced = 'X'
)