P_StRpWhldgTaxItemLog

DDL: P_STRPWHLDGTAXITEMLOG Type: view_entity COMPOSITE

WHT Reporting View for DRC Log Item

P_StRpWhldgTaxItemLog is a Composite CDS View that provides data about "WHT Reporting View for DRC Log Item" in SAP S/4HANA. It reads from 1 data source (P_StRpWhldgTaxItem) and exposes 69 fields with key fields CompanyCode, AccountingDocument, FiscalYear, AccountingDocumentItem, WithholdingTaxType. It has 1 association to related views.

Data Sources (1)

SourceAliasJoin Type
P_StRpWhldgTaxItem wht from

Associations (1)

CardinalityTargetAliasCondition
[0..1] I_WithholdingTaxReportingDate _WHTRptDateActive _WHTRptDateActive.CompanyCode = wht.CompanyCode

Annotations (8)

NameValueLevelField
VDM.viewType #COMPOSITE view
VDM.private true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ObjectModel.usageType.serviceQuality #P view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view
AccessControl.personalData.blocking #BLOCKED_DATA_INCLUDED view
EndUserText.label WHT Reporting View for DRC Log Item view

Fields (69)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode P_StRpWhldgTaxItem CompanyCode Receiver Company Code
KEY AccountingDocument P_StRpWhldgTaxItem AccountingDocument Journal Entry
KEY FiscalYear P_StRpWhldgTaxItem FiscalYear G/L Fiscal Year
KEY AccountingDocumentItem P_StRpWhldgTaxItem AccountingDocumentItem Posting View Item
KEY WithholdingTaxType P_StRpWhldgTaxItem WithholdingTaxType WTax Type
WithholdingTaxCode P_StRpWhldgTaxItem WithholdingTaxCode WTax Code
OfficialWhldgTaxCode
WhldgTaxReferenceText
WithholdingTaxIncomeType
SupplierRecipientType P_StRpWhldgTaxItem SupplierRecipientType
Country P_StRpWhldgTaxItem Country Venue: Ctry/Reg
TaxSection P_StRpWhldgTaxItem TaxSection Tax Section
BusinessPlace P_StRpWhldgTaxItem BusinessPlace Business place
FinancialAccountType P_StRpWhldgTaxItem FinancialAccountType Fin. Account Type
Debtor P_StRpWhldgTaxItem Debtor Debtor
Creditor P_StRpWhldgTaxItem Creditor Supplier
BusinessPartner P_StRpWhldgTaxItem BusinessPartner Issuing Authority
BusinessPartnerNumber P_StRpWhldgTaxItem BusinessPartnerNumber
WhldgTaxRptgDateIsActive _WHTRptDateActive WhldgTaxRptgDateIsActive
DefaultWhldgTxRptgDateIsActive _WHTRptDateActive DefaultWhldgTxRptgDateIsActive
WithholdingTaxReportingDate P_StRpWhldgTaxItem WithholdingTaxReportingDate Withholding Tax Reporting Date
PostingDateendasPostingDate
DocumentDateendasDocumentDate
ClearingDate P_StRpWhldgTaxItem ClearingDate Clearing Date
ClearingJournalEntry P_StRpWhldgTaxItem ClearingJournalEntry Clrng doc.
ClearingJournalEntryFiscalYear P_StRpWhldgTaxItem ClearingJournalEntryFiscalYear Fiscal Year of Clearing Journal Entry
InvoiceReference P_StRpWhldgTaxItem InvoiceReference Invoice Reference
InvoiceReferenceFiscalYear P_StRpWhldgTaxItem InvoiceReferenceFiscalYear Invoice Reference Fiscal Year
IsReversed P_StRpWhldgTaxItem IsReversed Reversed?
IsReversal P_StRpWhldgTaxItem IsReversal Reversal doc.
ReportingCurrency P_StRpWhldgTaxItem ReportingCurrency Currency
AmountInCompanyCodeCurrency P_StRpWhldgTaxItem AmountInCompanyCodeCurrency Local Crcy Amt
AmountInLocalCurrency P_StRpWhldgTaxItem AmountInLocalCurrency Local Crcy Amt
TaxAmountInCoCodeCrcy P_StRpWhldgTaxItem TaxAmountInCoCodeCrcy Tax Amount in Company Code Currency
WhldgTaxBaseAmtInCoCodeCrcy P_StRpWhldgTaxItem WhldgTaxBaseAmtInCoCodeCrcy
WhldgTaxAmtInCoCodeCrcy P_StRpWhldgTaxItem WhldgTaxAmtInCoCodeCrcy
IsSelfWhldgTax P_StRpWhldgTaxItem IsSelfWhldgTax
IsGrossingUp P_StRpWhldgTaxItem IsGrossingUp
WithholdingTaxCertificate P_StRpWhldgTaxItem WithholdingTaxCertificate WHT Certificate
WhldgTaxCertDate P_StRpWhldgTaxItem WhldgTaxCertDate
IN_ClrgWithholdingTaxDocument P_StRpWhldgTaxItem IN_ClrgWithholdingTaxDocument
IN_ClrgWithholdingTaxDate P_StRpWhldgTaxItem IN_ClrgWithholdingTaxDate
IN_WhldgTaxRecordTypeTrans P_StRpWhldgTaxItem IN_WhldgTaxRecordTypeTrans
WhldgTaxDocumentType P_StRpWhldgTaxItem WhldgTaxDocumentType 3-Byte field
ItemIsReportingRelevant P_StRpWhldgTaxItem ItemIsReportingRelevant Item Reporting Relv
Name P_StRpWhldgTaxItem Name Zone name
BusinessPartnerName P_StRpWhldgTaxItem BusinessPartnerName Extracted Customer Name
Region P_StRpWhldgTaxItem Region Venue Region
BusinessPartnerCountry P_StRpWhldgTaxItem BusinessPartnerCountry BP Ctry/Reg.
TaxNumber1 P_StRpWhldgTaxItem TaxNumber1 VAT Reg. No.
TaxNumber2 P_StRpWhldgTaxItem TaxNumber2 Tax Number 2
TaxNumber3 P_StRpWhldgTaxItem TaxNumber3
TaxNumber4 P_StRpWhldgTaxItem TaxNumber4
TaxNumber5 P_StRpWhldgTaxItem TaxNumber5
VATRegistration P_StRpWhldgTaxItem VATRegistration VAT Registration No.
TaxItemIsZeroRated P_StRpWhldgTaxItem TaxItemIsZeroRated
DocumentReferenceID P_StRpWhldgTaxItem DocumentReferenceID Reference
IsNaturalPerson P_StRpWhldgTaxItem IsNaturalPerson Natural person
SpecialGLCode P_StRpWhldgTaxItem SpecialGLCode Special G/L Ind
SpecialGLTransactionType P_StRpWhldgTaxItem SpecialGLTransactionType Transact.Type
_WithholdingTaxCode P_StRpWhldgTaxItem _WithholdingTaxCode
_CompanyCode P_StRpWhldgTaxItem _CompanyCode
_Supplier P_StRpWhldgTaxItem _Supplier
_Customer P_StRpWhldgTaxItem _Customer
_ReportingCurrency P_StRpWhldgTaxItem _ReportingCurrency
_Onetime P_StRpWhldgTaxItem _Onetime
_Branch P_StRpWhldgTaxItem _Branch
_JournalEntry P_StRpWhldgTaxItem _JournalEntry
_OperationalAcctgDocItem P_StRpWhldgTaxItem _OperationalAcctgDocItem

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_StRpWhldgTaxItemLog.
-- 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_StRpWhldgTaxItemLog AS
SELECT
  wht.CompanyCode AS CompanyCode,
  wht.AccountingDocument AS AccountingDocument,
  wht.FiscalYear AS FiscalYear,
  wht.AccountingDocumentItem AS AccountingDocumentItem,
  wht.WithholdingTaxType AS WithholdingTaxType,
  wht.WithholdingTaxCode AS WithholdingTaxCode,
  wht._WithholdingTaxCode.OfficialWhldgTaxCode AS OfficialWhldgTaxCode,
  wht._WithholdingTaxCode.WhldgTaxReferenceText AS WhldgTaxReferenceText,
  wht._WithholdingTaxCode.WithholdingTaxIncomeType AS WithholdingTaxIncomeType,
  wht.SupplierRecipientType AS SupplierRecipientType,
  wht.Country AS Country,
  wht.TaxSection AS TaxSection,
  wht.BusinessPlace AS BusinessPlace,
  wht.FinancialAccountType AS FinancialAccountType,
  wht.Debtor AS Debtor,
  wht.Creditor AS Creditor,
  wht.BusinessPartner AS BusinessPartner,
  wht.BusinessPartnerNumber AS BusinessPartnerNumber,
  _WHTRptDateActive.WhldgTaxRptgDateIsActive AS WhldgTaxRptgDateIsActive,
  _WHTRptDateActive.DefaultWhldgTxRptgDateIsActive AS DefaultWhldgTxRptgDateIsActive,
  wht.WithholdingTaxReportingDate AS WithholdingTaxReportingDate,
  case when _WHTRptDateActive.WhldgTaxRptgDateIsActive = 'X' and _WHTRptDateActive.DefaultWhldgTxRptgDateIsActive = '1' then wht.WithholdingTaxReportingDate else wht.PostingDate end as PostingDate AS PostingDateendasPostingDate,
  case when _WHTRptDateActive.WhldgTaxRptgDateIsActive = 'X' and _WHTRptDateActive.DefaultWhldgTxRptgDateIsActive = '2' then wht.WithholdingTaxReportingDate else wht.DocumentDate end as DocumentDate AS DocumentDateendasDocumentDate,
  wht.ClearingDate AS ClearingDate,
  wht.ClearingJournalEntry AS ClearingJournalEntry,
  wht.ClearingJournalEntryFiscalYear AS ClearingJournalEntryFiscalYear,
  wht.InvoiceReference AS InvoiceReference,
  wht.InvoiceReferenceFiscalYear AS InvoiceReferenceFiscalYear,
  wht.IsReversed AS IsReversed,
  wht.IsReversal AS IsReversal,
  wht.ReportingCurrency AS ReportingCurrency,
  wht.AmountInCompanyCodeCurrency AS AmountInCompanyCodeCurrency,
  wht.AmountInLocalCurrency AS AmountInLocalCurrency,
  wht.TaxAmountInCoCodeCrcy AS TaxAmountInCoCodeCrcy,
  wht.WhldgTaxBaseAmtInCoCodeCrcy AS WhldgTaxBaseAmtInCoCodeCrcy,
  wht.WhldgTaxAmtInCoCodeCrcy AS WhldgTaxAmtInCoCodeCrcy,
  wht.IsSelfWhldgTax AS IsSelfWhldgTax,
  wht.IsGrossingUp AS IsGrossingUp,
  wht.WithholdingTaxCertificate AS WithholdingTaxCertificate,
  wht.WhldgTaxCertDate AS WhldgTaxCertDate,
  wht.IN_ClrgWithholdingTaxDocument AS IN_ClrgWithholdingTaxDocument,
  wht.IN_ClrgWithholdingTaxDate AS IN_ClrgWithholdingTaxDate,
  wht.IN_WhldgTaxRecordTypeTrans AS IN_WhldgTaxRecordTypeTrans,
  wht.WhldgTaxDocumentType AS WhldgTaxDocumentType,
  wht.ItemIsReportingRelevant AS ItemIsReportingRelevant,
  wht.Name AS Name,
  wht.BusinessPartnerName AS BusinessPartnerName,
  wht.Region AS Region,
  wht.BusinessPartnerCountry AS BusinessPartnerCountry,
  wht.TaxNumber1 AS TaxNumber1,
  wht.TaxNumber2 AS TaxNumber2,
  wht.TaxNumber3 AS TaxNumber3,
  wht.TaxNumber4 AS TaxNumber4,
  wht.TaxNumber5 AS TaxNumber5,
  wht.VATRegistration AS VATRegistration,
  wht.TaxItemIsZeroRated AS TaxItemIsZeroRated,
  wht.DocumentReferenceID AS DocumentReferenceID,
  wht.IsNaturalPerson AS IsNaturalPerson,
  wht.SpecialGLCode AS SpecialGLCode,
  wht.SpecialGLTransactionType AS SpecialGLTransactionType,
  wht._WithholdingTaxCode AS _WithholdingTaxCode,
  wht._CompanyCode AS _CompanyCode,
  wht._Supplier AS _Supplier,
  wht._Customer AS _Customer,
  wht._ReportingCurrency AS _ReportingCurrency,
  wht._Onetime AS _Onetime,
  wht._Branch AS _Branch,
  wht._JournalEntry AS _JournalEntry,
  wht._OperationalAcctgDocItem AS _OperationalAcctgDocItem
FROM P_StRpWhldgTaxItem AS wht
LEFT OUTER JOIN I_WithholdingTaxReportingDate AS _WHTRptDateActive ON _WHTRptDateActive.CompanyCode = wht.CompanyCode  -- association [0..1]
;