I_WithholdingTaxTrace

DDL: I_WITHHOLDINGTAXTRACE SQL: IEWHTTRACE Type: view_entity BASIC Package: ODATA_EWHT_TRACE

EWNT Trace Withholding Item

I_WithholdingTaxTrace is a Basic CDS View that provides data about "EWNT Trace Withholding Item" in SAP S/4HANA. It reads from 2 data sources (t001, I_Withholdingtaxitem) and exposes 77 fields with key fields CompanyCode, AccountingDocument, FiscalYear, AccountingDocumentItem, WithholdingTaxType. It has 11 associations to related views. Part of development package ODATA_EWHT_TRACE.

Data Sources (2)

SourceAliasJoin Type
t001 t001 inner
I_Withholdingtaxitem wt from

Associations (11)

CardinalityTargetAliasCondition
[0..1] I_CompanyCode _CompanyCode $projection.CompanyCode = _CompanyCode.CompanyCode
[0..1] I_CompanyCodeStdVH _CompanyCodeVH $projection.CompanyCode = _CompanyCodeVH.CompanyCode
[0..1] I_AccountingDocument _AccountingDocument $projection.CompanyCode = _AccountingDocument.CompanyCode and $projection.AccountingDocument = _AccountingDocument.AccountingDocument and $projection.FiscalYear = _AccountingDocument.FiscalYear
[0..1] I_GLAccount _GLAccount $projection.GLAccount = _GLAccount.GLAccount and $projection.CompanyCode = _GLAccount.CompanyCode
[0..1] I_CoCodeWithholdingTaxType _CompanyCodeWithholdingTaxType $projection.CompanyCode = _CompanyCodeWithholdingTaxType.CompanyCode and $projection.WithholdingTaxType = _CompanyCodeWithholdingTaxType.WithholdingTaxType
[0..1] I_Extendedwhldgtaxcode _WithholdingTaxCode $projection.Country = _WithholdingTaxCode.Country and $projection.WithholdingTaxType = _WithholdingTaxCode.WithholdingTaxType and $projection.WithholdingTaxCode = _WithholdingTaxCode.WithholdingTaxCode
[0..1] I_Currency _CompanyCodeCurrency $projection.CompanyCodeCurrency = _CompanyCodeCurrency.Currency
[0..1] I_Currency _DocumentCurrency $projection.DocumentCurrency = _DocumentCurrency.Currency
[0..1] I_Currency _AdditionalCurrency1 $projection.AdditionalCurrency1 = _AdditionalCurrency1.Currency
[0..1] I_Currency _AdditionalCurrency2 $projection.AdditionalCurrency2 = _AdditionalCurrency2.Currency
[0..1] I_Country _Country $projection.Country = _Country.Country

Annotations (8)

NameValueLevelField
VDM.viewType #BASIC view
AccessControl.authorizationCheck #MANDATORY view
AccessControl.personalData.blocking #NOT_REQUIRED view
EndUserText.label EWNT Trace Withholding Item view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #TRANSACTIONAL view

Fields (77)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode I_Withholdingtaxitem CompanyCode Receiver Company Code
KEY AccountingDocument I_Withholdingtaxitem AccountingDocument Journal Entry
KEY FiscalYear I_Withholdingtaxitem FiscalYear G/L Fiscal Year
KEY AccountingDocumentItem I_Withholdingtaxitem AccountingDocumentItem Posting View Item
KEY WithholdingTaxType I_Withholdingtaxitem WithholdingTaxType WTax Type
WithholdingTaxCode I_Withholdingtaxitem WithholdingTaxCode WTax Code
WhldgTaxBaseAmtInCoCodeCrcy
WhldgTaxBaseAmtInTransacCrcy
WhldgTaxBaseAmtInAddlCrcy2
WhldgTaxBaseAmtInAddlCrcy3
WhldgTaxBaseIsEnteredManually I_Withholdingtaxitem WhldgTaxBaseIsEnteredManually W/Tax Base Man.
WhldgTaxAmtInCoCodeCrcy
WhldgTaxAmtInTransacCrcy
WhldgTaxAmtInAddlCrcy2
WhldgTaxAmtInAddlCrcy3
WhldgTaxIsEnteredManually I_Withholdingtaxitem WhldgTaxIsEnteredManually WTax Amt Ent. Man.
WhldgTaxItemStatus I_Withholdingtaxitem WhldgTaxItemStatus Line Item Status
WhldgTaxExmptAmtInCoCodeCrcy
WhldgTaxExmptAmtInTransacCrcy
WhldgTaxExmptAmtInAddlCrcy2
WhldgTaxExmptAmtInAddlCrcy3
WhldgTaxExmptCertificate I_Withholdingtaxitem WhldgTaxExmptCertificate Exemption Number
FinancialAccountType I_Withholdingtaxitem FinancialAccountType Fin. Account Type
CustomerSupplierAccount I_Withholdingtaxitem CustomerSupplierAccount Cust./Vend. Acct
GLAccount I_Withholdingtaxitem GLAccount General Ledger
SupplierRecipientType I_Withholdingtaxitem SupplierRecipientType Recipient Type
ClearingAccountingDocument I_Withholdingtaxitem ClearingAccountingDocument Clearing Journal Entry
ClearingDate I_Withholdingtaxitem ClearingDate Clearing Date
WithholdingTaxExmptPercent I_Withholdingtaxitem WithholdingTaxExmptPercent Exemption Rate
WithholdingTaxPercent I_Withholdingtaxitem WithholdingTaxPercent WTax Rate
IsSelfWhldgTax I_Withholdingtaxitem IsSelfWhldgTax Posted Self-W/Tax
IsGrossingUp I_Withholdingtaxitem IsGrossingUp "Grossing Up" Pt
WithholdingTaxCertificate I_Withholdingtaxitem WithholdingTaxCertificate WHT Certificate
WhldgTaxCertDate I_Withholdingtaxitem WhldgTaxCertDate WTax Certicate Date
IN_ClrgWithholdingTaxDocument I_Withholdingtaxitem IN_ClrgWithholdingTaxDocument Challan Number
IN_ClrgWithholdingTaxDate I_Withholdingtaxitem IN_ClrgWithholdingTaxDate Challan Date
IN_ReferenceDocumentNumber I_Withholdingtaxitem IN_ReferenceDocumentNumber Invoice Ref.
DownPaymentIsCleared I_Withholdingtaxitem DownPaymentIsCleared Down Payt Clearing
DocumentIsPartialExempted I_Withholdingtaxitem DocumentIsPartialExempted Partial Exemption
IN_WhldgTaxRecordTypeTrans I_Withholdingtaxitem IN_WhldgTaxRecordTypeTrans Record type for EWT
PostingDate bkpf PostingDate Posting Date for GR
IsReversed bkpf IsReversed Reversed?
DiscountAmtInCoCodeCrcy
WhldgTaxPostingTimePoint
Country t001 land1 Trip Ctry/Reg
CompanyCodeCurrency _CompanyCode Currency Valuation Crcy
DocumentCurrency _AccountingDocument Currency Valuation Crcy
AdditionalCurrency1 _AccountingDocument AdditionalCurrency1 Local curr. 2
AdditionalCurrency2 _AccountingDocument AdditionalCurrency2 Local curr. 3
RptgWhldgTxBaseAmtInCoCodeCrcy
WhgdTaxPostingIsRequired trace wt_dopost Post WTax Amount
IsUsedInPaymentTransaction trace xzahl Payt Tran.
RequiredStartDate trace wt_agtdf W/Tax Obligated Frm
RequiredEndDate trace wt_agtdt Oblig.to W/Tax Until
WithholdingTaxValidFromDate trace wt_valid Valid From
ValidityEndDate trace validityenddate ValidTo
ExemptionDateBegin trace wt_exdf Exempt From
ExemptionDateEnd trace wt_exdt Exempt To
WhldgTaxRelevantPercent trace qproz Percentage Subject to Tax
NoWhldgTaxReasonCode trace nowhtreason
WhgdTxBaseAmtIsReduced trace wt_redbas Base amnt reductn
ReferentialWhldgTaxType trace ih_witht
ReversalJournalEntryFiscalYear trace stjah Year
WithholdingTaxTypeName
WhldgTaxCodeName
CountryName
CompanyCodeName _CompanyCode CompanyCodeName Company Name
_CompanyCode _CompanyCode
_AccountingDocument _AccountingDocument
_GLAccount _GLAccount
_CompanyCodeWithholdingTaxType _CompanyCodeWithholdingTaxType
_WithholdingTaxCode _WithholdingTaxCode
_CompanyCodeCurrency _CompanyCodeCurrency
_DocumentCurrency _DocumentCurrency
_AdditionalCurrency1 _AdditionalCurrency1
_AdditionalCurrency2 _AdditionalCurrency2
_Country _Country

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 I_WithholdingTaxTrace.
-- 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: IEWHTTRACE

CREATE VIEW I_WithholdingTaxTrace AS
SELECT
  wt.CompanyCode AS CompanyCode,
  wt.AccountingDocument AS AccountingDocument,
  wt.FiscalYear AS FiscalYear,
  wt.AccountingDocumentItem AS AccountingDocumentItem,
  wt.WithholdingTaxType AS WithholdingTaxType,
  wt.WithholdingTaxCode AS WithholdingTaxCode,
  abs(wt.WhldgTaxBaseAmtInCoCodeCrcy) AS WhldgTaxBaseAmtInCoCodeCrcy,
  abs(wt.WhldgTaxBaseAmtInTransacCrcy) AS WhldgTaxBaseAmtInTransacCrcy,
  abs(wt.WhldgTaxBaseAmtInAddlCrcy2) AS WhldgTaxBaseAmtInAddlCrcy2,
  abs(wt.WhldgTaxBaseAmtInAddlCrcy3) AS WhldgTaxBaseAmtInAddlCrcy3,
  wt.WhldgTaxBaseIsEnteredManually AS WhldgTaxBaseIsEnteredManually,
  abs(wt.WhldgTaxAmtInCoCodeCrcy) AS WhldgTaxAmtInCoCodeCrcy,
  abs(wt.WhldgTaxAmtInTransacCrcy) AS WhldgTaxAmtInTransacCrcy,
  abs(wt.WhldgTaxAmtInAddlCrcy2) AS WhldgTaxAmtInAddlCrcy2,
  abs(wt.WhldgTaxAmtInAddlCrcy3) AS WhldgTaxAmtInAddlCrcy3,
  wt.WhldgTaxIsEnteredManually AS WhldgTaxIsEnteredManually,
  wt.WhldgTaxItemStatus AS WhldgTaxItemStatus,
  abs(wt.WhldgTaxExmptAmtInCoCodeCrcy) AS WhldgTaxExmptAmtInCoCodeCrcy,
  abs(wt.WhldgTaxExmptAmtInTransacCrcy) AS WhldgTaxExmptAmtInTransacCrcy,
  abs(wt.WhldgTaxExmptAmtInAddlCrcy2) AS WhldgTaxExmptAmtInAddlCrcy2,
  abs(wt.WhldgTaxExmptAmtInAddlCrcy3) AS WhldgTaxExmptAmtInAddlCrcy3,
  wt.WhldgTaxExmptCertificate AS WhldgTaxExmptCertificate,
  wt.FinancialAccountType AS FinancialAccountType,
  wt.CustomerSupplierAccount AS CustomerSupplierAccount,
  wt.GLAccount AS GLAccount,
  wt.SupplierRecipientType AS SupplierRecipientType,
  wt.ClearingAccountingDocument AS ClearingAccountingDocument,
  wt.ClearingDate AS ClearingDate,
  wt.WithholdingTaxExmptPercent AS WithholdingTaxExmptPercent,
  wt.WithholdingTaxPercent AS WithholdingTaxPercent,
  wt.IsSelfWhldgTax AS IsSelfWhldgTax,
  wt.IsGrossingUp AS IsGrossingUp,
  wt.WithholdingTaxCertificate AS WithholdingTaxCertificate,
  wt.WhldgTaxCertDate AS WhldgTaxCertDate,
  wt.IN_ClrgWithholdingTaxDocument AS IN_ClrgWithholdingTaxDocument,
  wt.IN_ClrgWithholdingTaxDate AS IN_ClrgWithholdingTaxDate,
  wt.IN_ReferenceDocumentNumber AS IN_ReferenceDocumentNumber,
  wt.DownPaymentIsCleared AS DownPaymentIsCleared,
  wt.DocumentIsPartialExempted AS DocumentIsPartialExempted,
  wt.IN_WhldgTaxRecordTypeTrans AS IN_WhldgTaxRecordTypeTrans,
  bkpf.PostingDate AS PostingDate,
  bkpf.IsReversed AS IsReversed,
  abs(trace.sknto) AS DiscountAmtInCoCodeCrcy,
  cast(trace.wt_postm as fis_wtpostm) AS WhldgTaxPostingTimePoint,
  t001.land1 AS Country,
  _CompanyCode.Currency AS CompanyCodeCurrency,
  _AccountingDocument.Currency AS DocumentCurrency,
  _AccountingDocument.AdditionalCurrency1 AS AdditionalCurrency1,
  _AccountingDocument.AdditionalCurrency2 AS AdditionalCurrency2,
  abs(wt.RptgWhldgTxBaseAmtInCoCodeCrcy) AS RptgWhldgTxBaseAmtInCoCodeCrcy,
  trace.wt_dopost AS WhgdTaxPostingIsRequired,
  trace.xzahl AS IsUsedInPaymentTransaction,
  trace.wt_agtdf AS RequiredStartDate,
  trace.wt_agtdt AS RequiredEndDate,
  trace.wt_valid AS WithholdingTaxValidFromDate,
  trace.validityenddate AS ValidityEndDate,
  trace.wt_exdf AS ExemptionDateBegin,
  trace.wt_exdt AS ExemptionDateEnd,
  trace.qproz AS WhldgTaxRelevantPercent,
  trace.nowhtreason AS NoWhldgTaxReasonCode,
  trace.wt_redbas AS WhgdTxBaseAmtIsReduced,
  trace.ih_witht AS ReferentialWhldgTaxType,
  trace.stjah AS ReversalJournalEntryFiscalYear,
  _CompanyCodeWithholdingTaxType._Text[1:Language = $session.system_language].WithholdingTaxTypeName AS WithholdingTaxTypeName,
  _WithholdingTaxCode._CodeText[1:Language = $session.system_language].WhldgTaxCodeName AS WhldgTaxCodeName,
  _Country._Text[1:Language = $session.system_language].CountryName AS CountryName,
  _CompanyCode.CompanyCodeName AS CompanyCodeName
FROM I_Withholdingtaxitem AS wt
INNER JOIN t001 ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_CompanyCode AS _CompanyCode ON CompanyCode = _CompanyCode.CompanyCode  -- association [0..1]
LEFT OUTER JOIN I_CompanyCodeStdVH AS _CompanyCodeVH ON CompanyCode = _CompanyCodeVH.CompanyCode  -- association [0..1]
LEFT OUTER JOIN I_AccountingDocument AS _AccountingDocument ON CompanyCode = _AccountingDocument.CompanyCode AND AccountingDocument = _AccountingDocument.AccountingDocument AND FiscalYear = _AccountingDocument.FiscalYear  -- association [0..1]
LEFT OUTER JOIN I_GLAccount AS _GLAccount ON GLAccount = _GLAccount.GLAccount AND CompanyCode = _GLAccount.CompanyCode  -- association [0..1]
LEFT OUTER JOIN I_CoCodeWithholdingTaxType AS _CompanyCodeWithholdingTaxType ON CompanyCode = _CompanyCodeWithholdingTaxType.CompanyCode AND WithholdingTaxType = _CompanyCodeWithholdingTaxType.WithholdingTaxType  -- association [0..1]
LEFT OUTER JOIN I_Extendedwhldgtaxcode AS _WithholdingTaxCode ON Country = _WithholdingTaxCode.Country AND WithholdingTaxType = _WithholdingTaxCode.WithholdingTaxType AND WithholdingTaxCode = _WithholdingTaxCode.WithholdingTaxCode  -- association [0..1]
LEFT OUTER JOIN I_Currency AS _CompanyCodeCurrency ON CompanyCodeCurrency = _CompanyCodeCurrency.Currency  -- association [0..1]
LEFT OUTER JOIN I_Currency AS _DocumentCurrency ON DocumentCurrency = _DocumentCurrency.Currency  -- association [0..1]
LEFT OUTER JOIN I_Currency AS _AdditionalCurrency1 ON AdditionalCurrency1 = _AdditionalCurrency1.Currency  -- association [0..1]
LEFT OUTER JOIN I_Currency AS _AdditionalCurrency2 ON AdditionalCurrency2 = _AdditionalCurrency2.Currency  -- association [0..1]
LEFT OUTER JOIN I_Country AS _Country ON Country = _Country.Country  -- association [0..1]
;