I_LineHierarchy
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.
Associations (5)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [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)
| Name | Value | Level | Field |
|---|---|---|---|
| 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)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| 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":""
}
}*/
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