P_SK_StRpVATCSTaxItem

DDL: P_SK_STRPVATCSTAXITEM SQL: PSKSRVATCSTI Type: view COMPOSITE Package: GLO_FIN_IS_VAT_SK

SK VAT Control Statement Tax Item

P_SK_StRpVATCSTaxItem is a Composite CDS View that provides data about "SK VAT Control Statement Tax Item" in SAP S/4HANA. It reads from 1 data source (I_StRpTaxItem) and exposes 33 fields with key fields ReportingCountry, CompanyCode, AccountingDocument, FiscalYear, TaxCode. It has 1 association to related views. Part of development package GLO_FIN_IS_VAT_SK.

Data Sources (1)

SourceAliasJoin Type
I_StRpTaxItem TxItem from

Parameters (1)

NameTypeDefault
P_KeyDate fiskvatc_valid_on

Associations (1)

CardinalityTargetAliasCondition
[0..1] I_StRpTaxItem _NonDcblTxItem TxItem.ReportingCountry = _NonDcblTxItem.ReportingCountry and TxItem.CompanyCode = _NonDcblTxItem.CompanyCode and TxItem.AccountingDocument = _NonDcblTxItem.AccountingDocument and TxItem.FiscalYear = _NonDcblTxItem.FiscalYear and TxItem.TaxCode = _NonDcblTxItem.TaxCode and TxItem.TaxItemGroup = _NonDcblTxItem.TaxItemGroup and TxItem.DebitCreditCode = _NonDcblTxItem.DebitCreditCode and _NonDcblTxItem.TaxIsNotDeductible = 'X'

Annotations (6)

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

Fields (33)

KeyFieldSource TableSource FieldDescription
KEY ReportingCountry I_StRpTaxItem ReportingCountry
KEY CompanyCode I_StRpTaxItem CompanyCode Receiver Company Code
KEY AccountingDocument I_StRpTaxItem AccountingDocument Journal Entry
KEY FiscalYear I_StRpTaxItem FiscalYear G/L Fiscal Year
KEY TaxCode I_StRpTaxItem TaxCode Tax Code
KEY TransactionTypeDetermination I_StRpTaxItem TransactionTypeDetermination Transaction Key
KEY TaxReportingDate I_StRpTaxItem TaxReportingDate Tax Reporting Date
TaxItem
TaxGroup
VATLiabilityelseendasIsVATLiable
VATRegistration
InvoiceNumber
ReferenceInvoiceNumber
TaxFulfillmentDate
ExchangeRate
TaxRateendasTaxRate
TaxBaseAmount
TaxAmountInRptgCrcyendasTaxAmount
ReportingCurrency
IsReversal
IsReversed
SenderLogicalSystem
OriginalReferenceDocument
ReferenceDocumentType
DocumentReferenceID
TaxType
DebitCreditCode
Customer
Supplier
TaxBoxStrucValidityStartDate
TaxBoxStrucValidityEndDate
TaxRateValidityStartDate
TaxRateValidityEndDate

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_SK_StRpVATCSTaxItem.
-- 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: PSKSRVATCSTI
-- Parameters: P_KeyDate : fiskvatc_valid_on

CREATE VIEW P_SK_StRpVATCSTaxItem AS
SELECT
  TxItem.ReportingCountry AS ReportingCountry,
  TxItem.CompanyCode AS CompanyCode,
  TxItem.AccountingDocument AS AccountingDocument,
  TxItem.FiscalYear AS FiscalYear,
  TxItem.TaxCode AS TaxCode,
  TxItem.TransactionTypeDetermination AS TransactionTypeDetermination,
  TxItem.TaxReportingDate AS TaxReportingDate,
  min (TxItem.TaxItem) AS TaxItem,
  min (TxGroup.TaxGroup) AS TaxGroup,
  min (case when TxItem.Customer <> '' then coalesce (TxItem._CustomerSupplierLineItem._OneTimeAccountBP.IsVATLiable, TxItem._CustomerSupplierLineItem._Customer.VATLiability) else '' end) as IsVATLiable AS VATLiabilityelseendasIsVATLiable,
  min (TxItem.CustomerSupplierVATRegn) AS VATRegistration,
  cast (min (TxItem._JournalEntry.JrnlEntryCntrySpecificRef4) as fisk_doc_num) AS InvoiceNumber,
  cast (min (TxItem._JournalEntry.JrnlEntryCntrySpecificRef5) as fisk_ref_doc_num) AS ReferenceInvoiceNumber,
  min (TxItem.TaxFulfillmentDate) AS TaxFulfillmentDate,
  min (TxItem.ExchangeRate) AS ExchangeRate,
  min (case when TxItem.TaxType = 'V' then TxItem.TaxRate + coalesce (_NonDcblTxItem.TaxRate, 0) else TxItem.TaxRate end) as TaxRate AS TaxRateendasTaxRate,
  sum (TxItem.TaxBaseAmountInRptgCrcy) AS TaxBaseAmount,
  sum (case when TxItem.TaxType = 'V' then TxItem.TaxAmountInRptgCrcy + coalesce (_NonDcblTxItem.TaxAmountInRptgCrcy, 0) else TxItem.TaxAmountInRptgCrcy end) as TaxAmount AS TaxAmountInRptgCrcyendasTaxAmount,
  min (TxItem.ReportingCurrency) AS ReportingCurrency,
  min (TxItem.IsReversal) AS IsReversal,
  min (TxItem.IsReversed) AS IsReversed,
  min (TxItem.SenderLogicalSystem) AS SenderLogicalSystem,
  min (TxItem.OriginalReferenceDocument) AS OriginalReferenceDocument,
  min (TxItem.ReferenceDocumentType) AS ReferenceDocumentType,
  min (TxItem.DocumentReferenceID) AS DocumentReferenceID,
  min (TxItem.TaxType) AS TaxType,
  min (TxItem.DebitCreditCode) AS DebitCreditCode,
  min (TxItem.Customer) AS Customer,
  min (TxItem.Supplier) AS Supplier,
  min (TxGroup.TaxBoxStrucValidityStartDate) AS TaxBoxStrucValidityStartDate,
  min (TxGroup.TaxBoxStrucValidityEndDate) AS TaxBoxStrucValidityEndDate,
  min (TxGroup.TaxRateValidityStartDate) AS TaxRateValidityStartDate,
  min (TxGroup.TaxRateValidityEndDate) AS TaxRateValidityEndDate
FROM I_StRpTaxItem AS TxItem
LEFT OUTER JOIN I_StRpTaxItem AS _NonDcblTxItem ON TxItem.ReportingCountry = _NonDcblTxItem.ReportingCountry AND TxItem.CompanyCode = _NonDcblTxItem.CompanyCode AND TxItem.AccountingDocument = _NonDcblTxItem.AccountingDocument AND TxItem.FiscalYear = _NonDcblTxItem.FiscalYear AND TxItem.TaxCode = _NonDcblTxItem.TaxCode AND TxItem.TaxItemGroup = _NonDcblTxItem.TaxItemGroup AND TxItem.DebitCreditCode = _NonDcblTxItem.DebitCreditCode AND _NonDcblTxItem.TaxIsNotDeductible = 'X'  -- association [0..1]
;