I_CL_StRpGlobalWhldgTxItmC

DDL: I_CL_STRPGLOBALWHLDGTXITMC Type: view_entity COMPOSITE

Chile Global Compl WHT Reporting - Cube

I_CL_StRpGlobalWhldgTxItmC is a Composite CDS View (Cube) that provides data about "Chile Global Compl WHT Reporting - Cube" in SAP S/4HANA. It reads from 1 data source (I_StRpWhldgTaxItem) and exposes 58 fields with key fields CompanyCode, AccountingDocument, FiscalYear, AccountingDocumentItem, WithholdingTaxType. It has 3 associations to related views.

Data Sources (1)

SourceAliasJoin Type
I_StRpWhldgTaxItem wht from

Associations (3)

CardinalityTargetAliasCondition
[0..1] I_Businesspartnertaxnumber _BPTxNmbr1 wht.BusinessPartnerNumber = _BPTxNmbr1.BusinessPartner and _BPTxNmbr1.BPTaxType = 'CL1'
[0..1] I_AddlCompanyCodeInformation _AdditionalCompanyCode wht.CompanyCode = _AdditionalCompanyCode.CompanyCode and _AdditionalCompanyCode.CompanyCodeParameterType = 'TAXNR'
[0..1] I_SupplierWithHoldingTax _SupplierWithholdingTax wht.BusinessPartner = _SupplierWithholdingTax.Supplier and wht.CompanyCode = _SupplierWithholdingTax.CompanyCode and wht.WithholdingTaxType = _SupplierWithholdingTax.WithholdingTaxType

Annotations (11)

NameValueLevelField
VDM.viewType #COMPOSITE view
Analytics.dataCategory #CUBE view
AccessControl.authorizationCheck #MANDATORY view
EndUserText.label Chile Global Compl WHT Reporting - Cube view
AccessControl.personalData.blocking #BLOCKED_DATA_INCLUDED view
Analytics.internalName #LOCAL view
Metadata.ignorePropagatedAnnotations true view
Metadata.allowExtensions true view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view

Fields (58)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode I_StRpWhldgTaxItem CompanyCode Receiver Company Code
KEY AccountingDocument I_StRpWhldgTaxItem AccountingDocument Journal Entry
KEY FiscalYear I_StRpWhldgTaxItem FiscalYear G/L Fiscal Year
KEY AccountingDocumentItem I_StRpWhldgTaxItem AccountingDocumentItem Posting View Item
KEY WithholdingTaxType I_StRpWhldgTaxItem WithholdingTaxType WTax Type
KEY StatryRptgEntity I_StRpWhldgTaxItem StatryRptgEntity Reporting Entity
KEY StatryRptCategory I_StRpWhldgTaxItem StatryRptCategory Report ID
KEY StatryRptRunID I_StRpWhldgTaxItem StatryRptRunID Report Run ID
PostingDate
DocumentDate
PostingDateendasReportingDate
ClearingDate I_StRpWhldgTaxItem ClearingDate Clearing Date
WithholdingTaxCode I_StRpWhldgTaxItem WithholdingTaxCode WTax Code
WhldgTaxCodeName
WithholdingTaxIncomeType I_StRpWhldgTaxItem WithholdingTaxIncomeType
OfficialWhldgTaxCode
DocumentReferenceID I_StRpWhldgTaxItem DocumentReferenceID Reference
WithholdingTaxCertificate I_StRpWhldgTaxItem WithholdingTaxCertificate WHT Certificate
CompanyCodeName
CompanyHouseNumber
CompanyStreetName
CompanyCodeCityName
CompanyDistrict
CompanyRegion
RegionName
CompanyEmailAddress
CompanyFaxNumber
CompanyPhoneNumber
CompanyCodeParameterValue _AdditionalCompanyCode CompanyCodeParameterValue Company Code
BusinessPartner I_StRpWhldgTaxItem BusinessPartner Issuing Authority
BusinessPartnerNumber I_StRpWhldgTaxItem BusinessPartnerNumber
Name I_StRpWhldgTaxItem Name Zone name
BusinessPartnerCountry I_StRpWhldgTaxItem BusinessPartnerCountry BP Ctry/Reg.
Language I_StRpWhldgTaxItem Language Report Text Language
IsOneTimeAccount
TaxNumber1endasstcd1asTaxNumber1
WithholdingTaxPercent I_StRpWhldgTaxItem WithholdingTaxPercent
DocumentItemText I_StRpWhldgTaxItem DocumentItemText Text
SupplierRecipientType _SupplierWithholdingTax RecipientType Recipient Type
CalendarMonth
ReportingMonth
ReportingCurrency I_StRpWhldgTaxItem ReportingCurrency Currency
WhldgTaxBaseAmtInCoCodeCrcy I_StRpWhldgTaxItem WhldgTaxBaseAmtInCoCodeCrcy
WhldgTaxAmtInCoCodeCrcy I_StRpWhldgTaxItem WhldgTaxAmtInCoCodeCrcy
GrossAmountInCoCodeCurrency
NetAmountInCoCodeCurrency
TransactionCurrency I_StRpWhldgTaxItem TransactionCurrency Transaction Currency
AdditionalCurrency1 I_StRpWhldgTaxItem AdditionalCurrency1 Local curr. 2
AdditionalCurrency2 I_StRpWhldgTaxItem AdditionalCurrency2 Local curr. 3
WhldgTaxBaseAmtInTransacCrcy I_StRpWhldgTaxItem WhldgTaxBaseAmtInTransacCrcy
WhldgTaxBaseAmtInAddlCrcy2 I_StRpWhldgTaxItem WhldgTaxBaseAmtInAddlCrcy2
WhldgTaxBaseAmtInAddlCrcy3 I_StRpWhldgTaxItem WhldgTaxBaseAmtInAddlCrcy3
WhldgTaxAmtInTransacCrcy I_StRpWhldgTaxItem WhldgTaxAmtInTransacCrcy
WhldgTaxAmtInAddlCrcy2 I_StRpWhldgTaxItem WhldgTaxAmtInAddlCrcy2
WhldgTaxAmtInAddlCrcy3 I_StRpWhldgTaxItem WhldgTaxAmtInAddlCrcy3
AmountInTransactionCurrency I_StRpWhldgTaxItem AmountInTransactionCurrency Pt Crcy Amt
AmountInAdditionalCurrency1 I_StRpWhldgTaxItem AmountInAdditionalCurrency1 Amount in Additional Currency 1
AmountInAdditionalCurrency2 I_StRpWhldgTaxItem AmountInAdditionalCurrency2 LC2 Amount

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_CL_StRpGlobalWhldgTxItmC.
-- 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 I_CL_StRpGlobalWhldgTxItmC 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._JournalEntry.PostingDate AS PostingDate,
  wht._JournalEntry.DocumentDate AS DocumentDate,
  case when wht.WhldgTaxRptgDateIsActive = 'X' then wht.WithholdingTaxReportingDate else wht.PostingDate end as ReportingDate AS PostingDateendasReportingDate,
  wht.ClearingDate AS ClearingDate,
  wht.WithholdingTaxCode AS WithholdingTaxCode,
  wht._WithholdingTaxCode._CodeText[1:Language = $session.system_language].WhldgTaxCodeName AS WhldgTaxCodeName,
  wht.WithholdingTaxIncomeType AS WithholdingTaxIncomeType,
  wht._WithholdingTaxCode.OfficialWhldgTaxCode AS OfficialWhldgTaxCode,
  wht.DocumentReferenceID AS DocumentReferenceID,
  wht.WithholdingTaxCertificate AS WithholdingTaxCertificate,
  wht._CompanyCode.CompanyCodeName AS CompanyCodeName,
  wht._CompanyCode._Address.HouseNumber AS CompanyHouseNumber,
  wht._CompanyCode._Address.StreetName AS CompanyStreetName,
  wht._CompanyCode._Address.CityName AS CompanyCodeCityName,
  wht._CompanyCode._Address.District AS CompanyDistrict,
  wht._CompanyCode._Address.Region AS CompanyRegion,
  wht._CompanyCode._Address._Region._RegionText[1:Language = language].RegionName AS RegionName,
  wht._CompanyCode._Address._DefaultEmailAddress.EmailAddress AS CompanyEmailAddress,
  wht._CompanyCode._Address._DefaultFaxNumber.FaxNumber AS CompanyFaxNumber,
  wht._CompanyCode._Address._DefaultPhoneNumber.PhoneNumber AS CompanyPhoneNumber,
  _AdditionalCompanyCode.CompanyCodeParameterValue AS CompanyCodeParameterValue,
  wht.BusinessPartner AS BusinessPartner,
  wht.BusinessPartnerNumber AS BusinessPartnerNumber,
  wht.Name AS Name,
  wht.BusinessPartnerCountry AS BusinessPartnerCountry,
  wht.Language AS Language,
  wht._Supplier.IsOneTimeAccount AS IsOneTimeAccount,
  cast(case wht._Supplier.IsOneTimeAccount when '' then coalesce(_BPTxNmbr1.BPTaxNumber,'') else wht.TaxNumber1 end as stcd1) as TaxNumber1 AS TaxNumber1endasstcd1asTaxNumber1,
  wht.WithholdingTaxPercent AS WithholdingTaxPercent,
  wht.DocumentItemText AS DocumentItemText,
  _SupplierWithholdingTax.RecipientType AS SupplierRecipientType,
  cast(substring(DocumentDate, 5, 2) as calendarmonth) AS CalendarMonth,
  cast(substring($session.system_date, 5, 2) as char3) AS ReportingMonth,
  wht.ReportingCurrency AS ReportingCurrency,
  wht.WhldgTaxBaseAmtInCoCodeCrcy AS WhldgTaxBaseAmtInCoCodeCrcy,
  wht.WhldgTaxAmtInCoCodeCrcy AS WhldgTaxAmtInCoCodeCrcy,
  abs(wht.AmountInCompanyCodeCurrency) + abs(wht.AggrgdWhldgTaxAmtInCCCrcy ) AS GrossAmountInCoCodeCurrency,
  abs(wht.AmountInCompanyCodeCurrency) AS NetAmountInCoCodeCurrency,
  wht.TransactionCurrency AS TransactionCurrency,
  wht.AdditionalCurrency1 AS AdditionalCurrency1,
  wht.AdditionalCurrency2 AS AdditionalCurrency2,
  wht.WhldgTaxBaseAmtInTransacCrcy AS WhldgTaxBaseAmtInTransacCrcy,
  wht.WhldgTaxBaseAmtInAddlCrcy2 AS WhldgTaxBaseAmtInAddlCrcy2,
  wht.WhldgTaxBaseAmtInAddlCrcy3 AS WhldgTaxBaseAmtInAddlCrcy3,
  wht.WhldgTaxAmtInTransacCrcy AS WhldgTaxAmtInTransacCrcy,
  wht.WhldgTaxAmtInAddlCrcy2 AS WhldgTaxAmtInAddlCrcy2,
  wht.WhldgTaxAmtInAddlCrcy3 AS WhldgTaxAmtInAddlCrcy3,
  wht.AmountInTransactionCurrency AS AmountInTransactionCurrency,
  wht.AmountInAdditionalCurrency1 AS AmountInAdditionalCurrency1,
  wht.AmountInAdditionalCurrency2 AS AmountInAdditionalCurrency2
FROM I_StRpWhldgTaxItem AS wht
LEFT OUTER JOIN I_Businesspartnertaxnumber AS _BPTxNmbr1 ON wht.BusinessPartnerNumber = _BPTxNmbr1.BusinessPartner AND _BPTxNmbr1.BPTaxType = 'CL1'  -- association [0..1]
LEFT OUTER JOIN I_AddlCompanyCodeInformation AS _AdditionalCompanyCode ON wht.CompanyCode = _AdditionalCompanyCode.CompanyCode AND _AdditionalCompanyCode.CompanyCodeParameterType = 'TAXNR'  -- association [0..1]
LEFT OUTER JOIN I_SupplierWithHoldingTax AS _SupplierWithholdingTax ON wht.BusinessPartner = _SupplierWithholdingTax.Supplier AND wht.CompanyCode = _SupplierWithholdingTax.CompanyCode AND wht.WithholdingTaxType = _SupplierWithholdingTax.WithholdingTaxType  -- association [0..1]
;