I_LineHierarchy

DDL: I_LINEHIERARCHY SQL: IPPLINEHIERARCHY Type: view_entity BASIC

Line Hierarchy

I_LineHierarchy is a Basic CDS View (Dimension) that provides data about "Line Hierarchy" in SAP S/4HANA. It reads from 2 data sources (crhd, ldlh) and exposes 14 fields with key field LineHierarchyInternalID. It has 5 associations to related views.

Data Sources (2)

SourceAliasJoin Type
crhd crhd inner
ldlh ldlh from

Associations (5)

CardinalityTargetAliasCondition
[1..1] I_Plant _Plant $projection.Plant = _Plant.Plant
[0..*] I_LineHierarchyText_2 _Text $projection.LineHierarchyInternalID = _Text.LineHierarchyInternalID and _Text.WorkCenterTypeCode = 'A'
[1..1] I_User _CreatedByUser $projection.CreatedByUser = _CreatedByUser.UserID
[0..1] I_User _LastChangedByUser $projection.LastChangedByUser = _LastChangedByUser.UserID
[0..1] I_UnitOfMeasure _RateUnit $projection.LineHierarchyRateUnit = _RateUnit.UnitOfMeasure

Annotations (14)

NameValueLevelField
AccessControl.authorizationCheck #CHECK view
AccessControl.personalData.blocking #NOT_REQUIRED view
Analytics.dataCategory #DIMENSION view
Metadata.allowExtensions true view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.modelingPattern #ANALYTICAL_DIMENSION view
ObjectModel.representativeKey LineHierarchyInternalID view
ObjectModel.usageType.serviceQuality #B view
ObjectModel.usageType.sizeCategory #M view
ObjectModel.usageType.dataClass #MASTER view
VDM.viewType #BASIC view
VDM.lifecycle.contract.type #PUBLIC_LOCAL_API view
Search.searchable true view
EndUserText.label Line Hierarchy view

Fields (14)

KeyFieldSource TableSource FieldDescription
KEY LineHierarchyInternalID ldlh lnid
LineHierarchy
Plant crhd werks
CreationDate ldlh andat
CreatedByUser
LastChangeDate ldlh aedat
LastChangedByUser
LineHierarchyRateUnit ldlh lunit
lrateasMaximumRateQuantity
_Plant _Plant
_Text _Text
_CreatedByUser _CreatedByUser
_LastChangedByUser _LastChangedByUser
_RateUnit _RateUnit
//@AbapCatalog.sqlViewName: 'IPPLINEHIERARCHY'

//@AbapCatalog.compiler.compareFilter: true

//@AbapCatalog.preserveKey: true 

@AccessControl.authorizationCheck: #CHECK
@AccessControl.personalData.blocking: #NOT_REQUIRED
@AccessControl.privilegedAssociations: ['_CreatedByUser', '_LastChangedByUser']
@Analytics.dataCategory: #DIMENSION
//@ClientHandling.algorithm: #SESSION_VARIABLE

@Metadata.allowExtensions: true
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.modelingPattern: #ANALYTICAL_DIMENSION
@ObjectModel.supportedCapabilities: [#ANALYTICAL_DIMENSION, #CDS_MODELING_ASSOCIATION_TARGET, #SQL_DATA_SOURCE, #CDS_MODELING_DATA_SOURCE, #SEARCHABLE_ENTITY]
@ObjectModel.representativeKey: 'LineHierarchyInternalID'
@ObjectModel.semanticKey: ['LineHierarchy', 'Plant']
@ObjectModel.usageType: {serviceQuality: #B, sizeCategory: #M, dataClass: #MASTER}
@VDM.viewType: #BASIC
@VDM.lifecycle.contract.type: #PUBLIC_LOCAL_API
@Search.searchable: true
@EndUserText.label: 'Line Hierarchy'

define view entity I_LineHierarchy
//define view I_LineHierarchy

  as select from ldlh as ldlh
    inner join   crhd as crhd on  crhd.objid = ldlh.lnid
                              and crhd.objty = 'A'

  association [1..1] to I_Plant               as _Plant             on  $projection.Plant = _Plant.Plant
  association [0..*] to I_LineHierarchyText_2 as _Text              on  $projection.LineHierarchyInternalID = _Text.LineHierarchyInternalID
                                                                    and _Text.WorkCenterTypeCode = 'A'
  association [1..1] to I_User                as _CreatedByUser     on  $projection.CreatedByUser = _CreatedByUser.UserID
  association [0..1] to I_User                as _LastChangedByUser on  $projection.LastChangedByUser = _LastChangedByUser.UserID
  association [0..1] to I_UnitOfMeasure       as _RateUnit          on  $projection.LineHierarchyRateUnit = _RateUnit.UnitOfMeasure
{
      // Key

      @ObjectModel.text.association: '_Text'
  key ldlh.lnid                                                   as LineHierarchyInternalID,

      // Attributes

      @Search: {defaultSearchElement: true, ranking: #HIGH, fuzzinessThreshold: 0.8}
      cast(crhd.arbpl as ld_line preserving type)                 as LineHierarchy,
      @ObjectModel.foreignKey.association: '_Plant'
      crhd.werks                                                  as Plant,

      // Administartive

      @Semantics.systemDate.createdAt: true
      ldlh.andat                                                  as CreationDate,
      @Semantics.user.createdBy: true
      cast(ldlh.annam as vdm_createdbyuserid preserving type)     as CreatedByUser,
      @Semantics.systemDate.lastChangedAt: true
      ldlh.aedat                                                  as LastChangeDate,
      @Semantics.user.lastChangedBy: true
      cast(ldlh.aenam as vdm_lastchangedbyuserid preserving type) as LastChangedByUser,
 
      // Measures

//      @Semantics.unitOfMeasure: true

      ldlh.lunit                                                  as LineHierarchyRateUnit,
--    @Semantics.quantity.unitOfMeasure: 'LineHierarchyRateUnit'
--    @DefaultAggregation: #MAX
--    ldlh.lrate                                                  as MaximumRateQuantity,
 
      // Associations

      _Plant,
      _Text,
      _CreatedByUser,
      _LastChangedByUser,
      _RateUnit
}
where ldlh.zaehl = '00000000';
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"CRHD",
"LDLH"
],
"ASSOCIATED":
[
"I_LINEHIERARCHYTEXT_2",
"I_PLANT",
"I_UNITOFMEASURE",
"I_USER"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/