I_UsgeDcsnSelectedSetCode

DDL: I_USGEDCSNSELECTEDSETCODE SQL: IUDSELSETCD Type: view BASIC

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.

Data Sources (2)

SourceAliasJoin Type
qpac qpac from
qpcd qpcd inner

Associations (4)

CardinalityTargetAliasCondition
[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)

NameValueLevelField
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)

KeyFieldSource TableSource FieldDescription
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'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"QPAC",
"QPCD"
],
"ASSOCIATED":
[
"I_INSPUSGEDCSNSELECTEDSET",
"I_PLANT",
"I_USAGEDECISIONCODE",
"I_USAGEDECISIONCODEGROUP"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/