I_CmplncRqmtRsltCmplncStsVH is a Basic CDS View that provides data about "CRR Compliance Status Value Help" in SAP S/4HANA. It reads from 1 data source (dd07l) and exposes 3 fields with key field CmplRqRsltCmplncSts. It has 1 association to related views. Part of development package EHFND_BO_CRR.
@AbapCatalog.sqlViewName: 'ICRRCSTSVH'
@AbapCatalog.compiler.compareFilter: true@AbapCatalog.preserveKey:true@EndUserText.label: 'CRR Compliance Status Value Help'
-- CDS View Classification: 1. No data access restriction required
-- Reason: Value Help View for Domain Fix values
@AccessControl.authorizationCheck: #NOT_REQUIRED@ClientHandling.algorithm: #SESSION_VARIABLE@Metadata.ignorePropagatedAnnotations: true@VDM.viewType: #BASIC@ObjectModel:
{
representativeKey: 'CmplRqRsltCmplncSts',
usageType:
{
dataClass: #CUSTOMIZING,
sizeCategory: #S,
serviceQuality: #B
},
//by defining category=XS, the value help will be displayed as a DropDown list, see https://wiki.wdf.sap.corp/wiki/x/pZAoZQ
resultSet.sizeCategory: #XS,
dataCategory: #VALUE_HELP
}
@Search.searchable: true@Consumption.rankeddefine root view I_CmplncRqmtRsltCmplncStsVH
asselectfrom dd07l
// parent-child relation of the composition is based on the Sample Fix domain value helps see https://wiki.wdf.sap.corp/wiki/display/SuiteCDS/VDM+CDS+Code+List+Views+and+Services
composition [0..*] of I_CmplncRqmtRsltCmplncStsTxt as _Text
{
@UI.hidden: true@ObjectModel.text.association: '_Text'
keycast(domvalue_l as ehfnd_crr_overall_status ) as CmplRqRsltCmplncSts,
@Consumption.hidden: true@Consumption.filter.hidden: true@Search:
{
defaultSearchElement: true,
fuzzinessThreshold: 0.7,
ranking: #HIGH
}
domvalue_l as DomainValue,
-- The else-caseisleft out because this might cause performance issues, see https://wiki.wdf.sap.corp/wiki/x/oFNPc
@UI.hidden: true//case substring(ComplianceStatus.domvalue_l, 1,2)
case domvalue_l
when '01' then 3 // compliant -> green
when '02' then 3 // Not Applicable -> green
when '03' then 0 // Unknown -> neutral
when '04' then 1 // not compliant -> red
endas CmplRqRsltCmplncStsCriticality,
-- The else-caseisleft out because this might cause performance issues, see https://wiki.wdf.sap.corp/wiki/x/oFNPc
-- define sort order (unknown, not compliant, compliant, not applicable)
case domvalue_l
when '01' then 3 // Compliant
when '02' then 4 // Not Applicable
when '03' then 1 // Unknown
when '04' then 2 // Not Compliant
when '' then 0 // Empty value (for all views where the compliance status for in progress versions without released version is shown empty)
endas CmplRqRsltCmplncStsForSorting,
/* Associations */@UI.hidden: true
_Text
}
where
domname = 'EHFND_CRR_COMPSTAT'
and as4local = 'A'
and domvalue_l != '05'
and as4vers = '0000'