I_GLAcctInChtAcctsTP

DDL: I_GLACCTINCHTACCTSTP Type: view_entity TRANSACTIONAL Package: ODATA_MANAGE_GLACCOUNT

G/L Account in ChtAccts (Draft 2.0)

I_GLAcctInChtAcctsTP is a Transactional CDS View that provides data about "G/L Account in ChtAccts (Draft 2.0)" in SAP S/4HANA. It reads from 1 data source (I_GLAccountInChartOfAccounts) and exposes 46 fields with key fields ChartOfAccounts, GLAccount. It has 17 associations to related views. Part of development package ODATA_MANAGE_GLACCOUNT.

Data Sources (1)

SourceAliasJoin Type
I_GLAccountInChartOfAccounts I_GLAccountInChartOfAccounts from

Associations (17)

CardinalityTargetAliasCondition
[0..*] I_GLAcctTextTP _Text $projection.ChartOfAccounts = _Text.ChartOfAccounts and $projection.GLAccount = _Text.GLAccount
[0..*] I_GLAcctInCoCodeTP _GLAcctInCoCodeTP $projection.ChartOfAccounts = _GLAcctInCoCodeTP.ChartOfAccounts and $projection.GLAccount = _GLAcctInCoCodeTP.GLAccount
[0..*] I_CostElementTP _CostElementTP $projection.ChartOfAccounts = _CostElementTP.ChartOfAccounts and $projection.GLAccount = _CostElementTP.GLAccount
[0..1] I_GLAccountForPublicSectorTP _PublicSectorTP $projection.ChartOfAccounts = _PublicSectorTP.ChartOfAccounts and $projection.GLAccount = _PublicSectorTP.GLAccount
[0..1] I_ChartOfAccounts _ChartOfAccounts $projection.ChartOfAccountsForEdit = _ChartOfAccounts.ChartOfAccounts
[1] I_User _User $projection.CreatedByUser = _User.UserID
[0..1] I_GLAccountType _Glaccounttype $projection.GLAccountType = _Glaccounttype.GLAccountType
[0..1] I_GLAccountSubtype _GLAccountSubtype $projection.GLAccountSubtype = _GLAccountSubtype.GLAccountSubtype
[0..1] I_BankRecnclnAccount _BankRecnclnAcct $projection.ChartOfAccountsForEdit = _BankRecnclnAcct.ChartOfAccounts and $projection.BankReconciliationAccount = _BankRecnclnAcct.BankReconciliationAccount
[1..1] I_Globalcompany _Globalcompany $projection.PartnerCompany = _Globalcompany.Company
[0..1] I_GLAccountGroup _Glaccountgroup $projection.GLAccountGroup = _Glaccountgroup.GLAccountGroup and $projection.ChartOfAccountsForEdit = _Glaccountgroup.ChartOfAccounts
[0..1] I_FunctionalArea _FunctionalArea $projection.FunctionalArea = _FunctionalArea.FunctionalArea
[0..1] I_GLAccountInChartOfAccounts _CorporateGroupAccount $projection.corporategroupchartofaccounts = _CorporateGroupAccount.ChartOfAccounts and $projection.CorporateGroupAccount = _CorporateGroupAccount.GLAccount
[0..1] I_ProfitLossAccountType_Vh _ProfitLossAccountType_Vh $projection.ChartOfAccountsForEdit = _ProfitLossAccountType_Vh.ChartOfAccounts and $projection.ProfitLossAccountType = _ProfitLossAccountType_Vh.ProfitLossAccountType
[0..1] I_ChartOfAccounts _CorpGroupChartOfAccounts $projection.corporategroupchartofaccounts = _CorpGroupChartOfAccounts.ChartOfAccounts
[0..1] I_GLAcctInDefaultLanguageText _GLAcctTxtInMaintLang $projection.ChartOfAccounts = _GLAcctTxtInMaintLang.ChartOfAccounts and $projection.GLAccount = _GLAcctTxtInMaintLang.GLAccount and $projection.MaintenanceLanguage = _GLAcctTxtInMaintLang.Language
[0..1] I_RetainedEarningsGLAccount _RetainedEarningsGLAccount $projection.ChartOfAccountsForEdit = _RetainedEarningsGLAccount.ChartOfAccounts and $projection.ProfitLossAccountType = _RetainedEarningsGLAccount.ProfitLossAccountType

Annotations (13)

NameValueLevelField
AccessControl.authorizationCheck #CHECK view
EndUserText.label G/L Account in ChtAccts (Draft 2.0) view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.transactionalProcessingEnabled true view
ObjectModel.writeDraftPersistence SKA1_DRAFT_20 view
ObjectModel.draftEnabled true view
ObjectModel.modelCategory #BUSINESS_OBJECT view
ObjectModel.compositionRoot true 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 (46)

KeyFieldSource TableSource FieldDescription
KEY ChartOfAccounts I_GLAccountInChartOfAccounts ChartOfAccounts
KEY GLAccount I_GLAccountInChartOfAccounts GLAccount
ChartOfAccountsForEdit I_GLAccountInChartOfAccounts ChartOfAccounts
GLAccountForEdit I_GLAccountInChartOfAccounts GLAccount
IsBalanceSheetAccount I_GLAccountInChartOfAccounts IsBalanceSheetAccount
GLAccountGroup I_GLAccountInChartOfAccounts GLAccountGroup
CorporateGroupAccount I_GLAccountInChartOfAccounts CorporateGroupAccount
ProfitLossAccountType I_GLAccountInChartOfAccounts ProfitLossAccountType
SampleGLAccount I_GLAccountInChartOfAccounts SampleGLAccount
AccountIsMarkedForDeletion I_GLAccountInChartOfAccounts AccountIsMarkedForDeletion
AccountIsBlockedForCreation I_GLAccountInChartOfAccounts AccountIsBlockedForCreation
AccountIsBlockedForPosting I_GLAccountInChartOfAccounts AccountIsBlockedForPosting
AccountIsBlockedForPlanning I_GLAccountInChartOfAccounts AccountIsBlockedForPlanning
PartnerCompany I_GLAccountInChartOfAccounts PartnerCompany
FunctionalArea I_GLAccountInChartOfAccounts FunctionalArea
CreationDate I_GLAccountInChartOfAccounts CreationDate
CreatedByUser I_GLAccountInChartOfAccounts CreatedByUser
GLAccountType I_GLAccountInChartOfAccounts GLAccountType
GLAccountSubtype I_GLAccountInChartOfAccounts GLAccountSubtype
BankReconciliationAccount I_GLAccountInChartOfAccounts BankReconciliationAccount
GLAccountExternal I_GLAccountInChartOfAccounts GLAccountExternal
GLAccountIsNotProdnRelevant
MaintenanceLanguage chtaccts MaintenanceLanguage
DraftReferenceChartOfAccounts
DraftReferenceGLAccount
GLAccountName _GLAcctTxtInMaintLang GLAccountName
GLAccountLongName _GLAcctTxtInMaintLang GLAccountLongName
CorporateGroupChartOfAccounts _ChartOfAccounts CorporateGroupChartOfAccounts
sakanendasCorporateGroupAccountExternal
_ChartOfAccounts _ChartOfAccounts
_CorporateGroupAccount _CorporateGroupAccount
_FunctionalArea _FunctionalArea
_Glaccountgroup _Glaccountgroup
_Glaccounttype _Glaccounttype
_GLAccountSubtype _GLAccountSubtype
_BankRecnclnAcct _BankRecnclnAcct
_GLAcctTxtInMaintLang _GLAcctTxtInMaintLang
_Globalcompany _Globalcompany
_ProfitLossAccountType_Vh _ProfitLossAccountType_Vh
_RetainedEarningsGLAccount _RetainedEarningsGLAccount
_CorpGroupChartOfAccounts _CorpGroupChartOfAccounts
_User _User
_GLAcctInCoCodeTP _GLAcctInCoCodeTP
_CostElementTP _CostElementTP
_PublicSectorTP _PublicSectorTP
_Text _Text
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'G/L Account in ChtAccts (Draft 2.0)'
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel: {
  semanticKey: ['ChartOfAccounts', 'GLAccount'],
  transactionalProcessingEnabled: true,
  writeDraftPersistence: 'SKA1_DRAFT_20',
  draftEnabled: true,
  modelCategory: #BUSINESS_OBJECT,
  compositionRoot: true,
  createEnabled,
  deleteEnabled,
  updateEnabled,
  usageType: {
    dataClass: #MIXED,
    serviceQuality: #D,
    sizeCategory: #XL
  }
}
@Search.searchable: true
@VDM.viewType: #TRANSACTIONAL


/*+[hideWarning] { "IDS" : [ "CARDINALITY_CHECK" ]  } */
define view entity I_GLAcctInChtAcctsTP
  as select from           I_GLAccountInChartOfAccounts
    left outer to one join I_ChartOfAccounts as chtaccts      on I_GLAccountInChartOfAccounts.ChartOfAccounts = chtaccts.ChartOfAccounts
    left outer to one join ska1              as _GroupAccount on  chtaccts.CorporateGroupChartOfAccounts             = _GroupAccount.ktopl
                                                              and I_GLAccountInChartOfAccounts.CorporateGroupAccount = _GroupAccount.saknr


  /* BO node associations */
  association [0..*] to I_GLAcctTextTP                as _Text                      on  $projection.ChartOfAccounts = _Text.ChartOfAccounts
                                                                                    and $projection.GLAccount       = _Text.GLAccount

  association [0..*] to I_GLAcctInCoCodeTP            as _GLAcctInCoCodeTP          on  $projection.ChartOfAccounts = _GLAcctInCoCodeTP.ChartOfAccounts
                                                                                    and $projection.GLAccount       = _GLAcctInCoCodeTP.GLAccount

  association [0..*] to I_CostElementTP               as _CostElementTP             on  $projection.ChartOfAccounts = _CostElementTP.ChartOfAccounts
                                                                                    and $projection.GLAccount       = _CostElementTP.GLAccount
  association [0..1] to I_GLAccountForPublicSectorTP as _PublicSectorTP           on  $projection.ChartOfAccounts = _PublicSectorTP.ChartOfAccounts                                                                                  and $projection.GLAccount       = _PublicSectorTP.GLAccount
  /* Associations */
  association [0..1] to I_ChartOfAccounts             as _ChartOfAccounts           on  $projection.ChartOfAccountsForEdit = _ChartOfAccounts.ChartOfAccounts

  association [1]    to I_User                        as _User                      on  $projection.CreatedByUser = _User.UserID

  association [0..1] to I_GLAccountType               as _Glaccounttype             on  $projection.GLAccountType = _Glaccounttype.GLAccountType

  association [0..1] to I_GLAccountSubtype            as _GLAccountSubtype          on  $projection.GLAccountSubtype = _GLAccountSubtype.GLAccountSubtype

  association [0..1] to I_BankRecnclnAccount          as _BankRecnclnAcct           on  $projection.ChartOfAccountsForEdit    = _BankRecnclnAcct.ChartOfAccounts
                                                                                    and $projection.BankReconciliationAccount = _BankRecnclnAcct.BankReconciliationAccount

  association [1..1] to I_Globalcompany               as _Globalcompany             on  $projection.PartnerCompany = _Globalcompany.Company

  association [0..1] to I_GLAccountGroup              as _Glaccountgroup            on  $projection.GLAccountGroup         = _Glaccountgroup.GLAccountGroup
                                                                                    and $projection.ChartOfAccountsForEdit = _Glaccountgroup.ChartOfAccounts

  association [0..1] to I_FunctionalArea              as _FunctionalArea            on  $projection.FunctionalArea = _FunctionalArea.FunctionalArea

  association [0..1] to I_GLAccountInChartOfAccounts  as _CorporateGroupAccount     on  $projection.corporategroupchartofaccounts = _CorporateGroupAccount.ChartOfAccounts
                                                                                    and $projection.CorporateGroupAccount         = _CorporateGroupAccount.GLAccount

  association [0..1] to I_ProfitLossAccountType_Vh    as _ProfitLossAccountType_Vh  on  $projection.ChartOfAccountsForEdit = _ProfitLossAccountType_Vh.ChartOfAccounts
                                                                                    and $projection.ProfitLossAccountType  = _ProfitLossAccountType_Vh.ProfitLossAccountType

  association [0..1] to I_ChartOfAccounts             as _CorpGroupChartOfAccounts  on  $projection.corporategroupchartofaccounts = _CorpGroupChartOfAccounts.ChartOfAccounts
  association [0..1] to I_GLAcctInDefaultLanguageText as _GLAcctTxtInMaintLang      on  $projection.ChartOfAccounts     = _GLAcctTxtInMaintLang.ChartOfAccounts
                                                                                    and $projection.GLAccount           = _GLAcctTxtInMaintLang.GLAccount
                                                                                    and $projection.MaintenanceLanguage = _GLAcctTxtInMaintLang.Language
  association [0..1] to I_RetainedEarningsGLAccount   as _RetainedEarningsGLAccount on  $projection.ChartOfAccountsForEdit = _RetainedEarningsGLAccount.ChartOfAccounts
                                                                                    and $projection.ProfitLossAccountType  = _RetainedEarningsGLAccount.ProfitLossAccountType

{
      @ObjectModel.readOnly: true
  key I_GLAccountInChartOfAccounts.ChartOfAccounts,
      @ObjectModel.readOnly: true
  key I_GLAccountInChartOfAccounts.GLAccount,

      @Search.defaultSearchElement: true
      @Search.fuzzinessThreshold: 1.0
      @Search.ranking: #MEDIUM
      @ObjectModel.foreignKey.association: '_ChartOfAccounts'
      @ObjectModel.mandatory: true
      @ObjectModel.readOnly: #('EXTERNAL_CALCULATION') // dynamic field control required by authorization control at UI level, hereinafter

      I_GLAccountInChartOfAccounts.ChartOfAccounts as ChartOfAccountsForEdit, // Alias of ChartOfAccounts for active; Value to be provided by user for draft

      @Search.defaultSearchElement: true
      @Search.fuzzinessThreshold: 0.8
      @Search.ranking: #HIGH
      @ObjectModel.mandatory: true
      @ObjectModel.readOnly: #('EXTERNAL_CALCULATION')
      I_GLAccountInChartOfAccounts.GLAccount                                    as GLAccountForEdit,       // Alias of GLAccount for active; Value to be provided by user for draft


      @ObjectModel.readOnly: #('EXTERNAL_CALCULATION')
      I_GLAccountInChartOfAccounts.IsBalanceSheetAccount,
      @ObjectModel.mandatory: true
      @ObjectModel.readOnly: #('EXTERNAL_CALCULATION')
      @ObjectModel.foreignKey.association: '_Glaccountgroup'
      I_GLAccountInChartOfAccounts.GLAccountGroup,
      @ObjectModel.readOnly: #('EXTERNAL_CALCULATION')
      @ObjectModel.foreignKey.association: '_CorporateGroupAccount'
      I_GLAccountInChartOfAccounts.CorporateGroupAccount,
      @ObjectModel.readOnly: #('EXTERNAL_CALCULATION')
      @Consumption.valueHelp: '_ProfitLossAccountType_Vh'
      I_GLAccountInChartOfAccounts.ProfitLossAccountType,
      @ObjectModel.readOnly: #('EXTERNAL_CALCULATION')
      I_GLAccountInChartOfAccounts.SampleGLAccount,
      @ObjectModel.readOnly: #('EXTERNAL_CALCULATION')
      I_GLAccountInChartOfAccounts.AccountIsMarkedForDeletion,
      @ObjectModel.readOnly: #('EXTERNAL_CALCULATION')
      I_GLAccountInChartOfAccounts.AccountIsBlockedForCreation,
      @ObjectModel.readOnly: #('EXTERNAL_CALCULATION')
      I_GLAccountInChartOfAccounts.AccountIsBlockedForPosting,
      @ObjectModel.readOnly: #('EXTERNAL_CALCULATION')
      I_GLAccountInChartOfAccounts.AccountIsBlockedForPlanning,
      @ObjectModel.readOnly: #('EXTERNAL_CALCULATION')
      @ObjectModel.foreignKey.association: '_Globalcompany'
      I_GLAccountInChartOfAccounts.PartnerCompany,
      @ObjectModel.readOnly: #('EXTERNAL_CALCULATION')
      @ObjectModel.foreignKey.association: '_FunctionalArea'
      I_GLAccountInChartOfAccounts.FunctionalArea,
      @ObjectModel.readOnly: true
      @Semantics.systemDate.createdAt: true
      I_GLAccountInChartOfAccounts.CreationDate,
      @ObjectModel.readOnly: true
      @Semantics.user.id: true
      I_GLAccountInChartOfAccounts.CreatedByUser,

      @ObjectModel.mandatory: true
      @ObjectModel.readOnly: #('EXTERNAL_CALCULATION')
      @ObjectModel.foreignKey.association: '_Glaccounttype'
      I_GLAccountInChartOfAccounts.GLAccountType,

      @ObjectModel.mandatory: #('EXTERNAL_CALCULATION')
      @ObjectModel.readOnly: #('EXTERNAL_CALCULATION')
      @ObjectModel.foreignKey.association: '_GLAccountSubtype'
      I_GLAccountInChartOfAccounts.GLAccountSubtype,

      @ObjectModel.mandatory: #('EXTERNAL_CALCULATION')
      @ObjectModel.readOnly: #('EXTERNAL_CALCULATION')
      @ObjectModel.foreignKey.association: '_BankRecnclnAcct'
      I_GLAccountInChartOfAccounts.BankReconciliationAccount, //Account with sub-type B


      @ObjectModel.readOnly: true
      I_GLAccountInChartOfAccounts.GLAccountExternal,
      @ObjectModel.readOnly: #('EXTERNAL_CALCULATION')
      I_GLAccountInChartOfAccounts._GLAcctInChartOfAcctsProdn.GLAccountIsNotProdnRelevant,

      @ObjectModel.readOnly: #('EXTERNAL_CALCULATION')
      case
          when I_GLAccountInChartOfAccounts._GLAcctInChartOfAcctsStatus.GLAcctCOAImplementStatus is null then
            cast ( 'I' as glaccount_imst)    //in process for SAP Delivered Content after Migration

          else
            I_GLAccountInChartOfAccounts._GLAcctInChartOfAcctsStatus.GLAcctCOAImplementStatus
          end                                      as GLAcctCOAImplementStatus,

      @ObjectModel.readOnly: #('EXTERNAL_CALCULATION')
      case
          when I_GLAccountInChartOfAccounts._GLAcctInChartOfAcctsStatus.GLAcctCOAImplementStatus is null then
            'X'
          else
            I_GLAccountInChartOfAccounts._GLAcctInChartOfAcctsStatus.GLAccountCOAIsDeliveredBySAP
          end                                      as GLAccountCOAIsDeliveredBySAP,

      @ObjectModel.readOnly: true
      chtaccts.MaintenanceLanguage, // Value to be derived from 'ChartOfAccountsForEdit' for draft (via BO determination triggered by UPDATE)


      // The existing OData client requires at least read access for both fields

      cast ('' as ktopl)                           as DraftReferenceChartOfAccounts, // Value to be set when COPY

      cast ('' as saknr)                           as DraftReferenceGLAccount,       // Value to be set when COPY


      /**
       * Open Question: Check below:
       * Read: it should read both active and draft text
       * Write: it should write through to the persistence table of I_GLAcctTextTP
       */
      @Search.defaultSearchElement: true
      @Search.fuzzinessThreshold: 0.8
      @Search.ranking: #LOW
      @ObjectModel.mandatory: true
      _GLAcctTxtInMaintLang.GLAccountName,     // Write through to TEXT node when field updated by user, or updated when TEXT updated

      @Search.defaultSearchElement: true
      @Search.fuzzinessThreshold: 0.8
      @Search.ranking: #LOW
      _GLAcctTxtInMaintLang.GLAccountLongName, // Write through to TEXT node when field updated by user, or updated when TEXT updated

      @ObjectModel.readOnly: true
      @ObjectModel.foreignKey.association: '_CorpGroupChartOfAccounts'
      _ChartOfAccounts.CorporateGroupChartOfAccounts,
      @ObjectModel.readOnly: #('EXTERNAL_CALCULATION')
      //for special case: Remove Group COA after maintained Group COA Account

      case when I_GLAccountInChartOfAccounts.CorporateGroupAccount is not null and _GroupAccount.sakan is null
           then cast ( I_GLAccountInChartOfAccounts.CorporateGroupAccount as sakan )
           else _GroupAccount.sakan end            as CorporateGroupAccountExternal,
      //_GroupAccount.sakan as CorporateGroupAccountExternal,

      /* Associations */
      _ChartOfAccounts,
      _CorporateGroupAccount,
      _FunctionalArea,
      _Glaccountgroup,
      _Glaccounttype,
      _GLAccountSubtype,
      _BankRecnclnAcct, //G/L Account with Sub-type B

      _GLAcctTxtInMaintLang,
      _Globalcompany,
      _ProfitLossAccountType_Vh,
      _RetainedEarningsGLAccount,
      _CorpGroupChartOfAccounts,
      _User,
      @ObjectModel.association.type: [#TO_COMPOSITION_CHILD]
      _GLAcctInCoCodeTP,
      @ObjectModel.association.type: [#TO_COMPOSITION_CHILD]
      _CostElementTP,
      @ObjectModel.association.type: [#TO_COMPOSITION_CHILD]
      _PublicSectorTP,
      @ObjectModel.association.type: [#TO_COMPOSITION_CHILD]
      _Text
}