I_CADOCUMENTGLITEM

CDS View

Document General Ledger Item

I_CADOCUMENTGLITEM is a CDS View in S/4HANA. Document General Ledger Item. It contains 28 fields. 16 CDS views read from this table.

CDS Views using this table (16)

ViewTypeJoinVDMDescription
I_CADocumentGLItemEnhanced view_entity from COMPOSITE Enhanced Document General Ledger Item
I_SAFTLineItemCA view inner COMPOSITE SAF-T FI-CA GL Line Item
P_BOPFICA_GL_ITEM view_entity inner COMPOSITE FI-CA GL Item
P_CADocPaytAmtCashFlowItem view from COMPOSITE G/L Items with Cash Receipt-/Cash Disbursement Account
P_CADocumentGLItemCount view_entity from COMPOSITE Count of Document GL Items
P_CADocumentSumGLItem view_entity from COMPOSITE Summarized CA General Ledger Items
P_CAStRpGLTaxItem view_entity from COMPOSITE FICA GL Items
P_ContrAcctgGLItem view_entity inner COMPOSITE FICA: GL Line Items
P_GR_DocJournalGLBasic view_entity from CONSUMPTION GR Doc Journal
P_IL_CADocumentGLItemAggrgn view_entity from COMPOSITE GL Item tax base and tax amounts with additional currencies
P_PT_CAOpenItemSum view_entity inner COMPOSITE Portugal Contract Accounting Sum of Open Items
P_RO_SAFTCActgJournalItemBase0 view_entity union CONSUMPTION RO SAFT items
P_SAFTSumLineItemCA view from COMPOSITE SAF-T FI-CA Get Sum Line Item
P_SG_CAInvoiceTaxItem view union_all COMPOSITE SG TL FICA Invoice Tax Item
P_SK_CAOPKItem view_entity from COMPOSITE CA GL Item
R_CADocumentGLItemTP view_entity from TRANSACTIONAL Document General Ledger Item - TP

Fields (28)

KeyField CDS FieldsUsed in Views
KEY CADocumentNumber CADocumentNumber 5
KEY CAGLItemNumber CAGLItemNumber 3
KEY CompanyCode CompanyCode 4
KEY GLAccount CAReconciliationAccount,GLAccount 6
KEY TaxCode TaxCode 5
KEY TransactionCurrency TransactionCurrency 4
_CADocument _CADocument 1
_CompanyCode _CompanyCode 1
_CompCode _CompCode 1
_DocHeader _DocHeader 1
CAAmountInLocalCurrency AmountInCompanyCodeCurrency,CAAmountInLocalCurrency,CATaxAmountInLocalCurrency 4
CAAmountInTransactionCurrency CAAmountInTransactionCurrency,CATaxAmount 4
CAExchangeRate CAExchangeRate 1
CAReconciliationKey ReconciliationKey 1
CATaxBaseAmount CATaxBaseAmount 2
CATaxBaseAmountInLocalCurrency CATaxBaseAmountInLocalCurrency 2
CATaxRate CATaxRate 3
CATransactionKeyAccountDetn CATransactionKeyAccountDetn,TransactionTypeDetermination 4
ChartOfAccounts ChartOfAccounts 3
CostCenter CostCenter 2
Currency CompanyCodeCurrency,Currency 2
LedgerGroup LedgerGroup 1
PartnerCompany PartnerCompany 1
SalesOrder SalesDocument 1
SalesOrderItem SalesDocumentItem 1
TaxCountry TaxCountry 1
TaxJurisdiction TaxJurisdiction 1
ValueDate ValueDate 1
@AccessControl.authorizationCheck: #MANDATORY

@EndUserText.label: 'Document General Ledger Item'

@Metadata.ignorePropagatedAnnotations: true

@ObjectModel: { modelingPattern: #NONE,
                sapObjectNodeType.name: 'ContrAcctgDocumentGenLdgrItem',
                supportedCapabilities: [ #CDS_MODELING_ASSOCIATION_TARGET,
                                         #CDS_MODELING_DATA_SOURCE,
                                         #SQL_DATA_SOURCE ],
                usageType: { serviceQuality: #C,
                             sizeCategory: #XXL,
                             dataClass: #TRANSACTIONAL } }

@Search.searchable: true

@VDM.viewType: #BASIC

define view entity I_CADocumentGLItem
  as select from dfkkopk

  association [0..1] to I_BusinessArea                as _BusinessArea                on  $projection.BusinessArea = _BusinessArea.BusinessArea
  association [0..1] to I_CAAccountAssignmentCategory as _CAAccountAssignmentCategory on  $projection.CAAccountAssignmentCategory = _CAAccountAssignmentCategory.CAAccountAssignmentCategory
  association [0..1] to I_CAAcctAssgmtDistrCode       as _CAAcctAssgmtDistrCode       on  $projection.CACtrlFieldForAcctAssgmtDistr = _CAAcctAssgmtDistrCode.CACtrlFieldForAcctAssgmtDistr
  association [0..1] to I_CAAcctDetnTransKey          as _CAAcctDetnTransKey          on  $projection.CATransactionKeyAccountDetn = _CAAcctDetnTransKey.CATransactionKeyAccountDetn
  association [0..1] to I_CAAltvExchangeRateSetCode   as _CAAltvExchangeRateSetCode   on  $projection.CAAltvExchangeRateSetCode = _CAAltvExchangeRateSetCode.CAAltvExchangeRateSetCode
  association [1..1] to I_CADocument                  as _CADocument                  on  $projection.CADocumentNumber = _CADocument.CADocumentNumber
  association [1..1] to I_CAEuroConversionStatus      as _CAEuroConversionStatus      on  $projection.CAStatusOfEuroConversion = _CAEuroConversionStatus.CAStatusOfEuroConversion
  association [0..1] to I_CAIntPostingReasonCode      as _CAIntPostingReasonCode      on  $projection.CAInternalPostingReasonCode = _CAIntPostingReasonCode.CAInternalPostingReasonCode
  association [0..1] to I_CANegativePostingCtrlCode   as _CANegativePostingCtrlCode   on  $projection.CANegativePostingControlCode = _CANegativePostingCtrlCode.CANegativePostingControlCode
  association [0..1] to I_CANonDcblInputTaxCode       as _CANonDcblInputTaxCode       on  $projection.CAContainsNonDeductibleInptTax = _CANonDcblInputTaxCode.CAContainsNonDeductibleInptTax
  association [0..1] to I_CAOtherTaxCode              as _CAOtherTaxCode              on  $projection.CAOtherTaxCode = _CAOtherTaxCode.CAOtherTaxCode
                                                                                      and $projection.Country        = _CAOtherTaxCode.Country
  association [0..1] to I_CAWithholdingTaxSupplement  as _CAWithholdingTaxSupplement  on  $projection.CAWithholdingTaxSupplement = _CAWithholdingTaxSupplement.CAWithholdingTaxSupplement
                                                                                      and $projection.Country                    = _CAWithholdingTaxSupplement.Country
  association [0..1] to I_ChartOfAccounts             as _ChartOfAccounts             on  $projection.ChartOfAccounts = _ChartOfAccounts.ChartOfAccounts
  association [1..1] to I_CompanyCode                 as _CompanyCode                 on  $projection.CompanyCode = _CompanyCode.CompanyCode
  association [0..1] to I_CompanyCode                 as _CashFlowCompanyCode         on  $projection.CACashFlowCompanyCode = _CashFlowCompanyCode.CompanyCode
  association [0..1] to I_Country                     as _Country                     on  $projection.Country = _Country.Country
  association [0..1] to I_Country                     as _TaxCountry                  on  $projection.TaxCountry = _TaxCountry.Country
  association [0..1] to I_Currency                    as _CompanyCodeCurrency         on  $projection.Currency = _CompanyCodeCurrency.Currency
  association [0..1] to I_Currency                    as _GLPostingCurrency           on  $projection.CAGLPostingCurrency = _GLPostingCurrency.Currency
  association [0..1] to I_Currency                    as _TransactionCurrency         on  $projection.TransactionCurrency = _TransactionCurrency.Currency
  association [1..1] to I_GLAccount                   as _GLAccount                   on  $projection.GLAccount   = _GLAccount.GLAccount
                                                                                      and $projection.CompanyCode = _GLAccount.CompanyCode
  association [0..1] to I_GLAccount                   as _CashFlowAccount             on  $projection.CACashFlowAccount = _CashFlowAccount.GLAccount
                                                                                      and $projection.CompanyCode       = _CashFlowAccount.CompanyCode
  association [0..*] to I_ProfitCenter                as _ProfitCenter                on  $projection.ProfitCenter = _ProfitCenter.ProfitCenter
  association [0..1] to I_Partnercompany              as _PartnerCompany              on  $projection.PartnerCompany = _PartnerCompany.PartnerCompany
  association [0..1] to I_Segment                     as _Segment                     on  $projection.Segment = _Segment.Segment
  association [0..1] to I_UnitOfMeasure               as _BaseUnit                    on  $projection.BaseUnit = _BaseUnit.UnitOfMeasure
  association [0..1] to I_WBSElementBasicData         as _WBSElementBasicData         on  $projection.WBSElementInternalID = _WBSElementBasicData.WBSElementInternalID

  association [1..1] to E_CADocumentGLItem            as _Extension                   on  $projection.CADocumentNumber = _Extension.CADocumentNumber
                                                                                      and $projection.CAGLItemNumber   = _Extension.CAGLItemNumber

  /* deprecated associations */
  association [1..1] to I_CADocumentHeader            as _DocHeader                   on  $projection.CADocumentNumber = _DocHeader.CADocumentNumber
  association [1..1] to I_GLAccountInCompanyCode      as _GLAccountInCompanyCode      on  $projection.GLAccount   = _GLAccountInCompanyCode.GLAccount
                                                                                      and $projection.CompanyCode = _GLAccountInCompanyCode.CompanyCode
  /* end deprecated associations */

{
      @ObjectModel.foreignKey.association: '_CADocument'
      @Search.defaultSearchElement: true
  key opbel                                                             as CADocumentNumber,
  key opupk                                                             as CAGLItemNumber,

      /* organizational and master data */
      @ObjectModel.foreignKey.association: '_CompanyCode'
      bukrs                                                             as CompanyCode,
      @ObjectModel.foreignKey.association: '_BusinessArea'
      gsber                                                             as BusinessArea,
      bupla                                                             as BusinessPlace,
      @ObjectModel.foreignKey.association: '_Segment'
      segment                                                           as Segment,
      prctr                                                             as ProfitCenter,
      @ObjectModel.foreignKey.association: '_PartnerCompany'
      vbund                                                             as PartnerCompany,
      @ObjectModel.foreignKey.association: '_GLAccount'
      hkont                                                             as GLAccount,
      @ObjectModel.foreignKey.association: '_WBSElementBasicData'
      cast(ps_psp_pnr as ps_s4_pspnr preserving type )                  as WBSElementInternalID,

      /* dates and amounts */
      valut                                                             as ValueDate,
      cast( abs( kursf ) as fis_absolute_exchangerate preserving type ) as CAExchangeRate,
      cast( case when kursf < 0  then 'X'
                 when kursf >= 0 then ' '
            end as fis_indirect_quotation preserving type )             as ExchRateIsIndirectQuotation,
      _CADocument.TransactionCurrency                                   as TransactionCurrency,
      _CompanyCode.Currency                                             as Currency,
      @Semantics.amount.currencyCode: 'Currency'
      betrh                                                             as CAAmountInLocalCurrency,
      @Semantics.amount.currencyCode: 'TransactionCurrency'
      betrw                                                             as CAAmountInTransactionCurrency,
      @Semantics.amount.currencyCode: 'Currency'
      betr2                                                             as CAAmountInSecondCurrency,
      @Semantics.amount.currencyCode: 'Currency'
      betr3                                                             as CAAmountInThirdCurrency,

      @ObjectModel.foreignKey.association: '_CAAccountAssignmentCategory'
      kontt                                                             as CAAccountAssignmentCategory,
      kontl                                                             as CAAccountAssignment,
      kostl                                                             as CostCenter,
      kdauf                                                             as SalesOrder,
      kdpos                                                             as SalesOrderItem,
      fikey                                                             as CAReconciliationKey,
      @ObjectModel.foreignKey.association: '_CAIntPostingReasonCode'
      intbu                                                             as CAInternalPostingReasonCode,
      @ObjectModel.foreignKey.association: '_CANegativePostingCtrlCode'
      negbu                                                             as CANegativePostingControlCode,
      @ObjectModel.foreignKey.association: '_GLPostingCurrency'
      pswsl                                                             as CAGLPostingCurrency,
      ldgrp                                                             as LedgerGroup,
      paobjnr                                                           as ProfitabilitySegment_2,
      pasubnr                                                           as ProfitabilitySegmentChanges,

      fdlev                                                             as PlanningLevel,
      whgrp                                                             as CARepetitionGroup,
      @ObjectModel.foreignKey.association: '_CAAcctDetnTransKey'
      ktosl                                                             as CATransactionKeyAccountDetn,
      kschl                                                             as ConditionType,
      xeiph                                                             as CAIsSeparateLineItemInGL,
      @Semantics.quantity.unitOfMeasure: 'BaseUnit'
      menge                                                             as QuantityInBaseUnit,
      @ObjectModel.foreignKey.association: '_BaseUnit'
      meins                                                             as BaseUnit,
      psgrp                                                             as CAGroupingKeyDocumentItems,

      /* tax data */
      mwskz                                                             as TaxCode,
      mwszkz                                                            as CASupplementaryTaxCode,
      @ObjectModel.foreignKey.association: '_CAWithholdingTaxSupplement'
      qssew                                                             as CAWithholdingTaxSupplement,
      @ObjectModel.foreignKey.association: '_CAOtherTaxCode'
      strkz                                                             as CAOtherTaxCode,
      txgrp                                                             as CAGroupingCodeForTaxItems,
      txjcd                                                             as TaxJurisdiction,
      txjco                                                             as CAEnteredTaxJurisdictionCode,
      txcnt                                                             as CATaxJurisdictionLevelCounter,
      txexk                                                             as CATaxExceptionID,
      txdat                                                             as CATaxDate,
      @Semantics.amount.currencyCode: 'Currency'
      sbash                                                             as CATaxBaseAmountInLocalCurrency,
      @Semantics.amount.currencyCode: 'TransactionCurrency'
      sbasw                                                             as CATaxBaseAmount,
      @Semantics.amount.currencyCode: 'TransactionCurrency'
      ndtax                                                             as CANonDeductibleTxAmtInDocCrcy,
      @Semantics.amount.currencyCode: 'Currency'
      ndtxh                                                             as CANonDeductibleTxAmtInLoclCrcy,
      @ObjectModel.foreignKey.association: '_CANonDcblInputTaxCode'
      xndtx                                                             as CAContainsNonDeductibleInptTax,
      stprz                                                             as CATaxRate,
      gricd                                                             as GrossIncomeTaxActivityCode,
      gityp                                                             as EmploymentTaxDistributionType,
      @Semantics.amount.currencyCode: 'Currency'
      sctax                                                             as CATaxPortionInLocalCurrency,
      @Semantics.amount.currencyCode: 'TransactionCurrency'
      sttax                                                             as CATaxPortionInTransCurrency,
      xustpd                                                            as CATaxIsCalculatedExternally,
      @ObjectModel.foreignKey.association: '_CAAltvExchangeRateSetCode'
      xdexr                                                             as CAAltvExchangeRateSetCode,
      @ObjectModel.foreignKey.association: '_TaxCountry'
      tax_country                                                       as TaxCountry,
      taxc_factor                                                       as TransToTaxCntryCrcyCnvrsnFctr,

      /* cash flow data */
      xcsha                                                             as CAIsCashFlowItem,
      @ObjectModel.foreignKey.association: '_CashFlowAccount'
      reacc                                                             as CACashFlowAccount,
      @ObjectModel.foreignKey.association: '_CashFlowCompanyCode'
      rebuk                                                             as CACashFlowCompanyCode,

      hbkid                                                             as HouseBank,
      hktid                                                             as HouseBankAccount,
      squan                                                             as QuantitySignCode,
      kukey                                                             as BankStatementShortID,
      esnum                                                             as BankStatementItem,
      ltype                                                             as CashManagementLinkType,
      lnkid                                                             as CashManagementLink,

      xintb                                                             as CAItmIsCreatedByPostgInterface,
      @ObjectModel.foreignKey.association: '_CAEuroConversionStatus'
      eurou                                                             as CAStatusOfEuroConversion,
      xcopa                                                             as CAProfitAnalysisUpdtIsDirect,
      invgr                                                             as CAInvcgGroupingKey,
      @ObjectModel.foreignKey.association: '_CAAcctAssgmtDistrCode'
      aasta                                                             as CACtrlFieldForAcctAssgmtDistr,
      fmtyp                                                             as CAUpdateMethodForFundsMgmt,
      origfikrs                                                         as OriginalFinancialMgmtArea,
      budgetyear                                                        as OriglYearForFinMgmtAcctAssgmt,
      kblnr                                                             as EarmarkedFundsDocument,

      @ObjectModel.foreignKey.association: '_ChartOfAccounts'
      _CompanyCode.ChartOfAccounts                                      as ChartOfAccounts,
      @ObjectModel.foreignKey.association: '_Country'
      _CompanyCode.Country                                              as Country,
      _CompanyCode._Country.TaxCalculationProcedure                     as TaxCalculationProcedure,

      // Associations

      _BaseUnit,
      _BusinessArea,
      _CAAccountAssignmentCategory,
      _CAAcctAssgmtDistrCode,
      _CAAcctDetnTransKey,
      _CAAltvExchangeRateSetCode,
      _CADocument,
      _CAEuroConversionStatus,
      _CAIntPostingReasonCode,
      _CANegativePostingCtrlCode,
      _CANonDcblInputTaxCode,
      _CAOtherTaxCode,
      _CashFlowAccount,
      _CashFlowCompanyCode,
      _CAWithholdingTaxSupplement,
      _ChartOfAccounts,
      _CompanyCode,
      _CompanyCodeCurrency,
      _Country,
      _GLAccount,
      _GLPostingCurrency,
      _ProfitCenter,
      _PartnerCompany,
      _Segment,
      _TaxCountry,
      _TransactionCurrency,
      _WBSElementBasicData,

      /* deprecated fields */
      @API.element.releaseState: #DECOMMISSIONED
      @API.element.successor: 'ProfitabilitySegment_2'
      @VDM.lifecycle.status: #DEPRECATED
      @VDM.lifecycle.successor: 'ProfitabilitySegment_2'
      cast( case when paobjnr > '9999999999'
                 then '9999999999'
                 else lpad( paobjnr, 10, '0' )
            end as rkeobjnr_numc )                                      as ProfitabilitySegment,

      @API.element.releaseState: #DEPRECATED
      @API.element.successor: 'CATaxItemHasAltvExchangeRate'
      @VDM.lifecycle.status: #DEPRECATED
      @VDM.lifecycle.successor: 'CATaxItemHasAltvExchangeRate'
      xdexr                                                             as CAAltvExchangeRateForTaxItem,
      @API.element.releaseState: #DEPRECATED
      @API.element.successor: 'CAAltvExchangeRateSetCode'
      @VDM.lifecycle.status: #DEPRECATED
      @VDM.lifecycle.successor: 'CAAltvExchangeRateSetCode'
      @Semantics.booleanIndicator: true
      xdexr                                                             as CATaxItemHasAltvExchangeRate,

      @API.element.releaseState: #DEPRECATED
      @API.element.successor: 'EarmarkedFundsDocument'
      @VDM.lifecycle.status: #DEPRECATED
      @VDM.lifecycle.successor: 'EarmarkedFundsDocument'
      kblnr                                                             as EarmarkedFunds,

      @API.element.releaseState: #DEPRECATED
      @API.element.successor: '_CAAccountAssignmentCategory'
      @VDM.lifecycle.status: #DEPRECATED
      @VDM.lifecycle.successor: '_CAAccountAssignmentCategory'
      _CAAccountAssignmentCategory                                      as _AcctAssgmtCat,

      @API.element.releaseState: #DEPRECATED
      @API.element.successor: '_CompanyCode'
      @VDM.lifecycle.status: #DEPRECATED
      @VDM.lifecycle.successor: '_CompanyCode'
      _CompanyCode                                                      as _CompCode,

      @API.element.releaseState: #DEPRECATED
      @API.element.successor: '_CashFlowCompanyCode'
      @VDM.lifecycle.status: #DEPRECATED
      @VDM.lifecycle.successor: '_CashFlowCompanyCode'
      _CashFlowCompanyCode                                              as _CompCodeCashFlow,

      @API.element.releaseState: #DEPRECATED
      @API.element.successor: '_CADocument'
      @VDM.lifecycle.status: #DEPRECATED
      @VDM.lifecycle.successor: '_CADocument'
      _DocHeader,

      @API.element.releaseState: #DEPRECATED
      @API.element.successor: '_CAOtherTaxCode'
      @VDM.lifecycle.status: #DEPRECATED
      @VDM.lifecycle.successor: '_CAOtherTaxCode'
      _CAOtherTaxCode                                                   as _OtherTaxCode,

      @API.element.releaseState: #DEPRECATED
      @API.element.successor: '_CAWithholdingTaxSupplement'
      @VDM.lifecycle.status: #DEPRECATED
      @VDM.lifecycle.successor: '_CAWithholdingTaxSupplement'
      _CAWithholdingTaxSupplement                                       as _WhldgTaxSuplmnt,

      @API.element.releaseState: #DEPRECATED
      @API.element.successor: '_GLAccount'
      @VDM.lifecycle.status: #DEPRECATED
      @VDM.lifecycle.successor: '_GLAccount'
      _GLAccountInCompanyCode
}