P_PL_SAFTTaxItemBasicAgg

DDL: P_PL_SAFTTAXITEMBASICAGG SQL: PPLSAFTTAXITBSAG Type: view COMPOSITE

P_PL_SAFTTaxItemBasicAgg is a Composite CDS View in SAP S/4HANA. It reads from 3 data sources (I_StRpTaxItem, I_PL_SAFTTaxCodeMap, P_PL_SAFTTaxType) and exposes 37 fields with key fields TaxType, CompanyCode, AccountingDocument, FiscalYear.

Data Sources (3)

SourceAliasJoin Type
I_StRpTaxItem TaxItem from
I_PL_SAFTTaxCodeMap TaxMap inner
P_PL_SAFTTaxType TaxType inner

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName PPLSAFTTAXITBSAG view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.viewType #COMPOSITE view
VDM.private true view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #P view
ClientHandling.algorithm #SESSION_VARIABLE view

Fields (37)

KeyFieldSource TableSource FieldDescription
KEY TaxType P_PL_SAFTTaxType TransactionTaxType Tax Type
KEY CompanyCode I_StRpTaxItem CompanyCode Receiver Company Code
KEY AccountingDocument I_StRpTaxItem AccountingDocument Journal Entry
KEY FiscalYear I_StRpTaxItem FiscalYear G/L Fiscal Year
PL_SAFTTaxAmountBox I_PL_SAFTTaxCodeMap PL_SAFTTaxAmountBox Tax Amt SAF-T ID
PL_SAFTBaseAmountBoxMultiple I_PL_SAFTTaxCodeMap PL_SAFTBaseAmountBoxMultiple Tax BaseAmt SAF-T ID
PL_SAFTDocumentType TaxCodeSpecialMap PL_SAFTDocumentType
PL_SAFTTaxItemHasMarginAmount TaxCodeSpecialMap PL_SAFTTaxItemHasMarginAmount
PL_SAFTAddlClassification TaxCodeSpecialMap PL_SAFTAddlClassification
PL_SAFTInvcExclRsnFromTotals TaxCodeSpecialMap PL_SAFTInvcExclRsnFromTotals
TaxReportingDate I_StRpTaxItem TaxReportingDate Tax Reporting Date
TaxReturnCountry I_StRpTaxItem TaxReturnCountry Reporting C/R
TransactionTypeDetermination I_StRpTaxItem TransactionTypeDetermination Transaction Key
TaxCalculationProcedure I_StRpTaxItem TaxCalculationProcedure Tax Procedure
TaxCode I_StRpTaxItem TaxCode Tax Code
AccountingDocumentType I_StRpTaxItem AccountingDocumentType Journal Entry Type
TaxJurisdiction I_StRpTaxItem TaxJurisdiction Tax Jurisdiction
TaxCountry I_StRpTaxItem TaxCountry Tax Ctry/Reg.
Customer I_StRpTaxItem Customer Sold-to Party
Supplier I_StRpTaxItem Supplier Supplier
ReferenceDocumentType I_StRpTaxItem ReferenceDocumentType Reference Document Type
OriginalReferenceDocument I_StRpTaxItem OriginalReferenceDocument Reference Key
BusinessPartnerCountry I_StRpTaxItem BusinessPartnerCountry BP Ctry/Reg.
TaxNumber3elseendasVATRegistration
BusinessPartnerName I_StRpTaxItem BusinessPartnerName Extracted Customer Name
CustomerSupplierAddress I_StRpTaxItem CustomerSupplierAddress
DocumentReferenceID I_StRpTaxItem DocumentReferenceID Reference
DocumentDate I_StRpTaxItem DocumentDate Journal Entry Date
CompanyCodeCurrency I_StRpTaxItem CompanyCodeCurrency Local Currency
TaxAmountInCoCodeCrcy I_StRpTaxItem TaxAmountInCoCodeCrcy Tax Amount in Company Code Currency
TaxBaseAmountInCoCodeCrcy I_StRpTaxItem TaxBaseAmountInCoCodeCrcy TxBaseAmt CoCodeCrcy
DocumentCurrency I_StRpTaxItem DocumentCurrency Document Currency
TaxBaseAmountInCountryCrcy I_StRpTaxItem TaxBaseAmountInCountryCrcy Base Amount
TaxAmountInCountryCrcy I_StRpTaxItem TaxAmountInCountryCrcy Tax Rept. Crcy
BillingDocument I_PL_DownPayment BillingDocument SD Document
_AccountingDocument _AccountingDocument
_DebtorCreditorRblsPyblsItem _DebtorCreditorRblsPyblsItem

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_SAFTTaxItemBasicAgg.
-- 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: PPLSAFTTAXITBSAG

CREATE VIEW P_PL_SAFTTaxItemBasicAgg AS
SELECT
  TaxType.TransactionTaxType AS TaxType,
  TaxItem.CompanyCode AS CompanyCode,
  TaxItem.AccountingDocument AS AccountingDocument,
  TaxItem.FiscalYear AS FiscalYear,
  TaxMap.PL_SAFTTaxAmountBox AS PL_SAFTTaxAmountBox,
  TaxMap.PL_SAFTBaseAmountBoxMultiple AS PL_SAFTBaseAmountBoxMultiple,
  TaxCodeSpecialMap.PL_SAFTDocumentType AS PL_SAFTDocumentType,
  TaxCodeSpecialMap.PL_SAFTTaxItemHasMarginAmount AS PL_SAFTTaxItemHasMarginAmount,
  TaxCodeSpecialMap.PL_SAFTAddlClassification AS PL_SAFTAddlClassification,
  TaxCodeSpecialMap.PL_SAFTInvcExclRsnFromTotals AS PL_SAFTInvcExclRsnFromTotals,
  TaxItem.TaxReportingDate AS TaxReportingDate,
  TaxItem.TaxReturnCountry AS TaxReturnCountry,
  TaxItem.TransactionTypeDetermination AS TransactionTypeDetermination,
  TaxItem.TaxCalculationProcedure AS TaxCalculationProcedure,
  TaxItem.TaxCode AS TaxCode,
  TaxItem.AccountingDocumentType AS AccountingDocumentType,
  TaxItem.TaxJurisdiction AS TaxJurisdiction,
  TaxItem.TaxCountry AS TaxCountry,
  TaxItem.Customer AS Customer,
  TaxItem.Supplier AS Supplier,
  TaxItem.ReferenceDocumentType AS ReferenceDocumentType,
  TaxItem.OriginalReferenceDocument AS OriginalReferenceDocument,
  TaxItem.BusinessPartnerCountry AS BusinessPartnerCountry,
  case when TaxItem.CustomerSupplierVATRegn is not initial and TaxItem.CustomerSupplierVATRegn is not null then TaxItem.CustomerSupplierVATRegn when TaxItem.TaxNumber1 is not initial and TaxItem.TaxNumber1 is not null then TaxItem.TaxNumber1 when TaxItem.TaxNumber2 is not initial and TaxItem.TaxNumber2 is not null then TaxItem.TaxNumber2 when TaxItem.TaxNumber3 is not initial and TaxItem.TaxNumber3 is not null then TaxItem.TaxNumber3 else '' end as VATRegistration AS TaxNumber3elseendasVATRegistration,
  TaxItem.BusinessPartnerName AS BusinessPartnerName,
  TaxItem.CustomerSupplierAddress AS CustomerSupplierAddress,
  TaxItem.DocumentReferenceID AS DocumentReferenceID,
  TaxItem.DocumentDate AS DocumentDate,
  TaxItem.CompanyCodeCurrency AS CompanyCodeCurrency,
  TaxItem.TaxAmountInCoCodeCrcy AS TaxAmountInCoCodeCrcy,
  TaxItem.TaxBaseAmountInCoCodeCrcy AS TaxBaseAmountInCoCodeCrcy,
  TaxItem.DocumentCurrency AS DocumentCurrency,
  TaxItem.TaxBaseAmountInCountryCrcy AS TaxBaseAmountInCountryCrcy,
  TaxItem.TaxAmountInCountryCrcy AS TaxAmountInCountryCrcy,
  I_PL_DownPayment.BillingDocument AS BillingDocument
FROM I_StRpTaxItem AS TaxItem
INNER JOIN P_PL_SAFTTaxType AS TaxType ON /* join condition not captured in parsed metadata */
INNER JOIN I_PL_SAFTTaxCodeMap AS TaxMap ON /* join condition not captured in parsed metadata */
;