I_UsageDecisionCodeGroup is a Basic CDS View (Dimension) that provides data about "Usage Decision Code Group" in SAP S/4HANA. It reads from 1 data source (qpgr) and exposes 7 fields with key field UsageDecisionCodeGroup. It has 1 association to related views.
@AbapCatalog.sqlViewName: 'IUSGDECCDGRP'
//@AbapCatalog.compiler.compareFilter: true@AbapCatalog.preserveKey: true@ClientHandling.algorithm: #SESSION_VARIABLE@EndUserText.label: 'Usage Decision Code Group'
@Analytics.dataCategory: #DIMENSION@Metadata.allowExtensions:true@VDM: {
viewType: #BASIC,
lifecycle.contract.type: #PUBLIC_LOCAL_API
}@AccessControl.authorizationCheck: #CHECK@ObjectModel.supportedCapabilities:
[ #SQL_DATA_SOURCE, #CDS_MODELING_DATA_SOURCE, #CDS_MODELING_ASSOCIATION_TARGET ]@ObjectModel.representativeKey: 'UsageDecisionCodeGroup'
@ObjectModel.usageType: {
dataClass: #CUSTOMIZING,
sizeCategory: #M,
serviceQuality: #A
}@Metadata.ignorePropagatedAnnotations: truedefineview I_UsageDecisionCodeGroup asselectfrom qpgr
association [0..*] to I_UsageDecisionCodeGroupText as _Text
on $projection.UsageDecisionCodeGroup = _Text.UsageDecisionCodeGroup
{
@ObjectModel.text.association: '_Text'
key qpgr.codegruppe as UsageDecisionCodeGroup,
// DB field has three values, but field shall be indicator
// @Semantics.booleanIndicator: true // It is boolean, but we cannot tag it, due to static code check
case qpgr.inaktiv
when ' ' thencast( ' ' as vdm_qm_codegroupisinactive preserving type )
elsecast( 'X' as vdm_qm_codegroupisinactive preserving type )
endas CodeGroupIsInactive,
qpgr.status as CodeGroupStatus,
@Semantics.user.createdBy: true
qpgr.ersteller as UsgeDcsnCodeGroupCreatedBy,
@Semantics.businessDate.at: true
qpgr.e_datum as UsgeDcsnCodeGroupCreatedOn,
@Semantics.user.lastChangedBy: true
qpgr.aenderer as UsgeDcsnCodeGroupLastChgdBy,
@Semantics.businessDate.at: true
qpgr.a_datum as UsgeDcsnCodeGroupLastChgdOn,
/* Associations */
_Text
}
where katalogart = '3' // Usage Decision
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"QPGR"
],
"ASSOCIATED":
[
"I_USAGEDECISIONCODEGROUPTEXT"
],
"BASE":
[],
"ANNO_REF":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/