P_PT_CADocumentTaxBoxConfig

DDL: P_PT_CADOCUMENTTAXBOXCONFIG Type: view_entity COMPOSITE

P_PT_CADocumentTaxBoxConfig is a Composite CDS View in SAP S/4HANA. It reads from 3 data sources (P_PT_CADOCUMENTTAXBOXCONFIG2, I_StRpTaxItemBoxConfiguration, P_T007B_GLO) and exposes 79 fields with key fields CompanyCode, AccountingDocument, FiscalYear, TaxItem, TransactionTypeDetermination. It has 5 associations to related views.

Data Sources (3)

SourceAliasJoin Type
P_PT_CADOCUMENTTAXBOXCONFIG2 _tax_item from
I_StRpTaxItemBoxConfiguration I_StRpTaxItemBoxConfiguration inner
P_T007B_GLO P_T007B_GLO left_outer

Associations (5)

CardinalityTargetAliasCondition
[0..1] I_BusinessPartnerAddress _BPAddress $projection.BusinessPartner = _BPAddress.BusinessPartner
[1..*] I_Businesspartnertaxnumber _bp_taxnum _bp_taxnum.BusinessPartner = _tax_item.BusinessPartner
[0..1] I_TaxType _TaxType $projection.TaxType = _TaxType.TaxType
[0..*] I_TaxTypeText _Text $projection.TaxType = _Text.TaxType
[1..1] I_FiscalCalendarDate FiscalYear FiscalYear.CalendarDate = _tax_item.CAPostingDate and FiscalYear.FiscalYearVariant = _tax_item.FiscalYearVariant

Annotations (7)

NameValueLevelField
AccessControl.authorizationCheck #NOT_REQUIRED view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.dataClass #MIXED view
VDM.private true view
VDM.viewType #COMPOSITE view

Fields (79)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode P_PT_CADOCUMENTTAXBOXCONFIG2 CompanyCode Receiver Company Code
KEY AccountingDocument
KEY FiscalYear FiscalYear FiscalYear G/L Fiscal Year
KEY TaxItem
KEY TransactionTypeDetermination _tax_map TransactionTypeDetermination Transaction Key
KEY DebitCreditCode P_PT_CADOCUMENTTAXBOXCONFIG2 DebitCreditCode Single-Character Flag
KEY AccountingDocumentType _tax_map AccountingDocumentType Journal Entry Type
KEY SupplierAccountGroup _tax_map SupplierAccountGroup Account group
KEY TaxBox _tax_map TaxBox Tax.Bs.Gp.No.
KEY TaxDeclnAmountType _tax_map TaxDeclnAmountType
KEY TaxBoxStrucValidityStartDate _tax_map TaxBoxStrucValidityStartDate
KEY UnifiedTaxBoxStructureType _tax_map UnifiedTaxBoxStructureType
KEY TaxGroup _tax_map TaxGroup Tax Group
KEY TaxItemGrpgDebitCreditCode P_PT_CADOCUMENTTAXBOXCONFIG2 DebitCreditCode Single-Character Flag
KEY TaxItemGrpgAcctgDocumentType _tax_map AccountingDocumentType Journal Entry Type
KEY TaxItemGrpgSupplierAcctGroup _tax_map SupplierAccountGroup Account group
KEY TaxItemGrpgSpecialGLCode _tax_map SpecialGLCode Special G/L Ind
KEY CADocumentNumber P_PT_CADOCUMENTTAXBOXCONFIG2 CADocumentNumber Document Number
KEY CAGLItemNumber P_PT_CADOCUMENTTAXBOXCONFIG2 CAGLItemNumber Item
Country P_PT_CADOCUMENTTAXBOXCONFIG2 Country Venue: Ctry/Reg
TaxCode _tax_map TaxCode Tax Code
TaxItemGroupingVersion _tax_map TaxItemGroupingVersion Tax Grping Ver.
TaxBoxStructureType _tax_map TaxBoxStructureType
ValidityEndDate _tax_map TaxBoxStrucValidityEndDate
TaxCalculationProcedure P_PT_CADOCUMENTTAXBOXCONFIG2 TaxCalculationProcedure Tax Procedure
TaxRate _tax_map TaxRate Tax Rate
TaxRateValidityStartDate _tax_map TaxRateValidityStartDate Tax Rate Validity Start Date
GLAccount P_PT_CADOCUMENTTAXBOXCONFIG2 GLAccount General Ledger
TaxItemGroup
ReferenceDocumentType
DocumentReferenceID P_PT_CADOCUMENTTAXBOXCONFIG2 CAReferenceDocument Reference
PostingDate P_PT_CADOCUMENTTAXBOXCONFIG2 CAPostingDate Posting Date
DocumentDate P_PT_CADOCUMENTTAXBOXCONFIG2 DocumentDate Journal Entry Date
TaxReportingDateendasTaxReportingDate
ReportingDate
FiscalPeriod FiscalYear FiscalPeriod Tax period
AccountingDocumentHeaderText
CompanyCodeCountry P_PT_CADOCUMENTTAXBOXCONFIG2 Country Venue: Ctry/Reg
ReportingCountry P_PT_CADOCUMENTTAXBOXCONFIG2 Country Venue: Ctry/Reg
CompanyCodeCurrency P_PT_CADOCUMENTTAXBOXCONFIG2 CompanyCodeCurrency Local Currency
DocumentCurrency P_PT_CADOCUMENTTAXBOXCONFIG2 TransactionCurrency Transaction Currency
ReportingCurrency P_PT_CADOCUMENTTAXBOXCONFIG2 CompanyCodeCurrency Local Currency
TaxBaseAmountInRptgCrcy P_PT_CADOCUMENTTAXBOXCONFIG2 CATaxBaseAmountInLocalCurrency Tax base in LC
TaxAmountInRptgCrcy P_PT_CADOCUMENTTAXBOXCONFIG2 CATaxAmountInLocalCurrency LC Tax
NonDeductibleInputTaxAmount 00
TaxBaseAmountInCoCodeCrcy P_PT_CADOCUMENTTAXBOXCONFIG2 CATaxBaseAmountInLocalCurrency Tax base in LC
TaxAmountInCoCodeCrcy P_PT_CADOCUMENTTAXBOXCONFIG2 CATaxAmountInLocalCurrency LC Tax
TaxBaseAmountInTransCrcy P_PT_CADOCUMENTTAXBOXCONFIG2 CATaxBaseAmount Tax Base Amount
TaxAmount P_PT_CADOCUMENTTAXBOXCONFIG2 CATaxAmount
InvoiceReference
InvoiceReferenceFiscalYear
CAInvoicingDocument P_PT_CADOCUMENTTAXBOXCONFIG2 CAInvoicingDocument Invoic. Doc.
Customer
Supplier
VATRegistration
CustomerSupplierVATRegn
CATransactionKeyAccountDetn P_PT_CADOCUMENTTAXBOXCONFIG2 CATransactionKeyAccountDetn Autom. Posting
TaxBoxStrucValidityEndDate _tax_map TaxBoxStrucValidityEndDate
TaxBoxStructure _tax_map TaxBoxStructure
TaxBoxName _tax_map TaxBoxName
TaxBoxCondition _tax_map TaxBoxCondition
TaxJurisdiction P_PT_CADOCUMENTTAXBOXCONFIG2 TaxJurisdiction Tax Jurisdiction
CATaxRate P_PT_CADOCUMENTTAXBOXCONFIG2 CATaxRate Tax rate
TaxCountry P_PT_CADOCUMENTTAXBOXCONFIG2 Country Venue: Ctry/Reg
CAPostingDate P_PT_CADOCUMENTTAXBOXCONFIG2 CAPostingDate Posting Date
CAReconciliationAccount P_PT_CADOCUMENTTAXBOXCONFIG2 CAReconciliationAccount G/L Account
BusinessPartner P_PT_CADOCUMENTTAXBOXCONFIG2 BusinessPartner Issuing Authority
BusinessPartnerCountry _BPAddress Country Venue: Ctry/Reg
TransactionCurrency P_PT_CADOCUMENTTAXBOXCONFIG2 TransactionCurrency Transaction Currency
BPTaxNumberendasBPTaxNumber
FiscalYearVariant P_PT_CADOCUMENTTAXBOXCONFIG2 FiscalYearVariant FY Variant
CAReconciliationKey P_PT_CADOCUMENTTAXBOXCONFIG2 CAReconciliationKey Reconcil. Key
TaxIsNotDeductible P_T007B_GLO stazf Not deductible
TaxType7B P_T007B_GLO stgrp Tax Type
TaxBoxStructureName _tax_map TaxBoxStructureName
TaxReturnCountry P_PT_CADOCUMENTTAXBOXCONFIG2 TaxReturnCountry Reporting C/R
TaxType P_PT_CADOCUMENTTAXBOXCONFIG2 TaxType Tax Type
TargetTaxCode P_PT_CADOCUMENTTAXBOXCONFIG2 TargetTaxCode
_TaxTypeText _Text

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_PT_CADocumentTaxBoxConfig.
-- 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_PT_CADocumentTaxBoxConfig AS
SELECT
  _tax_item.CompanyCode AS CompanyCode,
  '' AS AccountingDocument,
  FiscalYear.FiscalYear AS FiscalYear,
  '000' AS TaxItem,
  _tax_map.TransactionTypeDetermination AS TransactionTypeDetermination,
  _tax_item.DebitCreditCode AS DebitCreditCode,
  _tax_map.AccountingDocumentType AS AccountingDocumentType,
  _tax_map.SupplierAccountGroup AS SupplierAccountGroup,
  _tax_map.TaxBox AS TaxBox,
  _tax_map.TaxDeclnAmountType AS TaxDeclnAmountType,
  _tax_map.TaxBoxStrucValidityStartDate AS TaxBoxStrucValidityStartDate,
  _tax_map.UnifiedTaxBoxStructureType AS UnifiedTaxBoxStructureType,
  _tax_map.TaxGroup AS TaxGroup,
  _tax_item.DebitCreditCode AS TaxItemGrpgDebitCreditCode,
  _tax_map.AccountingDocumentType AS TaxItemGrpgAcctgDocumentType,
  _tax_map.SupplierAccountGroup AS TaxItemGrpgSupplierAcctGroup,
  _tax_map.SpecialGLCode AS TaxItemGrpgSpecialGLCode,
  _tax_item.CADocumentNumber AS CADocumentNumber,
  _tax_item.CAGLItemNumber AS CAGLItemNumber,
  _tax_item.Country AS Country,
  _tax_map.TaxCode AS TaxCode,
  _tax_map.TaxItemGroupingVersion AS TaxItemGroupingVersion,
  _tax_map.TaxBoxStructureType AS TaxBoxStructureType,
  _tax_map.TaxBoxStrucValidityEndDate AS ValidityEndDate,
  _tax_item.TaxCalculationProcedure AS TaxCalculationProcedure,
  _tax_map.TaxRate AS TaxRate,
  _tax_map.TaxRateValidityStartDate AS TaxRateValidityStartDate,
  _tax_item.GLAccount AS GLAccount,
  '' AS TaxItemGroup,
  cast( '' as blart ) AS ReferenceDocumentType,
  _tax_item.CAReferenceDocument AS DocumentReferenceID,
  _tax_item.CAPostingDate AS PostingDate,
  _tax_item.DocumentDate AS DocumentDate,
  case when _tax_item.TaxReportingDate is initial then cast(_tax_item.CAPostingDate as vatdate preserving type) else _tax_item.TaxReportingDate end as TaxReportingDate AS TaxReportingDateendasTaxReportingDate,
  TaxReportingDate AS ReportingDate,
  FiscalYear.FiscalPeriod AS FiscalPeriod,
  '' AS AccountingDocumentHeaderText,
  _tax_item.Country AS CompanyCodeCountry,
  _tax_item.Country AS ReportingCountry,
  _tax_item.CompanyCodeCurrency AS CompanyCodeCurrency,
  _tax_item.TransactionCurrency AS DocumentCurrency,
  _tax_item.CompanyCodeCurrency AS ReportingCurrency,
  _tax_item.CATaxBaseAmountInLocalCurrency AS TaxBaseAmountInRptgCrcy,
  _tax_item.CATaxAmountInLocalCurrency AS TaxAmountInRptgCrcy,
  0.00 AS NonDeductibleInputTaxAmount,
  _tax_item.CATaxBaseAmountInLocalCurrency AS TaxBaseAmountInCoCodeCrcy,
  _tax_item.CATaxAmountInLocalCurrency AS TaxAmountInCoCodeCrcy,
  _tax_item.CATaxBaseAmount AS TaxBaseAmountInTransCrcy,
  _tax_item.CATaxAmount AS TaxAmount,
  '' AS InvoiceReference,
  cast('' as fis_gjahr_no_conv) AS InvoiceReferenceFiscalYear,
  _tax_item.CAInvoicingDocument AS CAInvoicingDocument,
  '#' AS Customer,
  '#' AS Supplier,
  BPTaxNumber AS VATRegistration,
  BPTaxNumber AS CustomerSupplierVATRegn,
  _tax_item.CATransactionKeyAccountDetn AS CATransactionKeyAccountDetn,
  _tax_map.TaxBoxStrucValidityEndDate AS TaxBoxStrucValidityEndDate,
  _tax_map.TaxBoxStructure AS TaxBoxStructure,
  _tax_map.TaxBoxName AS TaxBoxName,
  _tax_map.TaxBoxCondition AS TaxBoxCondition,
  _tax_item.TaxJurisdiction AS TaxJurisdiction,
  _tax_item.CATaxRate AS CATaxRate,
  _tax_item.Country AS TaxCountry,
  _tax_item.CAPostingDate AS CAPostingDate,
  _tax_item.CAReconciliationAccount AS CAReconciliationAccount,
  _tax_item.BusinessPartner AS BusinessPartner,
  _BPAddress.Country AS BusinessPartnerCountry,
  _tax_item.TransactionCurrency AS TransactionCurrency,
  case when _bp_taxnum[1: BPTaxType = 'PT0' ].BPTaxNumber is not initial then _bp_taxnum[1: BPTaxType = 'PT0'].BPTaxNumber when _bp_taxnum[1: BPTaxType = 'PT1' ].BPTaxNumber is not initial then _bp_taxnum[1: BPTaxType = 'PT1'].BPTaxNumber end as BPTaxNumber AS BPTaxNumberendasBPTaxNumber,
  _tax_item.FiscalYearVariant AS FiscalYearVariant,
  _tax_item.CAReconciliationKey AS CAReconciliationKey,
  P_T007B_GLO.stazf AS TaxIsNotDeductible,
  P_T007B_GLO.stgrp AS TaxType7B,
  _tax_map.TaxBoxStructureName AS TaxBoxStructureName,
  _tax_item.TaxReturnCountry AS TaxReturnCountry,
  _tax_item.TaxType AS TaxType,
  _tax_item.TargetTaxCode AS TargetTaxCode
FROM P_PT_CADOCUMENTTAXBOXCONFIG2 AS _tax_item
INNER JOIN I_StRpTaxItemBoxConfiguration ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN P_T007B_GLO ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_BusinessPartnerAddress AS _BPAddress ON BusinessPartner = _BPAddress.BusinessPartner  -- association [0..1]
LEFT OUTER JOIN I_Businesspartnertaxnumber AS _bp_taxnum ON _bp_taxnum.BusinessPartner = _tax_item.BusinessPartner  -- association [1..*]
LEFT OUTER JOIN I_TaxType AS _TaxType ON TaxType = _TaxType.TaxType  -- association [0..1]
LEFT OUTER JOIN I_TaxTypeText AS _Text ON TaxType = _Text.TaxType  -- association [0..*]
LEFT OUTER JOIN I_FiscalCalendarDate AS FiscalYear ON FiscalYear.CalendarDate = _tax_item.CAPostingDate AND FiscalYear.FiscalYearVariant = _tax_item.FiscalYearVariant  -- association [1..1]
;