I_CADOCUMENTGLITEM

CDS View

Document General Ledger Item

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

CDS Views using this table (8)

ViewTypeJoinVDMDescription
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
P_CADocumentGLItemCount view_entity from COMPOSITE Count of Document GL Items
P_CADocumentSumGLItem view_entity from COMPOSITE Summarized CA General Ledger Items
P_SAFTSumLineItemCA view from COMPOSITE
P_SG_CAInvoiceTaxItem view union_all COMPOSITE
R_CADocumentGLItemTP view_entity from TRANSACTIONAL Document General Ledger Item - TP

Fields (19)

KeyField CDS FieldsUsed in Views
KEY CADocumentNumber CADocumentNumber 2
KEY CAGLItemNumber CAGLItemNumber 1
KEY CompanyCode CompanyCode 1
KEY TaxCode TaxCode 2
_DocHeader _DocHeader 1
CAAmountInLocalCurrency AmountInCompanyCodeCurrency,CAAmountInLocalCurrency 2
CAAmountInTransactionCurrency CAAmountInTransactionCurrency 2
CAReconciliationKey ReconciliationKey 1
CATaxRate CATaxRate 1
CATransactionKeyAccountDetn CATransactionKeyAccountDetn,TransactionTypeDetermination 2
ChartOfAccounts ChartOfAccounts 2
CostCenter CostCenter 1
GLAccount CAReconciliationAccount,GLAccount 3
LedgerGroup LedgerGroup 1
PartnerCompany PartnerCompany 1
SalesOrder SalesDocument 1
SalesOrderItem SalesDocumentItem 1
TransactionCurrency TransactionCurrency 1
ValueDate ValueDate 1
@AbapCatalog: { preserveKey: true,
                sqlViewName: 'ICADOCGLITEM' }

@AccessControl.authorizationCheck: #CHECK

@ClientHandling.algorithm: #SESSION_VARIABLE

@EndUserText.label: 'Document General Ledger Item'

@Metadata.ignorePropagatedAnnotations: true

@ObjectModel: { 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 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 _AcctAssgmtCat             on  $projection.CAAccountAssignmentCategory = _AcctAssgmtCat.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_CADocumentHeader            as _DocHeader                 on  $projection.CADocumentNumber = _DocHeader.CADocumentNumber
  association [1..1] to I_CAEuroConversionStatus      as _CAEuroConversionStatus    on  $projection.CAStatusOfEuroConversion = _CAEuroConversionStatus.CAStatusOfEuroConversion
  association [0..1] to I_CANonDcblInputTaxCode       as _CANonDcblInputTaxCode     on  $projection.CAContainsNonDeductibleInptTax = _CANonDcblInputTaxCode.CAContainsNonDeductibleInptTax

  association [0..1] to I_CAOtherTaxCode              as _OtherTaxCode              on  $projection.CAOtherTaxCode = _OtherTaxCode.CAOtherTaxCode
                                                                                    and $projection.country        = _OtherTaxCode.Country
  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_CAWithholdingTaxSupplement  as _WhldgTaxSuplmnt           on  $projection.CAWithholdingTaxSupplement = _WhldgTaxSuplmnt.CAWithholdingTaxSupplement
                                                                                    and $projection.country                    = _WhldgTaxSuplmnt.Country


  association [0..1] to I_ChartOfAccounts             as _ChartOfAccounts           on  $projection.chartofaccounts = _ChartOfAccounts.ChartOfAccounts
  association [1..1] to I_CompanyCode                 as _CompCode                  on  $projection.CompanyCode = _CompCode.CompanyCode
  association [0..1] to I_CompanyCode                 as _CompCodeCashFlow          on  $projection.CACashFlowCompanyCode = _CompCodeCashFlow.CompanyCode


  association [0..1] to I_Country                     as _Country                   on  $projection.country = _Country.Country
  association [0..1] to I_Currency                    as _GLPostingCurrency         on  $projection.CAGLPostingCurrency = _GLPostingCurrency.Currency
  association [1..1] to I_GLAccountInChartOfAccounts  as _GLAccount                 on  $projection.chartofaccounts = _GLAccount.ChartOfAccounts
                                                                                    and $projection.GLAccount       = _GLAccount.GLAccount
  association [1..1] to I_GLAccountInCompanyCode      as _GLAccountInCompanyCode    on  $projection.GLAccount   = _GLAccountInCompanyCode.GLAccount
                                                                                    and $projection.CompanyCode = _GLAccountInCompanyCode.CompanyCode

  association [0..1] to I_GLAccountInChartOfAccounts  as _CashFlowAccount           on  $projection.chartofaccounts   = _CashFlowAccount.ChartOfAccounts
                                                                                    and $projection.CACashFlowAccount = _CashFlowAccount.GLAccount
  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..*] to I_ProfitCenterForCompanyCode as _ProfitCenter           on  $projection.CompanyCode = _ProfitCenter.CompanyCode

  //                                                                                and $projection.ProfitCenter = _ProfitCenter.ProfitCenter

  //                                                                                and $projection.ValueDate <= _ProfitCenter.ValidityEndDate



  //  association [0..1] to I_PlanningLevel              as _PlanningLevel          on  $projection.PlanningLevel = _PlanningLevel.PlanningLevel


  /* not yet released
    association [0..1] to I_TaxCode                    as _TaxCode                on  $projection.taxcalculationprocedure = _TaxCode.TaxCalculationProcedure
                                                                                  and $projection.TaxCode = _TaxCode.TaxCode
    association [0..1] to I_TaxCode                    as _SupplementTaxCode      on  $projection.taxcalculationprocedure = _SupplementTaxCode.TaxCalculationProcedure
                                                                                  and $projection.CASupplementaryTaxCode = _SupplementTaxCode.TaxCode
    association [0..*] to I_TaxJurisdiction            as _TaxJurisdiction        on  $projection.TaxJurisdiction = _TaxJurisdiction.TaxJurisdiction
  */


  //  association [0..1] to I_TaxCalculationProcedure    as _TaxCalcProcedure       on  $projection.taxcalculationprocedure = _TaxCalcProcedure.TaxCalculationProcedure




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

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

      /* organizational and master data */
      @ObjectModel.foreignKey.association: '_CompCode'
      bukrs                                                                                       as CompanyCode,
      @ObjectModel.foreignKey.association: '_BusinessArea'
      cast(cast(gsber as abap.char(4)) as fis_rbusa preserving type )                             as BusinessArea,
      cast(cast(bupla as abap.char(4)) as farp_bupla preserving type )                            as BusinessPlace,
      @ObjectModel.foreignKey.association: '_Segment'
      cast(cast(segment as abap.char(10)) as fb_segment preserving type )                         as Segment,
      //      @ObjectModel.foreignKey.association: '_ProfitCenter'

      cast(cast(prctr as abap.char(10)) as fis_prctr preserving type )                            as ProfitCenter,
      @ObjectModel.foreignKey.association: '_PartnerCompany'
      cast(vbund as fis_rassc preserving type )                                                   as PartnerCompany,
      @ObjectModel.foreignKey.association: '_GLAccount'
      cast(hkont as fis_racct preserving type )                                                   as GLAccount,
      // Include of FKBER might not be available in all systems

      //      fkber                                                  as  FunctionalArea,


      /* dates and amounts */
      valut                                                                                       as ValueDate,
      //kursf                                                             as CAExchangeRate, //replace due to conversion exit EXCRT

      cast( abs( kursf ) as fis_absolute_exchangerate preserving type )                           as CAExchangeRate,
      cast( case when kursf < 0 then 'X' else ' ' end as fis_indirect_quotation preserving type ) as ExchRateIsIndirectQuotation,
      _DocHeader.TransactionCurrency,
      _CompCode.Currency,
      @Semantics.amount.currencyCode: 'Currency'
      betrh                                                                                       as CAAmountInLocalCurrency,
      @Semantics.amount.currencyCode: 'TransactionCurrency'
      betrw                                                                                       as CAAmountInTransactionCurrency,
      @Semantics.amount.currencyCode: 'Currency' // can also be derived from T005

      betr2                                                                                       as CAAmountInSecondCurrency,
      @Semantics.amount.currencyCode: 'Currency' // can also be derived from T005

      betr3                                                                                       as CAAmountInThirdCurrency,

      @ObjectModel.foreignKey.association: '_AcctAssgmtCat'
      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,
      cast(ldgrp as fagl_ldgrp preserving type )                                                  as LedgerGroup,
      @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,
      cast(paobjnr as rkeobjnr_char )                                                             as ProfitabilitySegment_2,
      pasubnr                                                                                     as ProfitabilitySegmentChanges,

      //      @ObjectModel.foreignKey.association: '_PlanningLevel'

      cast(fdlev as fdlev preserving type )                                                       as PlanningLevel,
      whgrp                                                                                       as CARepetitionGroup,
      @ObjectModel.foreignKey.association: '_CAAcctDetnTransKey'
      ktosl                                                                                       as CATransactionKeyAccountDetn,
      kschl                                                                                       as ConditionType,
      xeiph                                                                                       as CAIsSeparateLineItemInGL,
      meins                                                                                       as BaseUnit,

      /* tax data */
      //      @ObjectModel.foreignKey.association: '_TaxCode'

      cast(mwskz as fis_mwskz preserving type )                                                   as TaxCode,
      //      @ObjectModel.foreignKey.association: '_SupplementTaxCode'

      mwszkz                                                                                      as CASupplementaryTaxCode,
      @ObjectModel.foreignKey.association: '_WhldgTaxSuplmnt'
      qssew                                                                                       as CAWithholdingTaxSupplement,
      @ObjectModel.foreignKey.association: '_OtherTaxCode'
      strkz                                                                                       as CAOtherTaxCode,
      txgrp                                                                                       as CAGroupingCodeForTaxItems,
      //      @ObjectModel.foreignKey.association: '_TaxJurisdiction'

      cast(txjcd as fis_txjcd preserving type )                                                   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,
      @VDM.lifecycle.status: #DEPRECATED
      @VDM.lifecycle.successor: 'CATaxItemHasAltvExchangeRate'
      xdexr                                                                                       as CAAltvExchangeRateForTaxItem,
      @VDM.lifecycle.status: #DEPRECATED
      @VDM.lifecycle.successor: 'CAAltvExchangeRateSetCode'
      @Semantics.booleanIndicator: true
      xdexr                                                                                       as CATaxItemHasAltvExchangeRate,
      @ObjectModel.foreignKey.association: '_CAAltvExchangeRateSetCode'
      xdexr                                                                                       as CAAltvExchangeRateSetCode,

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

      cast(hbkid as farp_hbkid preserving type )                                                  as HouseBank,
      cast(hktid as fac_hktid preserving type )                                                   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,
      @VDM.lifecycle.status: #DEPRECATED
      @VDM.lifecycle.successor: 'EarmarkedFundsDocument'
      kblnr                                                                                       as EarmarkedFunds,
      kblnr                                                                                       as EarmarkedFundsDocument,

      /* currently not available / still to clarify
      kdein,
      ps_psp_pnr,
      aufnr,
      menge                                                  as Quantity,
      regio,
      counc,
      fipex,
      fistl,
      fonds,
      measure,
      grant_nbr,
      budget_pd,
      kblpos,
      */

      @ObjectModel.foreignKey.association: '_ChartOfAccounts'
      _CompCode.ChartOfAccounts,
      @ObjectModel.foreignKey.association: '_Country'
      _CompCode.Country,
      //      @ObjectModel.foreignKey.association: '_TaxCalcProcedure'

      _CompCode._Country.TaxCalculationProcedure,

      // Associations

      _AcctAssgmtCat,
      _BusinessArea,
      _CAAcctAssgmtDistrCode,
      _CAAcctDetnTransKey,
      _CAAltvExchangeRateSetCode,
      _CAEuroConversionStatus,
      _CAIntPostingReasonCode,
      _CANegativePostingCtrlCode,
      _CANonDcblInputTaxCode,
      _CashFlowAccount,
      _ChartOfAccounts,
      _CompCode,
      _CompCodeCashFlow,
      _Country,
      _DocHeader,
      _GLAccount,
      _GLAccountInCompanyCode,
      _GLPostingCurrency,
      _OtherTaxCode,
      _ProfitCenter,
      _PartnerCompany,
      _Segment,
      _WhldgTaxSuplmnt

      //      _PlanningLevel,

      //      _TaxCode,

      //      _SupplementTaxCode,

      //      _TaxJurisdiction,

      //      _TaxCalcProcedure

}