I_UsgeDcsnSelectedSetCode
Usage Decision Code in Selected Set
I_UsgeDcsnSelectedSetCode is a Basic CDS View (Dimension) that provides data about "Usage Decision Code in Selected Set" in SAP S/4HANA. It reads from 2 data sources (qpac, qpcd) and exposes 13 fields with key fields SelectedCodeSetPlant, SelectedCodeSet, UsageDecisionCodeGroup, UsageDecisionCode. It has 4 associations to related views.
Associations (4)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_Plant | _SelectedCodeSetPlant | $projection.SelectedCodeSetPlant = _SelectedCodeSetPlant.Plant |
| [0..1] | I_InspUsgeDcsnSelectedSet | _SelectedCodeSet | _SelectedCodeSet.SelectedCodeSetPlant = $projection.SelectedCodeSetPlant and _SelectedCodeSet.SelectedCodeSet = $projection.SelectedCodeSet |
| [0..1] | I_UsageDecisionCodeGroup | _UsageDecisionCodeGroup | $projection.UsageDecisionCodeGroup = _UsageDecisionCodeGroup.UsageDecisionCodeGroup |
| [0..1] | I_UsageDecisionCode | _UsageDecisionCode | $projection.UsageDecisionCodeGroup = _UsageDecisionCode.UsageDecisionCodeGroup and $projection.UsageDecisionCode = _UsageDecisionCode.UsageDecisionCode |
Annotations (16)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | IUDSELSETCD | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| EndUserText.label | Usage Decision Code in Selected Set | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| Analytics.dataCategory | #DIMENSION | view | |
| VDM.viewType | #BASIC | view | |
| VDM.lifecycle.contract.type | #PUBLIC_LOCAL_API | view | |
| ObjectModel.modelingPattern | #NONE | view | |
| ObjectModel.usageType.dataClass | #CUSTOMIZING | view | |
| ObjectModel.usageType.sizeCategory | #S | view | |
| ObjectModel.usageType.serviceQuality | #A | view | |
| ObjectModel.representativeKey | UsageDecisionCode | view | |
| Metadata.allowExtensions | true | view | |
| Metadata.ignorePropagatedAnnotations | true | view |
Fields (13)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | SelectedCodeSetPlant | qpac | werks | |
| KEY | SelectedCodeSet | qpac | auswahlmge | |
| KEY | UsageDecisionCodeGroup | qpac | codegruppe | |
| KEY | UsageDecisionCode | qpac | code | |
| InspLotUsageDecisionValuation | qpac | bewertung | ||
| InspectionLotQualityScore | qpac | qkennzahl | ||
| CodeIsInactive | ||||
| UsgeDcsnSeldSetCodeCrtedOn | qpac | e_datum | ||
| UsgeDcsnSeldSetCodeLastChgdOn | qpac | a_datum | ||
| _SelectedCodeSetPlant | _SelectedCodeSetPlant | |||
| _SelectedCodeSet | _SelectedCodeSet | |||
| _UsageDecisionCodeGroup | _UsageDecisionCodeGroup | |||
| _UsageDecisionCode | _UsageDecisionCode |
@AbapCatalog.sqlViewName: 'IUDSELSETCD'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@ClientHandling.algorithm: #SESSION_VARIABLE
@EndUserText.label: 'Usage Decision Code in Selected Set' //same as DDL description
@AccessControl.authorizationCheck: #CHECK
@Analytics.dataCategory: #DIMENSION
@VDM: {
viewType: #BASIC,
lifecycle.contract.type: #PUBLIC_LOCAL_API
}
@ObjectModel.supportedCapabilities:
[ #SQL_DATA_SOURCE, #CDS_MODELING_DATA_SOURCE, #CDS_MODELING_ASSOCIATION_TARGET ]
@ObjectModel.modelingPattern: #NONE
@ObjectModel.usageType: {
dataClass: #CUSTOMIZING,
sizeCategory: #S,
serviceQuality: #A
}
@ObjectModel.representativeKey: 'UsageDecisionCode'
@Metadata.allowExtensions: true // reason: RAL
@Metadata.ignorePropagatedAnnotations: true
define view I_UsgeDcsnSelectedSetCode
as select from qpac
inner join qpcd
on qpcd.katalogart = '3' // Usage Decision
and qpcd.codegruppe = qpac.codegruppe
and qpcd.code = qpac.code
association [0..1] to I_Plant as _SelectedCodeSetPlant
on $projection.SelectedCodeSetPlant = _SelectedCodeSetPlant.Plant
association [0..1] to I_InspUsgeDcsnSelectedSet as _SelectedCodeSet
on _SelectedCodeSet.SelectedCodeSetPlant = $projection.SelectedCodeSetPlant
and _SelectedCodeSet.SelectedCodeSet = $projection.SelectedCodeSet
association [0..1] to I_UsageDecisionCodeGroup as _UsageDecisionCodeGroup
on $projection.UsageDecisionCodeGroup = _UsageDecisionCodeGroup.UsageDecisionCodeGroup
association [0..1] to I_UsageDecisionCode as _UsageDecisionCode
on $projection.UsageDecisionCodeGroup = _UsageDecisionCode.UsageDecisionCodeGroup
and $projection.UsageDecisionCode = _UsageDecisionCode.UsageDecisionCode
{
@ObjectModel.foreignKey.association: '_SelectedCodeSetPlant'
key qpac.werks as SelectedCodeSetPlant,
//key katalogart as --> hard coded value '3' as where condition,
@ObjectModel.foreignKey.association: '_SelectedCodeSet'
key qpac.auswahlmge as SelectedCodeSet,
@ObjectModel.foreignKey.association: '_UsageDecisionCodeGroup'
key qpac.codegruppe as UsageDecisionCodeGroup,
key qpac.code as UsageDecisionCode,
// key qpac.versionam --> is always 1 so we could leave out
qpac.bewertung as InspLotUsageDecisionValuation,
qpac.qkennzahl as InspectionLotQualityScore,
//qpcd.inaktiv as CodeIsInactive,
cast(qpac.geloescht as vdm_qm_codeisinactive preserving type ) as CodeIsInactive,
// @Semantics.user.createdBy: true
// qpac.ersteller as UsgeDcsnSeldSetCodeCreatedBy, // Do not expose DPP related data
@Semantics.systemDate.createdAt: true
qpac.e_datum as UsgeDcsnSeldSetCodeCrtedOn,
// @Semantics.user.lastChangedBy: true
// qpac.aenderer as UsgeDcsnSeldSetCodeLastChgdBy, // Do not expose DPP related data
@Semantics.systemDate.lastChangedAt: true
qpac.a_datum as UsgeDcsnSeldSetCodeLastChgdOn,
/* Associations */
_SelectedCodeSetPlant,
_SelectedCodeSet,
_UsageDecisionCodeGroup,
_UsageDecisionCode
} where qpac.katalogart = '3' and qpac.versionam = '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