P_TaxRegisterIndirectTaxItem

DDL: P_TAXREGISTERINDIRECTTAXITEM Type: view BASIC

P_TaxRegisterIndirectTaxItem is a Basic CDS View in SAP S/4HANA. It reads from 1 data source (bset) and exposes 27 fields with key fields CompanyCode, AccountingDocument, FiscalYear, DocumentTaxItemNumber.

Data Sources (1)

SourceAliasJoin Type
bset bset from

Annotations (6)

NameValueLevelField
AbapCatalog.sqlViewName PINDIRECTTAXITM view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.viewType #BASIC view
VDM.private true view
ClientHandling.algorithm #SESSION_VARIABLE view

Fields (27)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode bset bukrs Value
KEY AccountingDocument bset belnr SD Document
KEY FiscalYear bset gjahr Settlement Year
KEY DocumentTaxItemNumber
TaxCountry bset tax_country Tax Ctry/Rgn
GLAccount bset hkont Transfer acct
TransactionTypeDetermination bset ktosl Transaction
ConditionType bset kschl Tax Item Type
TaxDeterminationDate bset txdat Tax Date
TaxRate bset kbetr Tax Rate
TaxItemGroup bset txgrp Tax off grpg
TaxBaseAmountInCoCodeCrcy bset hwbas LC Base Amt
hwsteendasTaxAmountInCoCodeCrcy
TaxBaseAmountInTransCrcy bset fwbas Base Amount
fwsteendasTaxAmountInTransCrcy
TaxBaseAmountInRptgCrcy bset lwbas NC Basis
lwsteendasTaxAmountInRptgCrcy
TaxBaseAmtInAdditionalCrcy1 bset h2bas LC 2 Base
h2steendasTaxAmountInAdditionalCurrency1
TaxBaseAmtInAdditionalCrcy2 bset h3bas LC 3 Base
h3steendasTaxAmountInAdditionalCurrency2
TaxCode bset mwskz Tax Code
TaxReturnCountry bset lstml Reporting C/R
TaxRateValidityStartDate bset txdat_from Tax Rate Valid-From
DebitCreditCode bset shkzg Returns
TaxJurisdiction bset txjcd Tax Jurisdict.
TaxItemAcctgDocItemRef bset taxps Tax doc. item number

Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.

-- Derived SQL interpretation of CDS view P_TaxRegisterIndirectTaxItem.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.

CREATE VIEW P_TaxRegisterIndirectTaxItem AS
SELECT
  bset.bukrs AS CompanyCode,
  bset.belnr AS AccountingDocument,
  bset.gjahr AS FiscalYear,
  cast(bset.buzei as abap.int4) AS DocumentTaxItemNumber,
  bset.tax_country AS TaxCountry,
  bset.hkont AS GLAccount,
  bset.ktosl AS TransactionTypeDetermination,
  bset.kschl AS ConditionType,
  bset.txdat AS TaxDeterminationDate,
  bset.kbetr AS TaxRate,
  bset.txgrp AS TaxItemGroup,
  bset.hwbas AS TaxBaseAmountInCoCodeCrcy,
  case bset.shkzg when 'H' then -bset.hwste when 'S' then bset.hwste else bset.hwste end as TaxAmountInCoCodeCrcy AS hwsteendasTaxAmountInCoCodeCrcy,
  bset.fwbas AS TaxBaseAmountInTransCrcy,
  case bset.shkzg when 'H' then -bset.fwste when 'S' then bset.fwste else bset.fwste end as TaxAmountInTransCrcy AS fwsteendasTaxAmountInTransCrcy,
  bset.lwbas AS TaxBaseAmountInRptgCrcy,
  case bset.shkzg when 'H' then -bset.lwste when 'S' then bset.lwste else bset.lwste end as TaxAmountInRptgCrcy AS lwsteendasTaxAmountInRptgCrcy,
  bset.h2bas AS TaxBaseAmtInAdditionalCrcy1,
  case bset.shkzg when 'H' then -bset.h2ste when 'S' then bset.h2ste else bset.h2ste end as TaxAmountInAdditionalCurrency1 AS h2steendasTaxAmountInAdditionalCurrency1,
  bset.h3bas AS TaxBaseAmtInAdditionalCrcy2,
  case bset.shkzg when 'H' then -bset.h3ste when 'S' then bset.h3ste else bset.h3ste end as TaxAmountInAdditionalCurrency2 AS h3steendasTaxAmountInAdditionalCurrency2,
  bset.mwskz AS TaxCode,
  bset.lstml AS TaxReturnCountry,
  bset.txdat_from AS TaxRateValidityStartDate,
  bset.shkzg AS DebitCreditCode,
  bset.txjcd AS TaxJurisdiction,
  bset.taxps AS TaxItemAcctgDocItemRef
FROM bset
;