I_DE_StRpWithholdingTaxItemC

DDL: I_DE_STRPWITHHOLDINGTAXITEMC Type: view_entity COMPOSITE Package: GLO_FIN_IS_WHT_DE

Withholding Tax for Germany

I_DE_StRpWithholdingTaxItemC is a Composite CDS View (Cube) that provides data about "Withholding Tax for Germany" in SAP S/4HANA. It reads from 1 data source (I_StRpWhldgTaxItem) and exposes 61 fields with key fields CompanyCode, AccountingDocument, FiscalYear, AccountingDocumentItem, WithholdingTaxType. It has 9 associations to related views. Part of development package GLO_FIN_IS_WHT_DE.

Data Sources (1)

SourceAliasJoin Type
I_StRpWhldgTaxItem doc from

Associations (9)

CardinalityTargetAliasCondition
[1..1] I_OfficialWhldgTaxKeyDesc offwtax doc.Country = offwtax.Country and doc.Language = offwtax.Language and doc.OfficialWhldgTaxCode = offwtax.OfficialWhldgTaxCode
[1..1] I_OfficialWhldgTaxKeyDesc offwtaxEN doc.Country = offwtaxEN.Country and offwtaxEN.Language = 'E' and doc.OfficialWhldgTaxCode = offwtaxEN.OfficialWhldgTaxCode
[1..1] I_BusinessPartner bp doc.BusinessPartnerNumber = bp.BusinessPartner
[1..*] I_StRpWhldgTaxItem doc1 ( doc1.CompanyCode = doc.CompanyCode and doc1.AccountingDocument = doc.AccountingDocument and doc1.AccountingDocumentItem = doc.AccountingDocumentItem and doc1.FiscalYear = doc.FiscalYear and doc1.DependencyNmbrOfWhldgTaxType = doc.SqntlNmbrOfWhldgTaxType and doc.DependencyNmbrOfWhldgTaxType = '000' and doc1.StatryRptgEntity = doc.StatryRptgEntity and doc1.StatryRptCategory = doc.StatryRptCategory and doc1.StatryRptRunID = doc.StatryRptRunID )
[1..1] I_Businesspartnerwhldgtax lfbw lfbw.BusinessPartner = doc.BusinessPartnerNumber and lfbw.Supplier = doc.Supplier and lfbw.CompanyCode = doc.CompanyCode and lfbw.WithholdingTaxType = doc.WithholdingTaxType
[1..1] P_StRpCategoryParameter par_5008 par_5008.ReportingCategory = doc.StatryRptCategory and par_5008.ReportingEntity = doc.StatryRptgEntity and par_5008.ReportingCategoryParamName = 'DE_WHT_50A_5008_STD_RATE'
[1..1] P_StRpCategoryParameter par_5009 par_5009.ReportingCategory = doc.StatryRptCategory and par_5009.ReportingEntity = doc.StatryRptgEntity and par_5009.ReportingCategoryParamName = 'DE_WHT_50A_5009_STD_RATE'
[1..1] P_StRpCategoryParameter par_5010 par_5010.ReportingCategory = doc.StatryRptCategory and par_5010.ReportingEntity = doc.StatryRptgEntity and par_5010.ReportingCategoryParamName = 'DE_WHT_50A_5010_STD_RATE'
[1..1] P_StRpCategoryParameter par_5011 par_5011.ReportingCategory = doc.StatryRptCategory and par_5011.ReportingEntity = doc.StatryRptgEntity and par_5011.ReportingCategoryParamName = 'DE_WHT_50A_5011_STD_RATE'

Annotations (10)

NameValueLevelField
VDM.viewType #COMPOSITE view
Analytics.dataCategory #CUBE view
AccessControl.authorizationCheck #CHECK view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view
Metadata.allowExtensions true view
AccessControl.personalData.blocking #BLOCKED_DATA_INCLUDED view
Analytics.internalName #LOCAL view
EndUserText.label Withholding Tax for Germany view

Fields (61)

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
Creditor I_StRpWhldgTaxItem Creditor Supplier
Debtor I_StRpWhldgTaxItem Debtor Debtor
BusinessPartner I_StRpWhldgTaxItem BusinessPartner Issuing Authority
BusinessPartnerNumber I_StRpWhldgTaxItem BusinessPartnerNumber
AddressID _Supplier AddressID Ship-to address
BusinessPlace I_StRpWhldgTaxItem BusinessPlace Business place
FinancialAccountType I_StRpWhldgTaxItem FinancialAccountType Fin. Account Type
PostingDate I_StRpWhldgTaxItem PostingDate Posting Date for GR
DocumentDate I_StRpWhldgTaxItem DocumentDate Journal Entry Date
SupplierRecipientType I_StRpWhldgTaxItem SupplierRecipientType
Country I_StRpWhldgTaxItem Country Venue: Ctry/Reg
DerivedWithholdingTaxType doc1 WithholdingTaxType WTax Type
WithholdingTaxPercent I_StRpWhldgTaxItem WithholdingTaxPercent
ClearingDate I_StRpWhldgTaxItem ClearingDate Clearing Date
ReportingCurrency I_StRpWhldgTaxItem ReportingCurrency Currency
WhldgTaxBaseAmtInCoCodeCrcy
WhldgTaxAmtInCoCodeCrcy
WithholdingTaxAmount
elseendasTaxRateAsText
AmountInCompanyCodeCurrency I_StRpWhldgTaxItem AmountInCompanyCodeCurrency Local Crcy Amt
WhldgTaxDocumentType I_StRpWhldgTaxItem WhldgTaxDocumentType 3-Byte field
WhldgTaxBaseIsInherited I_StRpWhldgTaxItem WhldgTaxBaseIsInherited
DependencyNmbrOfWhldgTaxType I_StRpWhldgTaxItem DependencyNmbrOfWhldgTaxType
SqntlNmbrOfWhldgTaxType I_StRpWhldgTaxItem SqntlNmbrOfWhldgTaxType
SupplierName I_StRpWhldgTaxItem Name Zone name
SupplierCountry I_StRpWhldgTaxItem BusinessPartnerCountry BP Ctry/Reg.
CityName I_StRpWhldgTaxItem CityName Name
AdditionalCityName
IsNaturalPerson I_StRpWhldgTaxItem IsNaturalPerson Natural person
IsReversed I_StRpWhldgTaxItem IsReversed Reversed?
IsReversal I_StRpWhldgTaxItem IsReversal Reversal doc.
CityCodeelseendasBusinessPartnerCityCode
StreetName I_StRpWhldgTaxItem StreetName Text
asad_hsnm1elseendasHouseNumber
elseendasHouseNumberSupplementText
Region I_StRpWhldgTaxItem Region Venue Region
EmailAddresselseendasEmailAddress
POBox I_StRpWhldgTaxItem POBox PO Box
PhoneNumberelseendasPhoneNumber
dec62aschar10endasTaxRateInPercentAsText
ExemptionDateEnd lfbw ExemptionDateEnd Exempt To
TaxRate I_StRpWhldgTaxItem WithholdingTaxPercent
ExemptionReason lfbw ExemptionReason Exempt. Reason
PostalCodeelseendasPostalCode
PostalCodeelseendasSupplierPostalCode
POBoxPostalCodeelseendasPOBoxPostalCode
AddressCityPostBoxCode
Language
FirstNameelseendendasDE_GivenName
LastNameelseendendasDE_FamilyName
RecipientPostalCode I_StRpWhldgTaxItem PostalCode Postal Code
ExemptionDateBegin lfbw ExemptionDateBegin Exempt From
WithholdingTaxPostingRule

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_DE_StRpWithholdingTaxItemC.
-- 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_DE_StRpWithholdingTaxItemC AS
SELECT
  doc.CompanyCode AS CompanyCode,
  doc.AccountingDocument AS AccountingDocument,
  doc.FiscalYear AS FiscalYear,
  doc.AccountingDocumentItem AS AccountingDocumentItem,
  doc.WithholdingTaxType AS WithholdingTaxType,
  doc.StatryRptgEntity AS StatryRptgEntity,
  doc.StatryRptCategory AS StatryRptCategory,
  doc.StatryRptRunID AS StatryRptRunID,
  doc.Creditor AS Creditor,
  doc.Debtor AS Debtor,
  doc.BusinessPartner AS BusinessPartner,
  doc.BusinessPartnerNumber AS BusinessPartnerNumber,
  _Supplier.AddressID AS AddressID,
  doc.BusinessPlace AS BusinessPlace,
  doc.FinancialAccountType AS FinancialAccountType,
  doc.PostingDate AS PostingDate,
  doc.DocumentDate AS DocumentDate,
  doc.SupplierRecipientType AS SupplierRecipientType,
  doc.Country AS Country,
  doc1.WithholdingTaxType AS DerivedWithholdingTaxType,
  doc.WithholdingTaxPercent AS WithholdingTaxPercent,
  doc.ClearingDate AS ClearingDate,
  doc.ReportingCurrency AS ReportingCurrency,
  cast( doc.WhldgTaxBaseAmtInCoCodeCrcy as fis_qsshh) AS WhldgTaxBaseAmtInCoCodeCrcy,
  cast( doc.WhldgTaxAmtInCoCodeCrcy as fis_qbshh) AS WhldgTaxAmtInCoCodeCrcy,
  cast( doc1.WhldgTaxAmtInCoCodeCrcy as fis_qbshb) AS WithholdingTaxAmount,
  case lfbw.ExemptionReason when 'DT' then replace(cast( cast(doc.WithholdingTaxPercent as abap.dec( 6, 2 )) as char10), ',' , '.' ) else '' end as TaxRateAsText AS elseendasTaxRateAsText,
  doc.AmountInCompanyCodeCurrency AS AmountInCompanyCodeCurrency,
  doc.WhldgTaxDocumentType AS WhldgTaxDocumentType,
  doc.WhldgTaxBaseIsInherited AS WhldgTaxBaseIsInherited,
  doc.DependencyNmbrOfWhldgTaxType AS DependencyNmbrOfWhldgTaxType,
  doc.SqntlNmbrOfWhldgTaxType AS SqntlNmbrOfWhldgTaxType,
  doc.Name AS SupplierName,
  doc.BusinessPartnerCountry AS SupplierCountry,
  doc.CityName AS CityName,
  cast(doc.CityName as ad_city3) AS AdditionalCityName,
  doc.IsNaturalPerson AS IsNaturalPerson,
  doc.IsReversed AS IsReversed,
  doc.IsReversal AS IsReversal,
  case when doc._Onetime.AccountingDocument is null then doc._Supplier._StandardAddress.CityCode else '' end as BusinessPartnerCityCode AS CityCodeelseendasBusinessPartnerCityCode,
  doc.StreetName AS StreetName,
  case when doc._Onetime.AccountingDocument is null then cast (replace(doc.HouseNumber, ',','.') as ad_hsnm1 ) else '' end as HouseNumber AS asad_hsnm1elseendasHouseNumber,
  case when doc._Onetime.AccountingDocument is null then replace(doc.HouseNumberSupplementText,',','.') else '' end as HouseNumberSupplementText AS elseendasHouseNumberSupplementText,
  doc.Region AS Region,
  case when doc._Onetime.AccountingDocument is null then doc.EmailAddress else '' end as EmailAddress AS EmailAddresselseendasEmailAddress,
  doc.POBox AS POBox,
  case when doc._Onetime.AccountingDocument is null then doc._Supplier._StandardAddress.PhoneNumber else '' end as PhoneNumber AS PhoneNumberelseendasPhoneNumber,
  case lfbw.ExemptionReason when 'DT' then case doc.OfficialWhldgTaxCode when '5008' then replace( cast(par_5008.ReportingCatLatestParamValue as char10 ), ',' , '.' ) when '5009' then replace( cast(par_5009.ReportingCatLatestParamValue as char10 ), ',' , '.' ) when '5010' then replace( cast(par_5010.ReportingCatLatestParamValue as char10 ), ',' , '.' ) when '5011' then replace( cast(par_5011.ReportingCatLatestParamValue as char10 ), ',' , '.' ) end else cast( cast(doc.WithholdingTaxPercent as abap.dec( 6, 2 )) as char10) end as TaxRateInPercentAsText AS dec62aschar10endasTaxRateInPercentAsText,
  lfbw.ExemptionDateEnd AS ExemptionDateEnd,
  doc.WithholdingTaxPercent AS TaxRate,
  lfbw.ExemptionReason AS ExemptionReason,
  case when doc.BusinessPartnerCountry = 'DE' then doc.PostalCode else '' end as PostalCode AS PostalCodeelseendasPostalCode,
  case when doc.BusinessPartnerCountry <> 'DE' then doc.PostalCode else '' end as SupplierPostalCode AS PostalCodeelseendasSupplierPostalCode,
  case when doc.BusinessPartnerCountry = 'DE' then doc.POBoxPostalCode else '' end as POBoxPostalCode AS POBoxPostalCodeelseendasPOBoxPostalCode,
  cast( doc.POBoxPostalCode as abap.char(12) ) AS AddressCityPostBoxCode,
  cast('E' as spras) AS Language,
  case when doc.SupplierRecipientType = 'N' then bp.FirstName else case when lfbw.RecipientType = 'N' then bp.FirstName else '' end end as DE_GivenName AS FirstNameelseendendasDE_GivenName,
  case when doc.SupplierRecipientType = 'N' then bp.LastName else case when lfbw.RecipientType = 'N' then bp.LastName else '' end end as DE_FamilyName AS LastNameelseendendasDE_FamilyName,
  doc.PostalCode AS RecipientPostalCode,
  lfbw.ExemptionDateBegin AS ExemptionDateBegin,
  doc._WithholdingTaxCode.WithholdingTaxPostingRule AS WithholdingTaxPostingRule
FROM I_StRpWhldgTaxItem AS doc
LEFT OUTER JOIN I_OfficialWhldgTaxKeyDesc AS offwtax ON doc.Country = offwtax.Country AND doc.Language = offwtax.Language AND doc.OfficialWhldgTaxCode = offwtax.OfficialWhldgTaxCode  -- association [1..1]
LEFT OUTER JOIN I_OfficialWhldgTaxKeyDesc AS offwtaxEN ON doc.Country = offwtaxEN.Country AND offwtaxEN.Language = 'E' AND doc.OfficialWhldgTaxCode = offwtaxEN.OfficialWhldgTaxCode  -- association [1..1]
LEFT OUTER JOIN I_BusinessPartner AS bp ON doc.BusinessPartnerNumber = bp.BusinessPartner  -- association [1..1]
LEFT OUTER JOIN I_StRpWhldgTaxItem AS doc1 ON ( doc1.CompanyCode = doc.CompanyCode AND doc1.AccountingDocument = doc.AccountingDocument AND doc1.AccountingDocumentItem = doc.AccountingDocumentItem AND doc1.FiscalYear = doc.FiscalYear AND doc1.DependencyNmbrOfWhldgTaxType = doc.SqntlNmbrOfWhldgTaxType AND doc.DependencyNmbrOfWhldgTaxType = '000' AND doc1.StatryRptgEntity = doc.StatryRptgEntity AND doc1.StatryRptCategory = doc.StatryRptCategory AND doc1.StatryRptRunID = doc.StatryRptRunID )  -- association [1..*]
LEFT OUTER JOIN I_Businesspartnerwhldgtax AS lfbw ON lfbw.BusinessPartner = doc.BusinessPartnerNumber AND lfbw.Supplier = doc.Supplier AND lfbw.CompanyCode = doc.CompanyCode AND lfbw.WithholdingTaxType = doc.WithholdingTaxType  -- association [1..1]
LEFT OUTER JOIN P_StRpCategoryParameter AS par_5008 ON par_5008.ReportingCategory = doc.StatryRptCategory AND par_5008.ReportingEntity = doc.StatryRptgEntity AND par_5008.ReportingCategoryParamName = 'DE_WHT_50A_5008_STD_RATE'  -- association [1..1]
LEFT OUTER JOIN P_StRpCategoryParameter AS par_5009 ON par_5009.ReportingCategory = doc.StatryRptCategory AND par_5009.ReportingEntity = doc.StatryRptgEntity AND par_5009.ReportingCategoryParamName = 'DE_WHT_50A_5009_STD_RATE'  -- association [1..1]
LEFT OUTER JOIN P_StRpCategoryParameter AS par_5010 ON par_5010.ReportingCategory = doc.StatryRptCategory AND par_5010.ReportingEntity = doc.StatryRptgEntity AND par_5010.ReportingCategoryParamName = 'DE_WHT_50A_5010_STD_RATE'  -- association [1..1]
LEFT OUTER JOIN P_StRpCategoryParameter AS par_5011 ON par_5011.ReportingCategory = doc.StatryRptCategory AND par_5011.ReportingEntity = doc.StatryRptgEntity AND par_5011.ReportingCategoryParamName = 'DE_WHT_50A_5011_STD_RATE'  -- association [1..1]
;