I_ChmlCmplncCmplRqRsltCombined is a Composite CDS View that provides data about "Combined Compliance Requirement Results for CCIs" in SAP S/4HANA. It reads from 1 data source (P_ChmlCmplncCRRGrpByCRVers) and exposes 5 fields with key fields ChmlCmplncInfoUUID, CmplRqVersUUID. It has 3 associations to related views.
_ReleasedCmplRqRslt.ChmlCmplncInfoUUID = CmplRqRslt.ChmlCmplncInfoUUID and _ReleasedCmplRqRslt.CmplRqVersUUID = CmplRqRslt.CmplRqVersUUID and _ReleasedCmplRqRslt.CmplRqRsltProcessingStatus = 'RE' --Get the in process CRR for the CCI-CRV-assignment if there is one
_PrelimCmplRqRslt.ChmlCmplncInfoUUID = CmplRqRslt.ChmlCmplncInfoUUID and _PrelimCmplRqRslt.CmplRqVersUUID = CmplRqRslt.CmplRqVersUUID and _PrelimCmplRqRslt.CmplRqRsltProcessingStatus = 'IP' --Value helps to show translatable, human-readable texts instead of technical codes
@AbapCatalog.sqlViewName: 'ICCCRRCOMB'
@AbapCatalog.preserveKey: true@AbapCatalog.compiler.compareFilter: true@EndUserText.label: 'Combined Compliance Requirement Results for CCIs'
@AccessControl:{
authorizationCheck: #CHECK
}@ClientHandling:{
type: #INHERITED,
algorithm: #SESSION_VARIABLE
}@VDM.viewType: #COMPOSITE@ObjectModel.usageType:{
dataClass: #TRANSACTIONAL,
sizeCategory: #XL,
serviceQuality: #C
}/*----------------------------------------------------------------------------------------------------------------------
Purpose:
This view combines "released" and "in process" CR results for CCIs.
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_ChmlCmplncCmplRqRsltCombined
asselectfrom P_ChmlCmplncCRRGrpByCRVers as CmplRqRslt
--Get the released CRR for the CCI-CRV-assignment if there is one
/*+[hideWarning] { "IDS" : [ "CARDINALITY_CHECK" ] }*/association [0..1] to I_CmplRqRslt as _ReleasedCmplRqRslt on _ReleasedCmplRqRslt.ChmlCmplncInfoUUID = CmplRqRslt.ChmlCmplncInfoUUID
and _ReleasedCmplRqRslt.CmplRqVersUUID = CmplRqRslt.CmplRqVersUUID
and _ReleasedCmplRqRslt.CmplRqRsltProcessingStatus = 'RE'
--Get the in process CRR for the CCI-CRV-assignment if there is one
/*+[hideWarning] { "IDS" : [ "CARDINALITY_CHECK" ] }*/association [0..1] to I_CmplRqRslt as _PrelimCmplRqRslt on _PrelimCmplRqRslt.ChmlCmplncInfoUUID = CmplRqRslt.ChmlCmplncInfoUUID
and _PrelimCmplRqRslt.CmplRqVersUUID = CmplRqRslt.CmplRqVersUUID
and _PrelimCmplRqRslt.CmplRqRsltProcessingStatus = 'IP'
--Value helps to show translatable, human-readable texts instead of technical codes
association [0..1] to I_CmplRqRsltProcgStsVH as _CmplRqRsltProcgStsVH on $projection.CmplRqRsltProcessingStatus = _CmplRqRsltProcgStsVH.CmplRqRsltProcessingStatus
{
key CmplRqRslt.ChmlCmplncInfoUUID as ChmlCmplncInfoUUID,
key CmplRqRslt.CmplRqVersUUID as CmplRqVersUUID,
--Return the CRR UUID of the in process version
_PrelimCmplRqRslt.CmplRqRsltUUID as PrelimCmplRqRsltUUID,
--Return the CRR UUID of the released version
cast( _ReleasedCmplRqRslt.CmplRqRsltUUID as ehfnd_crr_reld_uuid preserving type ) as ReldCmplRqRsltUUID,
--If there is one CRR in process for this assignment, we return it asin process
cast(
coalesce(
_PrelimCmplRqRslt.CmplRqRsltProcessingStatus,
_ReleasedCmplRqRslt.CmplRqRsltProcessingStatus
) as ehfnd_crr_proc_status preserving type
) as CmplRqRsltProcessingStatus,
--Manual status
cast( _PrelimCmplRqRslt.CmplRqRsltManualStatus as ehfnd_crr_relstat preserving type) as CmplRqRsltManualStatus,
--Released status
cast( _ReleasedCmplRqRslt.CmplRqRsltReldCmplncSts as ehfnd_crr_relstat preserving type) as CmplRqRsltReldCmplncSts,
--Released Oncast(tstmp_to_dats( _ReleasedCmplRqRslt.ValidityStartDateTime,
abap_system_timezone( $session.client,'NULL'), // 'NULL' for on_error
$session.client,
'NULL' ) // on_error
as ehfnd_release_date preserving type) as ReleaseDate,
--Released By
_ReleasedCmplRqRslt.ReleasedByUser as ReleasedByUser,
--Released composition type
_ReleasedCmplRqRslt.ChmlCompositionType as ReldCmplRqRsltChmlCmpstnType,
--Released CRRs don't have processors, so we try to read it from the in process CRR
_PrelimCmplRqRslt.Processor as Processor,
_CmplRqRsltProcgStsVH,
_ReleasedCmplRqRslt,
_PrelimCmplRqRslt,
---- needed for authority check ----
CmplRqRslt._ChmlCmplncInfo
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_CMPLRQRSLT",
"P_CHMLCMPLNCCRRGRPBYCRVERS"
],
"ASSOCIATED":
[
"I_CHMLCMPLNCINFO",
"I_CMPLRQRSLT",
"I_CMPLRQRSLTPROCGSTSVH"
],
"BASE":
[
"P_CHMLCMPLNCCRRGRPBYCRVERS"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/