P_PL_SAFTTaxItem

DDL: P_PL_SAFTTAXITEM SQL: PPLSAFTTAXITEM Type: view CONSUMPTION Package: GLO_FIN_IS_SAFT_PL

SAF-T PL Tax Item

P_PL_SAFTTaxItem is a Consumption CDS View that provides data about "SAF-T PL Tax Item" in SAP S/4HANA. It reads from 3 data sources (I_CompanyCode, I_PL_SAFTVatExternalDocument, I_PL_SAFTVatExternalDocument) and exposes 45 fields with key fields TaxType, CompanyCode, AccountingDocument, FiscalYear, CompanyCode. Part of development package GLO_FIN_IS_SAFT_PL.

Data Sources (3)

SourceAliasJoin Type
I_CompanyCode I_CompanyCode inner
I_PL_SAFTVatExternalDocument I_PL_SAFTVatExternalDocument from
I_PL_SAFTVatExternalDocument I_PL_SAFTVatExternalDocument union_all

Parameters (2)

NameTypeDefault
P_StartDate datum
P_EndDate datum

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName PPLSAFTTAXITEM view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #CHECK view
VDM.viewType #CONSUMPTION view
VDM.private true view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #X view
ClientHandling.algorithm #SESSION_VARIABLE view

Fields (45)

KeyFieldSource TableSource FieldDescription
KEY TaxType a TaxType Tax Type
KEY CompanyCode a CompanyCode Receiver Company Code
KEY AccountingDocument a AccountingDocument Journal Entry
KEY FiscalYear a FiscalYear G/L Fiscal Year
TaxReportingDate a TaxReportingDate Tax Reporting Date
TaxReturnCountry a TaxReturnCountry Reporting C/R
TaxCalculationProcedure a TaxCalculationProcedure Tax Procedure
CompanyCodeCurrency a CompanyCodeCurrency Local Currency
Customer a Customer Sold-to Party
Supplier a Supplier Supplier
ReferenceDocumentType a ReferenceDocumentType Reference Document Type
OriginalReferenceDocument a OriginalReferenceDocument Reference Key
BusinessPartnerCountry a BusinessPartnerCountry Venue: Ctry/Reg
CustomerSupplierAddress a CustomerSupplierAddress
DocumentDate a DocumentDate Journal Entry Date
BillingDocument
InvoiceReceiptDate
IsReversal
IsReversed
DeliveryDate Delivery Date
CompanyCodekeyTaxType
KEY CompanyCode I_PL_SAFTVatExternalDocument CompanyCode Receiver Company Code
KEY AccountingDocument Journal Entry
KEY FiscalYear G/L Fiscal Year
TaxReportingDate Tax Reporting Date
TaxReturnCountry Reporting C/R
TaxCalculationProcedure Tax Procedure
CompanyCodeCurrency Local Currency
GrossTaxAmtInCoCodeCrcy I_PL_SAFTVatExternalDocument TaxAmountInCoCodeCrcy Tax Amount in Company Code Currency
Customer Sold-to Party
Supplier Supplier
ReferenceDocumentType Reference Document Type
OriginalReferenceDocument Reference Key
BusinessPartnerCountry I_CompanyCode Country Venue: Ctry/Reg
VATRegistration
BusinessPartnerName
CustomerSupplierAddress
DocumentReferenceID
DocumentDate DocumentDate Journal Entry Date
BillingDocument
InvoiceReceiptDate
IsReversal
IsReversed
DeliveryDate DeliveryDate Delivery Date
PL_SAFTTaxTag I_PL_SAFTVatExternalDocument PL_SAFTTaxTag Template Tags

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_PL_SAFTTaxItem.
-- 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: PPLSAFTTAXITEM
-- Parameters: P_StartDate : datum, P_EndDate : datum

CREATE VIEW P_PL_SAFTTaxItem AS
SELECT
  a.TaxType AS TaxType,
  a.CompanyCode AS CompanyCode,
  a.AccountingDocument AS AccountingDocument,
  a.FiscalYear AS FiscalYear,
  a.TaxReportingDate AS TaxReportingDate,
  a.TaxReturnCountry AS TaxReturnCountry,
  a.TaxCalculationProcedure AS TaxCalculationProcedure,
  a.CompanyCodeCurrency AS CompanyCodeCurrency,
  a.Customer AS Customer,
  a.Supplier AS Supplier,
  a.ReferenceDocumentType AS ReferenceDocumentType,
  a.OriginalReferenceDocument AS OriginalReferenceDocument,
  a.BusinessPartnerCountry AS BusinessPartnerCountry,
  a.CustomerSupplierAddress AS CustomerSupplierAddress,
  a.DocumentDate AS DocumentDate,
  coalesce(ltrim(c.BillingDocument,'0'),'') AS BillingDocument,
  coalesce(d.InvoiceReceiptDate, '00000000') AS InvoiceReceiptDate,
  coalesce(d.IsReversal, ' ') AS IsReversal,
  coalesce(d.IsReversed, ' ') AS IsReversed,
  coalesce(c.ServicesRenderedDate, coalesce(a.TaxReportingDate, '00000000')) AS DeliveryDate,
  ' ' as PL_SAFTTaxTag AS CompanyCodekeyTaxType,
  I_PL_SAFTVatExternalDocument.TaxAmountInCoCodeCrcy AS GrossTaxAmtInCoCodeCrcy,
  'BRAK' AS VATRegistration,
  'BRAK' AS BusinessPartnerName,
  cast( I_PL_SAFTVatExternalDocument.PL_SAFTExternalDocument as abap.char(66) ) AS DocumentReferenceID,
  I_PL_SAFTVatExternalDocument.PL_SAFTTaxTag AS PL_SAFTTaxTag
FROM I_PL_SAFTVatExternalDocument
INNER JOIN I_CompanyCode ON /* join condition not captured in parsed metadata */
-- UNION ALL with additional select branch(es): I_PL_SAFTVatExternalDocument
;