I_UsageDecisionCode
Usage Decision Code
I_UsageDecisionCode is a Basic CDS View (Dimension) that provides data about "Usage Decision Code" in SAP S/4HANA. It reads from 1 data source (qpcd) and exposes 9 fields with key fields UsageDecisionCodeGroup, UsageDecisionCode. It has 2 associations to related views.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| qpcd | qpcd | from |
Associations (2)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_UsageDecisionCodeGroup | _UsageDecisionCodeGroup | $projection.UsageDecisionCodeGroup = _UsageDecisionCodeGroup.UsageDecisionCodeGroup |
| [0..*] | I_UsageDecisionCodeText | _Text | $projection.UsageDecisionCodeGroup = _Text.UsageDecisionCodeGroup and $projection.UsageDecisionCode = _Text.UsageDecisionCode |
Annotations (14)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | IUSGDECCODE | view | |
| AbapCatalog.preserveKey | true | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| EndUserText.label | Usage Decision Code | view | |
| Analytics.dataCategory | #DIMENSION | view | |
| Metadata.allowExtensions | true | view | |
| VDM.viewType | #BASIC | view | |
| VDM.lifecycle.contract.type | #PUBLIC_LOCAL_API | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| ObjectModel.representativeKey | UsageDecisionCode | view | |
| ObjectModel.usageType.dataClass | #CUSTOMIZING | view | |
| ObjectModel.usageType.sizeCategory | #M | view | |
| ObjectModel.usageType.serviceQuality | #A | view | |
| Metadata.ignorePropagatedAnnotations | true | view |
Fields (9)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | UsageDecisionCodeGroup | qpcd | codegruppe | |
| KEY | UsageDecisionCode | qpcd | code | |
| UsageDecisionCodeText | ||||
| UsgeDcsnCodeCreatedBy | qpcd | ersteller | ||
| UsgeDcsnCodeCreatedOn | qpcd | e_datum | ||
| UsgeDcsnCodeLastChangedBy | qpcd | aenderer | ||
| UsgeDcsnCodeLastChangedOn | qpcd | a_datum | ||
| _UsageDecisionCodeGroup | _UsageDecisionCodeGroup | |||
| _Text | _Text |
@AbapCatalog.sqlViewName: 'IUSGDECCODE'
//@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@ClientHandling.algorithm: #SESSION_VARIABLE
@EndUserText.label: 'Usage Decision Code'
@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: 'UsageDecisionCode'
@ObjectModel.usageType: {
dataClass: #CUSTOMIZING,
sizeCategory: #M,
serviceQuality: #A
}
@Metadata.ignorePropagatedAnnotations: true
define view I_UsageDecisionCode as select from qpcd
association [0..1] to I_UsageDecisionCodeGroup as _UsageDecisionCodeGroup
on $projection.UsageDecisionCodeGroup = _UsageDecisionCodeGroup.UsageDecisionCodeGroup
association [0..*] to I_UsageDecisionCodeText as _Text
on $projection.UsageDecisionCodeGroup = _Text.UsageDecisionCodeGroup and
$projection.UsageDecisionCode = _Text.UsageDecisionCode
{
//--[ GENERATED:012:GlBfhyFV7kY4h7jYW0xcqG
@Consumption.valueHelpDefinition: [
{ entity: { name: 'I_UsageDecisionCodeGroupStdVH',
element: 'UsageDecisionCodeGroup' }
}]
// ]--GENERATED
@ObjectModel.foreignKey.association: '_UsageDecisionCodeGroup'
key qpcd.codegruppe as UsageDecisionCodeGroup,
// key qpcd.version --> is always 1 so we could leave out
@ObjectModel.text.association: '_Text'
key qpcd.code as UsageDecisionCode,
@Semantics.text: true
_Text[1:Language = $session.system_language].UsageDecisionCodeText,
// 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 qpcd.inaktiv
when ' ' then cast( ' ' as vdm_qm_codeisinactive preserving type )
else cast( 'X' as vdm_qm_codeisinactive preserving type )
end as CodeIsInactive,
@Semantics.user.createdBy: true
qpcd.ersteller as UsgeDcsnCodeCreatedBy,
@Semantics.businessDate.at: true
qpcd.e_datum as UsgeDcsnCodeCreatedOn,
@Semantics.user.lastChangedBy: true
qpcd.aenderer as UsgeDcsnCodeLastChangedBy,
@Semantics.businessDate.at: true
qpcd.a_datum as UsgeDcsnCodeLastChangedOn,
_UsageDecisionCodeGroup,
_Text
}
where qpcd.katalogart = '3' // Usage Decision
and qpcd.version = '000001'
Learn More
- What Is a CDS View in SAP S/4HANA?
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- CDS View Annotations — A Complete Guide
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA