P_TAXDECLAR_NOWCUBE
P_TAXDECLAR_NOWCUBE is a Basic CDS View in SAP S/4HANA. It reads from 1 data source (I_TaxDeclaration) and exposes 28 fields with key fields CompanyCode, FiscalYear, TaxCode, TransactionTypeDetermination, CompanyCodeCurrency. It has 5 associations to related views.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_TaxDeclaration | bseg | from |
Associations (5)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_Currency | _Currency | $projection.CompanyCodeCurrency = _Currency.Currency |
| [1] | I_CompanyCode | _CompanyCode | $projection.CompanyCode = _CompanyCode.CompanyCode |
| [0..1] | I_TaxCalculationProcedure | _TaxCalculationProcedure | $projection.TaxCalculationProcedure = _TaxCalculationProcedure.TaxCalculationProcedure |
| [0..*] | P_TaxBox_TaxAmt_TDT | _TaxBox_TaxAmt_TDT | $projection.Country = _TaxBox_TaxAmt_TDT.land1 and $projection.TransactionTypeDetermination = _TaxBox_TaxAmt_TDT.ktosl and $projection.TaxCode = _TaxBox_TaxAmt_TDT.mwskz and $projection.PostingDate >= _TaxBox_TaxAmt_TDT.valid_from and $projection.PostingDate <= _TaxBox_TaxAmt_TDT.valid_to and $projection.TaxRateValidityStartDate >= _TaxBox_TaxAmt_TDT.txdat_from and $projection.TaxRateValidityStartDate <= _TaxBox_TaxAmt_TDT.txdat_to |
| [0..*] | P_TaxBox_Base_TDT | _Taxbox_Base_TDT | $projection.Country = _Taxbox_Base_TDT.land1 and $projection.TransactionTypeDetermination = _Taxbox_Base_TDT.ktosl and $projection.TaxCode = _Taxbox_Base_TDT.mwskz and $projection.PostingDate >= _Taxbox_Base_TDT.valid_from and $projection.PostingDate <= _Taxbox_Base_TDT.valid_to and $projection.TaxRateValidityStartDate >= _Taxbox_Base_TDT.txdat_from and $projection.TaxRateValidityStartDate <= _Taxbox_Base_TDT.txdat_to |
Annotations (6)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PNOWDECLAR | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| VDM.private | true | view | |
| VDM.viewType | #BASIC | view |
Fields (28)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CompanyCode | CompanyCode | Receiver Company Code | |
| KEY | FiscalYear | FiscalYear | G/L Fiscal Year | |
| KEY | TaxCode | TaxCode | Tax Code | |
| KEY | TransactionTypeDetermination | TransactionTypeDetermination | Transaction Key | |
| KEY | CompanyCodeCurrency | CompanyCodeCurrency | Local Currency | |
| KEY | AccountingDocument | |||
| KEY | PostingFiscalPeriod | PostingFiscalPeriod | Period | |
| KEY | TaxBaseAmountIsNetAmount | |||
| KEY | CashDiscountBaseAmtIsNetAmt | |||
| KEY | CashDiscount1Percent | Disc. Percent 1 | ||
| KEY | TaxAmountTaxBox | |||
| KEY | TaxBaseAmountTaxBox | |||
| KEY | TaxRateValidityStartDate | TaxRateValidityStartDate | Tax Rate Validity Start Date | |
| TaxBaseAmountInCoCodeCrcy | TxBaseAmt CoCodeCrcy | |||
| TaxAmountInCoCodeCrcy | Tax Amount in Company Code Currency | |||
| CalculatedTxAmtInCoCodeCrcy | Rating Calculated | |||
| SubTotalAmountInCoCodeCrcy | ||||
| TaxRate | Tax Rate | |||
| DocumentType | AccountingDocumentType | Journal Entry Type | ||
| DocumentDate | DocumentDate | Journal Entry Date | ||
| PostingDate | PostingDate | Posting Date for GR | ||
| Country | Country | Venue: Ctry/Reg | ||
| TaxItemGroupingVersion | ||||
| ConditionRateValue | ConditionRateValue | Condition Rate Value | ||
| TaxCalculationProcedure | ||||
| _Currency | _Currency | |||
| _TaxCalculationProcedure | _TaxCalculationProcedure | |||
| _CompanyCode | _CompanyCode |
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_TAXDECLAR_NOWCUBE.
-- 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.
-- SQL view name: PNOWDECLAR
CREATE VIEW P_TAXDECLAR_NOWCUBE AS
SELECT
CompanyCode,
FiscalYear,
TaxCode,
TransactionTypeDetermination,
CompanyCodeCurrency,
cast(bseg.AccountingDocument as fis_belnr) AS AccountingDocument,
PostingFiscalPeriod,
cast (bseg.TaxBaseAmountIsNetAmount as xmwsn) AS TaxBaseAmountIsNetAmount,
cast (bseg.CashDiscountBaseAmtIsNetAmt as xskfn) AS CashDiscountBaseAmtIsNetAmt,
cast (CashDiscount1Percent as dzbd1p_farp) AS CashDiscount1Percent,
cast(_TaxBox_TaxAmt_TDT.tax_box as fot_tax_amount_taxbox) AS TaxAmountTaxBox,
cast(_Taxbox_Base_TDT.tax_box as fot_tax_base_amount_taxbox) AS TaxBaseAmountTaxBox,
TaxRateValidityStartDate,
cast (TaxBaseAmountInCoCodeCrcy as dmbtr_shl) AS TaxBaseAmountInCoCodeCrcy,
cast (TaxAmountInCoCodeCrcy as fis_mwsts) AS TaxAmountInCoCodeCrcy,
cast (CalculatedTxAmtInCoCodeCrcy as fot_tax_recon_amt) AS CalculatedTxAmtInCoCodeCrcy,
cast (SubTotalAmountInCoCodeCrcy as fot_tax_recon_subtotal_amt) AS SubTotalAmountInCoCodeCrcy,
cast ( TaxRate as kbetr_tax) AS TaxRate,
AccountingDocumentType AS DocumentType,
DocumentDate,
PostingDate,
Country,
cast (coalesce(t007z.verstax,'') as verstax ) AS TaxItemGroupingVersion,
ConditionRateValue,
_CompanyCode._Country.TaxCalculationProcedure AS TaxCalculationProcedure
FROM I_TaxDeclaration AS bseg
LEFT OUTER JOIN I_Currency AS _Currency ON CompanyCodeCurrency = _Currency.Currency -- association [0..1]
LEFT OUTER JOIN I_CompanyCode AS _CompanyCode ON CompanyCode = _CompanyCode.CompanyCode -- association [1]
LEFT OUTER JOIN I_TaxCalculationProcedure AS _TaxCalculationProcedure ON TaxCalculationProcedure = _TaxCalculationProcedure.TaxCalculationProcedure -- association [0..1]
LEFT OUTER JOIN P_TaxBox_TaxAmt_TDT AS _TaxBox_TaxAmt_TDT ON Country = _TaxBox_TaxAmt_TDT.land1 AND TransactionTypeDetermination = _TaxBox_TaxAmt_TDT.ktosl AND TaxCode = _TaxBox_TaxAmt_TDT.mwskz AND PostingDate >= _TaxBox_TaxAmt_TDT.valid_from AND PostingDate <= _TaxBox_TaxAmt_TDT.valid_to AND TaxRateValidityStartDate >= _TaxBox_TaxAmt_TDT.txdat_from AND TaxRateValidityStartDate <= _TaxBox_TaxAmt_TDT.txdat_to -- association [0..*]
LEFT OUTER JOIN P_TaxBox_Base_TDT AS _Taxbox_Base_TDT ON Country = _Taxbox_Base_TDT.land1 AND TransactionTypeDetermination = _Taxbox_Base_TDT.ktosl AND TaxCode = _Taxbox_Base_TDT.mwskz AND PostingDate >= _Taxbox_Base_TDT.valid_from AND PostingDate <= _Taxbox_Base_TDT.valid_to AND TaxRateValidityStartDate >= _Taxbox_Base_TDT.txdat_from AND TaxRateValidityStartDate <= _Taxbox_Base_TDT.txdat_to -- association [0..*]
;
Learn More
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- CDS View Annotations — A Complete Guide
- What Is a CDS View in SAP S/4HANA?
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA
- BSEG to ACDOCA: The Universal Journal Migration
- Business Partner Migration: KNA1/LFA1 to BUT000
- Material Document Migration: MSEG/MKPF to MATDOC
- How to Find the Right CDS View for an SAP Table
- BW Extractor to CDS View Migration Guide
- S/4HANA CDS View Deprecation: What You Need to Know
- ABAP CDS View Tutorial — From Basics to Real-World Examples
- RAP and CDS Views — Building Transactional Apps in SAP S/4HANA
- Sales Document Status Migration: VBUP/VBUK Removal in S/4HANA
- CO Tables in S/4HANA: COEP, COBK, COSS, COSP to ACDOCA