P_TH_StRpWhldgTaxItem

DDL: P_TH_STRPWHLDGTAXITEM SQL: PSRTHWHLDGTXITM Type: view_entity COMPOSITE

Withholding Tax Item View for Thailand

P_TH_StRpWhldgTaxItem is a Composite CDS View that provides data about "Withholding Tax Item View for Thailand" in SAP S/4HANA. It reads from 1 data source (P_TH_StRpWhldgTaxItemOneCycle) and exposes 42 fields with key fields CompanyCode, AccountingDocument, FiscalYear, AccountingDocumentItem, WithholdingTaxType. It has 1 association to related views.

Data Sources (1)

SourceAliasJoin Type
P_TH_StRpWhldgTaxItemOneCycle wht from

Associations (1)

CardinalityTargetAliasCondition
[0..1] P_TH_StRpWhldgTaxItemOneCycle wht_dependent wht.CompanyCode = wht_dependent.CompanyCode and wht.AccountingDocument = wht_dependent.AccountingDocument and wht.FiscalYear = wht_dependent.FiscalYear and wht.AccountingDocumentItem = wht_dependent.AccountingDocumentItem and wht.WithholdingTaxType <> wht_dependent.WithholdingTaxType and ( wht.StatryRptgEntity is null and wht_dependent.StatryRptgEntity is null or wht.StatryRptgEntity = wht_dependent.StatryRptgEntity ) and ( wht.StatryRptCategory is null and wht_dependent.StatryRptCategory is null or wht.StatryRptCategory = wht_dependent.StatryRptCategory ) and ( wht.StatryRptRunID is null and wht_dependent.StatryRptRunID is null or wht.StatryRptRunID = wht_dependent.StatryRptRunID ) and wht.Withholdingtaxpostingrule = '3' and wht_dependent.Withholdingtaxpostingrule = '1' and wht.WithholdingTaxIncomeType = wht_dependent.WithholdingTaxIncomeType and wht.SqntlNmbrOfWhldgTaxType = wht_dependent.DependencyNmbrOfWhldgTaxType

Annotations (8)

NameValueLevelField
VDM.viewType #COMPOSITE view
AccessControl.authorizationCheck #NOT_ALLOWED view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view
AccessControl.personalData.blocking #BLOCKED_DATA_INCLUDED view
VDM.private true view
EndUserText.label Withholding Tax Item View for Thailand view

Fields (42)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode P_TH_StRpWhldgTaxItemOneCycle CompanyCode Receiver Company Code
KEY AccountingDocument P_TH_StRpWhldgTaxItemOneCycle AccountingDocument Journal Entry
KEY FiscalYear P_TH_StRpWhldgTaxItemOneCycle FiscalYear G/L Fiscal Year
KEY AccountingDocumentItem P_TH_StRpWhldgTaxItemOneCycle AccountingDocumentItem Posting View Item
KEY WithholdingTaxType P_TH_StRpWhldgTaxItemOneCycle WithholdingTaxType WTax Type
KEY StatryRptgEntity P_TH_StRpWhldgTaxItemOneCycle StatryRptgEntity Reporting Entity
KEY StatryRptCategory P_TH_StRpWhldgTaxItemOneCycle StatryRptCategory Report ID
KEY StatryRptRunID P_TH_StRpWhldgTaxItemOneCycle StatryRptRunID Report Run ID
WithholdingTaxCode P_TH_StRpWhldgTaxItemOneCycle WithholdingTaxCode WTax Code
Country P_TH_StRpWhldgTaxItemOneCycle Country Venue: Ctry/Reg
BusinessPlace P_TH_StRpWhldgTaxItemOneCycle BusinessPlace Business place
BranchCode P_TH_StRpWhldgTaxItemOneCycle BranchCode Branch Code
FinancialAccountType P_TH_StRpWhldgTaxItemOneCycle FinancialAccountType Fin. Account Type
Debtor P_TH_StRpWhldgTaxItemOneCycle Debtor Debtor
Creditor P_TH_StRpWhldgTaxItemOneCycle Creditor Supplier
BusinessPartner P_TH_StRpWhldgTaxItemOneCycle BusinessPartner Issuing Authority
AddressID P_TH_StRpWhldgTaxItemOneCycle AddressID Ship-to address
SupplierCountry P_TH_StRpWhldgTaxItemOneCycle SupplierCountry
SupplierRegion P_TH_StRpWhldgTaxItemOneCycle SupplierRegion
PostingDate P_TH_StRpWhldgTaxItemOneCycle PostingDate Posting Date for GR
DocumentDate P_TH_StRpWhldgTaxItemOneCycle DocumentDate Journal Entry Date
InvoiceReference P_TH_StRpWhldgTaxItemOneCycle InvoiceReference Invoice Reference
IsReversed P_TH_StRpWhldgTaxItemOneCycle IsReversed Reversed?
IsReversal P_TH_StRpWhldgTaxItemOneCycle IsReversal Reversal doc.
ReportingCurrency P_TH_StRpWhldgTaxItemOneCycle ReportingCurrency Currency
TransactionCurrency P_TH_StRpWhldgTaxItemOneCycle TransactionCurrency Transaction Currency
BusinessPartnerAddressID P_TH_StRpWhldgTaxItemOneCycle BusinessPartnerAddressID
PersonNumber P_TH_StRpWhldgTaxItemOneCycle PersonNumber Person Number
WhldgTaxDocumentType P_TH_StRpWhldgTaxItemOneCycle WhldgTaxDocumentType 3-Byte field
ItemIsReportingRelevant P_TH_StRpWhldgTaxItemOneCycle ItemIsReportingRelevant Item Reporting Relv
TaxNumber1 P_TH_StRpWhldgTaxItemOneCycle TaxNumber1 VAT Reg. No.
Language P_TH_StRpWhldgTaxItemOneCycle Language Report Text Language
TransactionCode P_TH_StRpWhldgTaxItemOneCycle TransactionCode Transaction Code
DocumentReferenceID P_TH_StRpWhldgTaxItemOneCycle DocumentReferenceID Reference
_WithholdingTaxCode P_TH_StRpWhldgTaxItemOneCycle _WithholdingTaxCode
_CompanyCode P_TH_StRpWhldgTaxItemOneCycle _CompanyCode
_Supplier P_TH_StRpWhldgTaxItemOneCycle _Supplier
_Customer P_TH_StRpWhldgTaxItemOneCycle _Customer
_Onetime P_TH_StRpWhldgTaxItemOneCycle _Onetime
_Branch P_TH_StRpWhldgTaxItemOneCycle _Branch
Supplier
_OperationalAcctgDocItem P_TH_StRpWhldgTaxItemOneCycle _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_TH_StRpWhldgTaxItem.
-- 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: PSRTHWHLDGTXITM

CREATE VIEW P_TH_StRpWhldgTaxItem AS
SELECT
  wht.CompanyCode AS CompanyCode,
  wht.AccountingDocument AS AccountingDocument,
  wht.FiscalYear AS FiscalYear,
  wht.AccountingDocumentItem AS AccountingDocumentItem,
  wht.WithholdingTaxType AS WithholdingTaxType,
  wht.StatryRptgEntity AS StatryRptgEntity,
  wht.StatryRptCategory AS StatryRptCategory,
  wht.StatryRptRunID AS StatryRptRunID,
  wht.WithholdingTaxCode AS WithholdingTaxCode,
  wht.Country AS Country,
  wht.BusinessPlace AS BusinessPlace,
  wht.BranchCode AS BranchCode,
  wht.FinancialAccountType AS FinancialAccountType,
  wht.Debtor AS Debtor,
  wht.Creditor AS Creditor,
  wht.BusinessPartner AS BusinessPartner,
  wht.AddressID AS AddressID,
  wht.SupplierCountry AS SupplierCountry,
  wht.SupplierRegion AS SupplierRegion,
  wht.PostingDate AS PostingDate,
  wht.DocumentDate AS DocumentDate,
  wht.InvoiceReference AS InvoiceReference,
  wht.IsReversed AS IsReversed,
  wht.IsReversal AS IsReversal,
  wht.ReportingCurrency AS ReportingCurrency,
  wht.TransactionCurrency AS TransactionCurrency,
  wht.BusinessPartnerAddressID AS BusinessPartnerAddressID,
  wht.PersonNumber AS PersonNumber,
  wht.WhldgTaxDocumentType AS WhldgTaxDocumentType,
  wht.ItemIsReportingRelevant AS ItemIsReportingRelevant,
  wht.TaxNumber1 AS TaxNumber1,
  wht.Language AS Language,
  wht.TransactionCode AS TransactionCode,
  wht.DocumentReferenceID AS DocumentReferenceID,
  wht._WithholdingTaxCode AS _WithholdingTaxCode,
  wht._CompanyCode AS _CompanyCode,
  wht._Supplier AS _Supplier,
  wht._Customer AS _Customer,
  wht._Onetime AS _Onetime,
  wht._Branch AS _Branch,
  wht._Supplier.Supplier AS Supplier,
  wht._OperationalAcctgDocItem AS _OperationalAcctgDocItem
FROM P_TH_StRpWhldgTaxItemOneCycle AS wht
LEFT OUTER JOIN P_TH_StRpWhldgTaxItemOneCycle AS wht_dependent ON wht.CompanyCode = wht_dependent.CompanyCode AND wht.AccountingDocument = wht_dependent.AccountingDocument AND wht.FiscalYear = wht_dependent.FiscalYear AND wht.AccountingDocumentItem = wht_dependent.AccountingDocumentItem AND wht.WithholdingTaxType <> wht_dependent.WithholdingTaxType AND ( wht.StatryRptgEntity is null AND wht_dependent.StatryRptgEntity is null OR wht.StatryRptgEntity = wht_dependent.StatryRptgEntity ) AND ( wht.StatryRptCategory is null AND wht_dependent.StatryRptCategory is null OR wht.StatryRptCategory = wht_dependent.StatryRptCategory ) AND ( wht.StatryRptRunID is null AND wht_dependent.StatryRptRunID is null OR wht.StatryRptRunID = wht_dependent.StatryRptRunID ) AND wht.Withholdingtaxpostingrule = '3' AND wht_dependent.Withholdingtaxpostingrule = '1' AND wht.WithholdingTaxIncomeType = wht_dependent.WithholdingTaxIncomeType AND wht.SqntlNmbrOfWhldgTaxType = wht_dependent.DependencyNmbrOfWhldgTaxType  -- association [0..1]
;