C_CADocumentTaxGLItem

DDL: C_CADOCUMENTTAXGLITEM Type: view_entity CONSUMPTION Package: ODATA_O2C_FICA_DOCUMENT_MANAGE

Tax Item

C_CADocumentTaxGLItem is a Consumption CDS View that provides data about "Tax Item" in SAP S/4HANA. It reads from 1 data source (R_CADocumentGLItemTP) and exposes 101 fields with key fields CADocumentNumber, CAGLItemNumber. It is exposed through 2 OData services (UI_CAACCOUNTBALANCE_DISPLAY, UI_CADOCUMENT_MNG). Part of development package ODATA_O2C_FICA_DOCUMENT_MANAGE.

Data Sources (1)

SourceAliasJoin Type
R_CADocumentGLItemTP R_CADocumentGLItemTP from

Annotations (8)

NameValueLevelField
AccessControl.authorizationCheck #CHECK view
AccessControl.auditFilter #ENABLED view
EndUserText.label Tax Item view
VDM.viewType #CONSUMPTION view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.serviceQuality #C view
Metadata.allowExtensions true view

OData Services (2)

ServiceBindingVersionContractRelease
UI_CAACCOUNTBALANCE_DISPLAY UI_CAACCOUNTBALANCE_DISPLAY V4 C1 NOT_RELEASED
UI_CADOCUMENT_MNG UI_CADOCUMENT_MNG V4 C1 NOT_RELEASED

Fields (101)

KeyFieldSource TableSource FieldDescription
KEY CADocumentNumber CADocumentNumber
KEY CAGLItemNumber CAGLItemNumber
CompanyCode CompanyCode
BusinessArea BusinessArea
BusinessPlace BusinessPlace
Segment Segment
ProfitCenter ProfitCenter
PartnerCompany PartnerCompany
GLAccount GLAccount
ValueDate ValueDate
CAExchangeRate CAExchangeRate
ExchRateIsIndirectQuotation ExchRateIsIndirectQuotation
TransactionCurrency TransactionCurrency
Currency Currency
CAAccountAssignmentCategory CAAccountAssignmentCategory
CAAccountAssignment CAAccountAssignment
CostCenter CostCenter
SalesOrder SalesOrder
SalesOrderItem SalesOrderItem
CAReconciliationKey CAReconciliationKey
CAInternalPostingReasonCode CAInternalPostingReasonCode
CANegativePostingControlCode CANegativePostingControlCode
CAGLPostingCurrency CAGLPostingCurrency
LedgerGroup LedgerGroup
ProfitabilitySegment_2 ProfitabilitySegment_2
ProfitabilitySegmentChanges ProfitabilitySegmentChanges
PlanningLevel PlanningLevel
CARepetitionGroup CARepetitionGroup
CATransactionKeyAccountDetn CATransactionKeyAccountDetn
ConditionType ConditionType
CAIsSeparateLineItemInGL CAIsSeparateLineItemInGL
BaseUnit BaseUnit
TaxCode TaxCode
CASupplementaryTaxCode CASupplementaryTaxCode
CAWithholdingTaxSupplement CAWithholdingTaxSupplement
CAOtherTaxCode CAOtherTaxCode
CAGroupingCodeForTaxItems CAGroupingCodeForTaxItems
TaxJurisdiction TaxJurisdiction
CAEnteredTaxJurisdictionCode CAEnteredTaxJurisdictionCode
CATaxJurisdictionLevelCounter CATaxJurisdictionLevelCounter
CATaxExceptionID CATaxExceptionID
CATaxDate CATaxDate
CAContainsNonDeductibleInptTax CAContainsNonDeductibleInptTax
CATaxRate CATaxRate
GrossIncomeTaxActivityCode GrossIncomeTaxActivityCode
EmploymentTaxDistributionType EmploymentTaxDistributionType
CATaxIsCalculatedExternally CATaxIsCalculatedExternally
CAAltvExchangeRateSetCode CAAltvExchangeRateSetCode
CAIsCashFlowItem CAIsCashFlowItem
CACashFlowAccount CACashFlowAccount
CACashFlowCompanyCode CACashFlowCompanyCode
HouseBank HouseBank
HouseBankAccount HouseBankAccount
QuantitySignCode QuantitySignCode
BankStatementShortID BankStatementShortID
BankStatementItem BankStatementItem
CashManagementLinkType CashManagementLinkType
CashManagementLink CashManagementLink
CAItmIsCreatedByPostgInterface CAItmIsCreatedByPostgInterface
CAProfitAnalysisUpdtIsDirect CAProfitAnalysisUpdtIsDirect
CAInvcgGroupingKey CAInvcgGroupingKey
CACtrlFieldForAcctAssgmtDistr CACtrlFieldForAcctAssgmtDistr
CAUpdateMethodForFundsMgmt CAUpdateMethodForFundsMgmt
OriginalFinancialMgmtArea OriginalFinancialMgmtArea
OriglYearForFinMgmtAcctAssgmt OriglYearForFinMgmtAcctAssgmt
EarmarkedFundsDocument EarmarkedFundsDocument
ChartOfAccounts ChartOfAccounts
Country Country
TaxCalculationProcedure TaxCalculationProcedure
CAAmountInLocalCurrency CAAmountInLocalCurrency
CAAmountInTransactionCurrency CAAmountInTransactionCurrency
CAAmountInSecondCurrency CAAmountInSecondCurrency
CAAmountInThirdCurrency CAAmountInThirdCurrency
CATaxPortionInLocalCurrency CATaxPortionInLocalCurrency
CATaxPortionInTransCurrency CATaxPortionInTransCurrency
CATaxBaseAmountInLocalCurrency CATaxBaseAmountInLocalCurrency
CATaxBaseAmount CATaxBaseAmount
CANonDeductibleTxAmtInDocCrcy CANonDeductibleTxAmtInDocCrcy
CANonDeductibleTxAmtInLoclCrcy CANonDeductibleTxAmtInLoclCrcy
_BusinessArea _BusinessArea
_CAAccountAssignmentCategory _CAAccountAssignmentCategory
_CAAcctAssgmtDistrCode _CAAcctAssgmtDistrCode
_CAAcctDetnTransKey _CAAcctDetnTransKey
_CAAltvExchangeRateSetCode _CAAltvExchangeRateSetCode
_CAEuroConversionStatus _CAEuroConversionStatus
_CAIntPostingReasonCode _CAIntPostingReasonCode
_CANegativePostingCtrlCode _CANegativePostingCtrlCode
_CANonDcblInputTaxCode _CANonDcblInputTaxCode
_CAOtherTaxCode _CAOtherTaxCode
_CashFlowAccount _CashFlowAccount
_CashFlowCompanyCode _CashFlowCompanyCode
_CAWithholdingTaxSupplement _CAWithholdingTaxSupplement
_ChartOfAccounts _ChartOfAccounts
_CompanyCode _CompanyCode
_Country _Country
_DocHeader _DocHeader
_GLAccount _GLAccount
_GLPostingCurrency _GLPostingCurrency
_PartnerCompany _PartnerCompany
_ProfitCenter _ProfitCenter
_Segment _Segment
@AbapCatalog.viewEnhancementCategory: [#NONE]
@AccessControl.authorizationCheck: #CHECK
@AccessControl.auditFilter: #ENABLED
@EndUserText.label: 'Tax Item'

@VDM.viewType: #CONSUMPTION

@ObjectModel.usageType.dataClass: #TRANSACTIONAL
@ObjectModel.usageType.sizeCategory: #XXL
@ObjectModel.usageType.serviceQuality: #C
@Consumption.dbHints:['USE_HEX_PLAN']
@Metadata.allowExtensions: true
define view entity C_CADocumentTaxGLItem
  as select from R_CADocumentGLItemTP
{
  key CADocumentNumber,
  key CAGLItemNumber,

      CompanyCode,
      BusinessArea,
      BusinessPlace,
      Segment,
      ProfitCenter,
      PartnerCompany,
      GLAccount,
      ValueDate,
      CAExchangeRate,
      ExchRateIsIndirectQuotation,
      TransactionCurrency,
      Currency,
      CAAccountAssignmentCategory,
      CAAccountAssignment,
      CostCenter,
      SalesOrder,
      SalesOrderItem,
      CAReconciliationKey,
      CAInternalPostingReasonCode,
      CANegativePostingControlCode,
      CAGLPostingCurrency,
      LedgerGroup,
      ProfitabilitySegment_2,
      ProfitabilitySegmentChanges,
      PlanningLevel,
      CARepetitionGroup,
      CATransactionKeyAccountDetn,
      ConditionType,
      CAIsSeparateLineItemInGL,
      BaseUnit,
      TaxCode,
      CASupplementaryTaxCode,
      CAWithholdingTaxSupplement,
      CAOtherTaxCode,
      CAGroupingCodeForTaxItems,
      TaxJurisdiction,
      CAEnteredTaxJurisdictionCode,
      CATaxJurisdictionLevelCounter,
      CATaxExceptionID,
      CATaxDate,
      CAContainsNonDeductibleInptTax,
      CATaxRate,
      GrossIncomeTaxActivityCode,
      EmploymentTaxDistributionType,
      CATaxIsCalculatedExternally,
      CAAltvExchangeRateSetCode,
      CAIsCashFlowItem,
      CACashFlowAccount,
      CACashFlowCompanyCode,
      HouseBank,
      HouseBankAccount,
      QuantitySignCode,
      BankStatementShortID,
      BankStatementItem,
      CashManagementLinkType,
      CashManagementLink,
      CAItmIsCreatedByPostgInterface,
      CAStatusOfEuroConversion,
      CAProfitAnalysisUpdtIsDirect,
      CAInvcgGroupingKey,
      CACtrlFieldForAcctAssgmtDistr,
      CAUpdateMethodForFundsMgmt,
      OriginalFinancialMgmtArea,
      OriglYearForFinMgmtAcctAssgmt,
      EarmarkedFundsDocument,
      ChartOfAccounts,
      Country,
      TaxCalculationProcedure,

      //Amounts

      @Semantics.amount.currencyCode: 'Currency'
      CAAmountInLocalCurrency,
      @Semantics.amount.currencyCode: 'TransactionCurrency'
      CAAmountInTransactionCurrency,
      @Semantics.amount.currencyCode: 'Currency'
      CAAmountInSecondCurrency,
      @Semantics.amount.currencyCode: 'Currency'
      CAAmountInThirdCurrency,
      @Semantics.amount.currencyCode: 'Currency'
      CATaxPortionInLocalCurrency,
      @Semantics.amount.currencyCode: 'TransactionCurrency'
      CATaxPortionInTransCurrency,
      @Semantics.amount.currencyCode: 'Currency'
      CATaxBaseAmountInLocalCurrency,
      @Semantics.amount.currencyCode: 'TransactionCurrency'
      CATaxBaseAmount,
      @Semantics.amount.currencyCode: 'TransactionCurrency'
      CANonDeductibleTxAmtInDocCrcy,
      @Semantics.amount.currencyCode: 'Currency'
      CANonDeductibleTxAmtInLoclCrcy,
      
      case when ( CATaxRate > '500000' )
        then -( (cast( concat( concat( left(CATaxRate,3), '.'), right(CATaxRate,3) ) as tax_perc_kk)) - 500 )
        else cast( concat( concat( left(CATaxRate,3), '.'), right(CATaxRate,3) ) as tax_perc_kk)
      end  
      as CATaxRateInPercent,
     

      /* Associations */
      _BusinessArea,
      _CAAccountAssignmentCategory,
      _CAAcctAssgmtDistrCode,
      _CAAcctDetnTransKey,
      _CAAltvExchangeRateSetCode,
      _CAEuroConversionStatus,
      _CAIntPostingReasonCode,
      _CANegativePostingCtrlCode,
      _CANonDcblInputTaxCode,
      _CAOtherTaxCode,
      _CashFlowAccount,
      _CashFlowCompanyCode,
      _CAWithholdingTaxSupplement,
      _ChartOfAccounts,
      _CompanyCode,
      _Country,
      _DocHeader,
      _GLAccount,
      _GLPostingCurrency,
      _PartnerCompany,
      _ProfitCenter,
      _Segment

}
where
  CATaxBaseAmountInLocalCurrency <> 0