I_CostElementTP
G/L Account in CtrlgArea (Draft 2.0)
I_CostElementTP is a Transactional CDS View that provides data about "G/L Account in CtrlgArea (Draft 2.0)" in SAP S/4HANA. It reads from 2 data sources (P_GLAcctNotMarkForDeletion, I_CostElement) and exposes 20 fields with key fields ChartOfAccounts, GLAccount, ControllingArea. It has 5 associations to related views.
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| P_GLAcctNotMarkForDeletion | _PostableGLAccount | left_outer |
| I_CostElement | I_CostElement | from |
Associations (5)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [1..1] | I_GLAcctInChtAcctsTP | _GLAcctInChtAcctsTP | $projection.ChartOfAccounts = _GLAcctInChtAcctsTP.ChartOfAccounts and $projection.GLAccount = _GLAcctInChtAcctsTP.GLAccount |
| [0..1] | I_ControllingArea | _ControllingArea | $projection.ControllingAreaForEdit = _ControllingArea.ControllingArea and $projection.ChartOfAccountsForEdit = _ControllingArea.ChartOfAccounts |
| [0..1] | I_CostElementCategory | _CostElementCategory | $projection.CostElementCategory = _CostElementCategory.CostElementCategory |
| [0..1] | I_UnitOfMeasure | _UnitOfMeasure | $projection.UnitOfMeasure = _UnitOfMeasure.UnitOfMeasure |
| [0..1] | I_FunctionalArea | _FunctionalArea | $projection.FunctionalArea = _FunctionalArea.FunctionalArea |
Annotations (12)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.sqlViewName | ICOELTP | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| EndUserText.label | G/L Account in CtrlgArea (Draft 2.0) | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| ObjectModel.writeDraftPersistence | CSKB_DRAFT_20 | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| ObjectModel.usageType.serviceQuality | #D | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| Search.searchable | true | view | |
| VDM.viewType | #TRANSACTIONAL | view |
Fields (20)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | ChartOfAccounts | I_CostElement | ChartOfAccounts | |
| KEY | GLAccount | I_CostElement | GLAccount | |
| KEY | ControllingArea | I_CostElement | ControllingArea | |
| ControllingAreaForEdit | I_CostElement | ControllingArea | ||
| ChartOfAccountsForEdit | _GLAcctInChtAcctsTP | ChartOfAccounts | ||
| GLAccountForEdit | _GLAcctInChtAcctsTP | GLAccountForEdit | ||
| ValidityStartDate | ValidityStartDate | |||
| ValidityEndDate | ValidityEndDate | |||
| CostElementCategory | CostElementCategory | |||
| ConsumptionQtyIsRecorded | ConsumptionQtyIsRecorded | |||
| UnitOfMeasure | UnitOfMeasure | |||
| CreationDate | CreationDate | |||
| CreatedByUser | CreatedByUser | |||
| FunctionalArea | FunctionalArea | |||
| AcctAssignmentIsStatistical | AcctAssignmentIsStatistical | |||
| _ControllingArea | _ControllingArea | |||
| _CostElementCategory | _CostElementCategory | |||
| _FunctionalArea | _FunctionalArea | |||
| _UnitOfMeasure | _UnitOfMeasure | |||
| _GLAcctInChtAcctsTP | _GLAcctInChtAcctsTP |
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.sqlViewName: 'ICOELTP'
@AccessControl.authorizationCheck: #CHECK
@ClientHandling.algorithm: #SESSION_VARIABLE
@EndUserText.label: 'G/L Account in CtrlgArea (Draft 2.0)'
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel: {
semanticKey: ['ChartOfAccounts', 'GLAccount', 'ControllingArea'],
//transactionalProcessingEnabled: true,
writeDraftPersistence: 'CSKB_DRAFT_20',
createEnabled,
deleteEnabled,
updateEnabled,
usageType: {
dataClass: #MIXED,
serviceQuality: #D,
sizeCategory: #XL
}
}
@Search.searchable: true
@VDM.viewType: #TRANSACTIONAL
define view I_CostElementTP
as select from I_CostElement
left outer join P_GLAcctNotMarkForDeletion as _PostableGLAccount on I_CostElement.ChartOfAccounts = _PostableGLAccount.ChartOfAccounts
and I_CostElement.ControllingArea = _PostableGLAccount.ControllingArea
and I_CostElement.GLAccount = _PostableGLAccount.GLAccount
/* BO node associations */
association [1..1] to I_GLAcctInChtAcctsTP as _GLAcctInChtAcctsTP on $projection.ChartOfAccounts = _GLAcctInChtAcctsTP.ChartOfAccounts
and $projection.GLAccount = _GLAcctInChtAcctsTP.GLAccount
/* Associations */
association [0..1] to I_ControllingArea as _ControllingArea on $projection.ControllingAreaForEdit = _ControllingArea.ControllingArea
and $projection.ChartOfAccountsForEdit = _ControllingArea.ChartOfAccounts
association [0..1] to I_CostElementCategory as _CostElementCategory on $projection.CostElementCategory = _CostElementCategory.CostElementCategory
association [0..1] to I_UnitOfMeasure as _UnitOfMeasure on $projection.UnitOfMeasure = _UnitOfMeasure.UnitOfMeasure
association [0..1] to I_FunctionalArea as _FunctionalArea on $projection.FunctionalArea = _FunctionalArea.FunctionalArea
// association [0..*] to I_GLAcctTextTP as _Text on $projection.ChartOfAccounts = _Text.ChartOfAccounts
// and $projection.GLAccount = _Text.GLAccount
{
key I_CostElement.ChartOfAccounts,
// not readonly because when created we must copy value from parent
key I_CostElement.GLAccount,
@ObjectModel.readOnly: true
key I_CostElement.ControllingArea,
@Search.defaultSearchElement: true
@Search.fuzzinessThreshold: 0.8
@Search.ranking: #HIGH
//@ObjectModel.foreignKey.association: '_ControllingArea'
@ObjectModel.mandatory: true
I_CostElement.ControllingArea as ControllingAreaForEdit,
@ObjectModel.readOnly: true
_GLAcctInChtAcctsTP.ChartOfAccounts as ChartOfAccountsForEdit, // Alias of ChartOfAccounts for active; Value to be updated when root node updated for draft
@ObjectModel.readOnly: true
_GLAcctInChtAcctsTP.GLAccountForEdit, // Alias of GLAccount for active; Value to be updated when root node updated for draft (via BO determination triggered by UPDATE on root)
@Semantics.businessDate.from: true
@ObjectModel.readOnly: true // should not be editable by user
ValidityStartDate,
@Semantics.businessDate.to: true
@ObjectModel.readOnly: true
ValidityEndDate,
@ObjectModel.foreignKey.association: '_CostElementCategory'
@ObjectModel.readOnly: 'EXTERNAL_CALCULATION'
CostElementCategory,
@ObjectModel.readOnly: 'EXTERNAL_CALCULATION'
ConsumptionQtyIsRecorded,
@ObjectModel.foreignKey.association: '_UnitOfMeasure'
@ObjectModel.readOnly: 'EXTERNAL_CALCULATION'
UnitOfMeasure,
@Semantics.systemDate.createdAt: true
CreationDate,
@Semantics.user.createdBy: true
CreatedByUser,
@ObjectModel.foreignKey.association: '_FunctionalArea'
FunctionalArea,
//@ObjectModel.readOnly: 'EXTERNAL_CALCULATION' // dynamic field control
AcctAssignmentIsStatistical, // though value is calculated, the field must be updatable
@ObjectModel.readOnly: true
cast(case when _PostableGLAccount.AccountIsMarkedForDeletion is null then 'X'
else _PostableGLAccount.AccountIsMarkedForDeletion
end as xloev ) as AccountIsMarkedForDeletion,
//cast ('' as xloev ) as AccountIsMarkedForDeletion, // Always FALSE for active entity; For draft entity, TRUE if all relevant CompanyCode assignments are MarkedForDelete
/* Associations */
_ControllingArea,
_CostElementCategory,
_FunctionalArea,
//_Text,
_UnitOfMeasure,
@ObjectModel.association.type: [#TO_COMPOSITION_PARENT, #TO_COMPOSITION_ROOT]
_GLAcctInChtAcctsTP
}
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