I_US_StRpFrgnVndrWhldgTxItm

DDL: I_US_STRPFRGNVNDRWHLDGTXITM SQL: IUSWHLDGTX1042S Type: view COMPOSITE

US 1042s Reporting - Cube

I_US_StRpFrgnVndrWhldgTxItm is a Composite CDS View (Cube) that provides data about "US 1042s Reporting - Cube" in SAP S/4HANA. It reads from 1 data source (P_US_StrpWhldgTaxItem) and exposes 67 fields with key fields CompanyCode, AccountingDocument, FiscalYear, AccountingDocumentItem, WithholdingTaxType. It has 3 associations to related views.

Data Sources (1)

SourceAliasJoin Type
P_US_StrpWhldgTaxItem WhldgTxItem from

Associations (3)

CardinalityTargetAliasCondition
[0..1] I_BusinessPartnerCustWhdgTax _CustWithholdingTax WhldgTxItem.CompanyCode = _CustWithholdingTax.CompanyCode and WhldgTxItem.BusinessPartnerNumber = _CustWithholdingTax.BusinessPartner and WhldgTxItem.Debtor = _CustWithholdingTax.Customer and WhldgTxItem.WithholdingTaxType = _CustWithholdingTax.WithholdingTaxType
[0..1] I_RegionText _RegionText _RegionText.Region = WhldgTxItem.BPRgn and _RegionText.Country = WhldgTxItem.BusinessPartnerCountry and _RegionText.Language = $session.system_language and WhldgTxItem.BPRgn <> 'CA'
[0..1] I_CountryText _CountryText _CountryText.Country = WhldgTxItem.BusinessPartnerCountry and _CountryText.Language = $session.system_language

Annotations (14)

NameValueLevelField
AbapCatalog.sqlViewName IUSWHLDGTX1042S view
AbapCatalog.compiler.compareFilter true view
VDM.viewType #COMPOSITE view
Analytics.dataCategory #CUBE view
ClientHandling.algorithm #SESSION_VARIABLE view
AccessControl.authorizationCheck #CHECK view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XL view
Analytics.internalName #LOCAL view
AbapCatalog.preserveKey true view
Metadata.allowExtensions true view
ObjectModel.usageType.dataClass #MIXED view
AccessControl.personalData.blocking #BLOCKED_DATA_INCLUDED view
EndUserText.label US 1042s Reporting - Cube view

Fields (67)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode P_US_StrpWhldgTaxItem CompanyCode Receiver Company Code
KEY AccountingDocument AccountingDocument Journal Entry
KEY FiscalYear FiscalYear G/L Fiscal Year
KEY AccountingDocumentItem AccountingDocumentItem Posting View Item
KEY WithholdingTaxType P_US_StrpWhldgTaxItem WithholdingTaxType WTax Type
KEY StatryRptgEntity StatryRptgEntity Reporting Entity
KEY StatryRptCategory StatryRptCategory Report ID
KEY StatryRptRunID StatryRptRunID Report Run ID
WithholdingTaxCode P_US_StrpWhldgTaxItem WithholdingTaxCode WTax Code
Country Country Venue: Ctry/Reg
BusinessPartner P_US_StrpWhldgTaxItem BusinessPartner Issuing Authority
PostingDate PostingDate Posting Date for GR
DocumentDate DocumentDate Journal Entry Date
ReportingDate ReportingDate
ClearingDate ClearingDate Clearing Date
FinancialAccountType FinancialAccountType Fin. Account Type
ReportingCurrency ReportingCurrency Currency
WhldgTaxBaseAmtInCoCodeCrcy WhldgTaxBaseAmtInCoCodeCrcy
WhldgTaxAmtInCoCodeCrcy WhldgTaxAmtInCoCodeCrcy
PayerName1
PayerName2
PayerName3
CityName
Region
PhoneNumber
StreetPrefixName
StreetName
HouseNumber
CompanyCodeName
CompanyPostalCode
CityCode
Language
SupplierFullNameendasSupplierFullName
BusinessPartnerCountryName _CountryText CountryName Country
CustomerSupplierCityName CustomerSupplierCityName
CustomerSupplierStreetName CustomerSupplierStreetName
OrganizationBPName1 OrganizationBPName1 Name 1
OrganizationBPName2 OrganizationBPName2 Name 2
BPStPrefixName BPStPrefixName
BPRgn BPRgn Venue Region
RegionName _RegionText RegionName Description
BusPartPOBoxRgn BusPartPOBoxRgn
BusPartPOBoxDvtgCityName BusPartPOBoxDvtgCityName
CustomerSupplierHouseNumber CustomerSupplierHouseNumber
TaxNumber1
TaxNumber2
TaxNumber4 BPTxNmbr4 BPTaxNumber Tax Number
TaxNumber5 BPTxNmbr5 BPTaxLongNumber Tax Number Long
CustomerSupplierPostalCode PayeePostalCode
BusPartPOBox BusPartPOBox PO Box
WithholdingTaxCountry WithholdingTaxCountry WTax C/R Key
WhldgTaxReferenceText _WithholdingTaxCode WhldgTaxReferenceText
OfficialWhldgTaxCode _WithholdingTaxCode OfficialWhldgTaxCode
char2asUS_TaxState
BirthDateelseendendasdatumasBirthDate
PayerRegion
PayerCountryName
RecipientTypeendasRecipientType
ExemptionReasonendasExemptionReason
US_FederalTaxAmtInCoCodeCrcy WhldgTaxAmtInCoCodeCrcy
TaxRate _WithholdingTaxCode WithholdingTaxPercent
US_RecipientForeignTaxID US_RecipientForeignTaxID
US_ForeignSuplrHasPartnership US_ForeignSuplrHasPartnership
US_ForeignSuplrLmtnOnBnftCode US_ForeignSuplrLmtnOnBnftCode
US_Chapter4StatusCode US_Chapter4StatusCode
BusinessPartnerNumber P_US_StrpWhldgTaxItem BusinessPartnerNumber
SpecialGLCode P_US_StrpWhldgTaxItem SpecialGLCode Special G/L Ind

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_US_StRpFrgnVndrWhldgTxItm.
-- 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: IUSWHLDGTX1042S

CREATE VIEW I_US_StRpFrgnVndrWhldgTxItm AS
SELECT
  WhldgTxItem.CompanyCode AS CompanyCode,
  AccountingDocument,
  FiscalYear,
  AccountingDocumentItem,
  WhldgTxItem.WithholdingTaxType AS WithholdingTaxType,
  StatryRptgEntity,
  StatryRptCategory,
  StatryRptRunID,
  WhldgTxItem.WithholdingTaxCode AS WithholdingTaxCode,
  Country,
  WhldgTxItem.BusinessPartner AS BusinessPartner,
  PostingDate,
  DocumentDate,
  ReportingDate,
  ClearingDate,
  FinancialAccountType,
  ReportingCurrency,
  WhldgTaxBaseAmtInCoCodeCrcy,
  WhldgTaxAmtInCoCodeCrcy,
  cast( '' as ad_name1 ) AS PayerName1,
  cast( '' as ad_name2 ) AS PayerName2,
  cast( '' as ad_name3 ) AS PayerName3,
  cast( '' as ad_city1 ) AS CityName,
  cast( '' as regio ) AS Region,
  cast( '' as ad_tlnmbr ) AS PhoneNumber,
  cast( '' as ad_strspp1 ) AS StreetPrefixName,
  cast( '' as ad_street ) AS StreetName,
  cast( '' as ad_hsnm1 ) AS HouseNumber,
  cast( '' as butxt ) AS CompanyCodeName,
  cast( '' as ad_pstcd1 ) AS CompanyPostalCode,
  cast ('' as ad_citynum ) AS CityCode,
  cast( 'EN' as spras ) AS Language,
  case when WhldgTxItem._Supplier.SupplierFullName is initial or WhldgTxItem._Supplier.SupplierFullName = '' then WhldgTxItem._Customer.CustomerFullName else WhldgTxItem._Supplier.SupplierFullName end as SupplierFullName AS SupplierFullNameendasSupplierFullName,
  _CountryText.CountryName AS BusinessPartnerCountryName,
  CustomerSupplierCityName,
  CustomerSupplierStreetName,
  OrganizationBPName1,
  OrganizationBPName2,
  BPStPrefixName,
  BPRgn,
  _RegionText.RegionName AS RegionName,
  BusPartPOBoxRgn,
  BusPartPOBoxDvtgCityName,
  CustomerSupplierHouseNumber,
  cast(coalesce(_OneTime.TaxID1, _BPTxNmbr1.BPTaxNumber) as stcd1) AS TaxNumber1,
  cast(coalesce(_OneTime.TaxID2, _BPTxNmbr2.BPTaxNumber) as stcd2) AS TaxNumber2,
  BPTxNmbr4.BPTaxNumber AS TaxNumber4,
  BPTxNmbr5.BPTaxLongNumber AS TaxNumber5,
  PayeePostalCode AS CustomerSupplierPostalCode,
  BusPartPOBox,
  WithholdingTaxCountry,
  _WithholdingTaxCode.WhldgTaxReferenceText AS WhldgTaxReferenceText,
  _WithholdingTaxCode.OfficialWhldgTaxCode AS OfficialWhldgTaxCode,
  cast(case WhldgTxItem.BusinessPartnerCountry when 'US' then BPRgn else ' ' end as abap.char( 2 ) ) as US_TaxState AS char2asUS_TaxState,
  cast( case when WhldgTxItem.Creditor is not initial or WhldgTxItem.Creditor <> '' then WhldgTxItem._Supplier.BirthDate else case when WhldgTxItem._Customer._CustomerToBusinessPartner._BusinessPartner.BusinessPartnerCategory = '1' then WhldgTxItem._Customer._CustomerToBusinessPartner._BusinessPartner.BirthDate else '' end end as datum) as BirthDate AS BirthDateelseendendasdatumasBirthDate,
  cast( '' as abap.char( 3 )) AS PayerRegion,
  cast( '' as abap.char( 3 )) AS PayerCountryName,
  case when WhldgTxItem._CompanyCode.ExtendedWhldgTaxIsActive = 'X' and _WithholdingTaxCode.WhldgTaxReferenceText = 'CHP3' and ( _WithholdingTax.IsWithholdingTaxSubject = 'X' or _CustWithholdingTax.WithholdingTaxAgent = 'X' ) then coalesce(_WithholdingTax.RecipientType,_CustWithholdingTax.RecipientType) end as RecipientType AS RecipientTypeendasRecipientType,
  case when WhldgTxItem._CompanyCode.ExtendedWhldgTaxIsActive = 'X' and _WithholdingTaxCode.WhldgTaxReferenceText = 'CHP3' and (_WithholdingTax.ExemptionReason <> '' or _CustWithholdingTax.ExemptionReason <> '') and WhldgTxItem.WhldgTaxExmptCertificate <> '' and (_WithholdingTax.IsWithholdingTaxSubject = 'X' or _CustWithholdingTax.WithholdingTaxAgent = 'X') then coalesce(_WithholdingTax.ExemptionReason,_CustWithholdingTax.ExemptionReason) when WhldgTxItem._CompanyCode.ExtendedWhldgTaxIsActive = 'X' and _WithholdingTaxCode.WhldgTaxReferenceText = 'CHP3' and (_WithholdingTax.ExemptionReason = '' or _CustWithholdingTax.ExemptionReason = '') and WhldgTxItem.WhldgTaxExmptCertificate = '' and (_WithholdingTax.IsWithholdingTaxSubject = 'X' or _CustWithholdingTax.WithholdingTaxAgent = 'X') then '' when WhldgTxItem._CompanyCode.ExtendedWhldgTaxIsActive = 'X' and _WithholdingTaxCode.WhldgTaxReferenceText = 'CHP4' then _WithholdingTaxChp.ExemptionReason end as ExemptionReason AS ExemptionReasonendasExemptionReason,
  WhldgTaxAmtInCoCodeCrcy AS US_FederalTaxAmtInCoCodeCrcy,
  _WithholdingTaxCode.WithholdingTaxPercent AS TaxRate,
  US_RecipientForeignTaxID,
  US_ForeignSuplrHasPartnership,
  US_ForeignSuplrLmtnOnBnftCode,
  US_Chapter4StatusCode,
  WhldgTxItem.BusinessPartnerNumber AS BusinessPartnerNumber,
  WhldgTxItem.SpecialGLCode AS SpecialGLCode
FROM P_US_StrpWhldgTaxItem AS WhldgTxItem
LEFT OUTER JOIN I_BusinessPartnerCustWhdgTax AS _CustWithholdingTax ON WhldgTxItem.CompanyCode = _CustWithholdingTax.CompanyCode AND WhldgTxItem.BusinessPartnerNumber = _CustWithholdingTax.BusinessPartner AND WhldgTxItem.Debtor = _CustWithholdingTax.Customer AND WhldgTxItem.WithholdingTaxType = _CustWithholdingTax.WithholdingTaxType  -- association [0..1]
LEFT OUTER JOIN I_RegionText AS _RegionText ON _RegionText.Region = WhldgTxItem.BPRgn AND _RegionText.Country = WhldgTxItem.BusinessPartnerCountry AND _RegionText.Language = $session.system_language AND WhldgTxItem.BPRgn <> 'CA'  -- association [0..1]
LEFT OUTER JOIN I_CountryText AS _CountryText ON _CountryText.Country = WhldgTxItem.BusinessPartnerCountry AND _CountryText.Language = $session.system_language  -- association [0..1]
;