C_EG_StRpWhldgTaxItemCube

DDL: C_EG_STRPWHLDGTAXITEMCUBE Type: view CONSUMPTION

Withholding Tax Item Cube for Egypt

C_EG_StRpWhldgTaxItemCube is a Consumption CDS View (Cube) that provides data about "Withholding Tax Item Cube for Egypt" in SAP S/4HANA. It reads from 1 data source (C_EG_StRpAggrgdWhldgTaxItem) and exposes 44 fields with key fields CompanyCode, AccountingDocument, FiscalYear, WithholdingTaxType, StatryRptgEntity.

Data Sources (1)

SourceAliasJoin Type
C_EG_StRpAggrgdWhldgTaxItem WHTItem from

Parameters (2)

NameTypeDefault
P_FromReportingDate fis_budat
P_ToReportingDate fis_budat

Annotations (14)

NameValueLevelField
AbapCatalog.sqlViewName CSREGWHLDGTXITMC view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
Analytics.dataCategory #CUBE view
Analytics.internalName #LOCAL view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XL view
VDM.viewType #CONSUMPTION view
AccessControl.authorizationCheck #MANDATORY view
ClientHandling.algorithm #SESSION_VARIABLE view
AccessControl.personalData.blocking #BLOCKED_DATA_INCLUDED view
Metadata.allowExtensions true view
EndUserText.label Withholding Tax Item Cube for Egypt view

Fields (44)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode C_EG_StRpAggrgdWhldgTaxItem CompanyCode Receiver Company Code
KEY AccountingDocument C_EG_StRpAggrgdWhldgTaxItem AccountingDocument Journal Entry
KEY FiscalYear C_EG_StRpAggrgdWhldgTaxItem FiscalYear G/L Fiscal Year
KEY WithholdingTaxType C_EG_StRpAggrgdWhldgTaxItem WithholdingTaxType WTax Type
KEY StatryRptgEntity C_EG_StRpAggrgdWhldgTaxItem StatryRptgEntity Reporting Entity
KEY StatryRptCategory C_EG_StRpAggrgdWhldgTaxItem StatryRptCategory Report ID
KEY StatryRptRunID C_EG_StRpAggrgdWhldgTaxItem StatryRptRunID Report Run ID
AccountingDocumentItem
ReportingDate C_EG_StRpAggrgdWhldgTaxItem ReportingDate
WithholdingTaxReportingDate C_EG_StRpAggrgdWhldgTaxItem ReportingDate
ReportingDate14asReportingDateAsText
FiscalPeriod C_EG_StRpAggrgdWhldgTaxItem FiscalPeriod Tax period
DocumentDate C_EG_StRpAggrgdWhldgTaxItem DocumentDate Journal Entry Date
ClearingDate C_EG_StRpAggrgdWhldgTaxItem ClearingDate Clearing Date
PostingDate C_EG_StRpAggrgdWhldgTaxItem PostingDate Posting Date for GR
ReportingDate14endasPostingDateAsText
WithholdingTaxCode C_EG_StRpAggrgdWhldgTaxItem WithholdingTaxCode WTax Code
OfficialWhldgTaxCode C_EG_StRpAggrgdWhldgTaxItem OfficialWhldgTaxCode
TransactionCurrency C_EG_StRpAggrgdWhldgTaxItem TransactionCurrency Transaction Currency
ReportingCurrency C_EG_StRpAggrgdWhldgTaxItem ReportingCurrency Currency
AmountInCompanyCodeCurrency C_EG_StRpAggrgdWhldgTaxItem AmountInCompanyCodeCurrency Local Crcy Amt
WhldgTaxBaseAmtInCoCodeCrcy C_EG_StRpAggrgdWhldgTaxItem WhldgTaxBaseAmtInCoCodeCrcy
WhldgTaxBaseAmtInTransacCrcy C_EG_StRpAggrgdWhldgTaxItem WhldgTaxBaseAmtInTransacCrcy
WithholdingTaxPercent C_EG_StRpAggrgdWhldgTaxItem WithholdingTaxPercent
WhldgTaxAmtInCoCodeCrcy C_EG_StRpAggrgdWhldgTaxItem WhldgTaxAmtInCoCodeCrcy
WhldgTaxAmtInTransacCrcy C_EG_StRpAggrgdWhldgTaxItem WhldgTaxAmtInTransacCrcy
AmountInTransactionCurrency C_EG_StRpAggrgdWhldgTaxItem AmountInTransactionCurrency Pt Crcy Amt
AmountInLocalCurrency C_EG_StRpAggrgdWhldgTaxItem AmountInLocalCurrency Local Crcy Amt
BusinessPartner C_EG_StRpAggrgdWhldgTaxItem BusinessPartner Issuing Authority
BusinessPartnerName C_EG_StRpAggrgdWhldgTaxItem Name Zone name
BusinessPartnerNumber C_EG_StRpAggrgdWhldgTaxItem BusinessPartnerNumber
Debtor C_EG_StRpAggrgdWhldgTaxItem Debtor Debtor
Creditor C_EG_StRpAggrgdWhldgTaxItem Creditor Supplier
NameelseendasName
Country C_EG_StRpAggrgdWhldgTaxItem Country Venue: Ctry/Reg
ItemIsReportingRelevant
SupplierRecipientType C_EG_StRpAggrgdWhldgTaxItem SupplierRecipientType
CashDiscountAmtInCoCodeCrcy Discount CashDiscountAmtInCoCodeCrcy Discount Amt
ExchangeRate
BPTaxNumberelseendasBPTaxNumber
BPTaxNumberelseendasBPTaxLongNumber
DocumentReferenceID C_EG_StRpAggrgdWhldgTaxItem DocumentReferenceID Reference
TransactionCurrencyendasForeignCurrency
BPTaxType TaxNum2 BPTaxType Category

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 C_EG_StRpWhldgTaxItemCube.
-- 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.
-- Parameters: P_FromReportingDate : fis_budat, P_ToReportingDate : fis_budat

CREATE VIEW C_EG_StRpWhldgTaxItemCube AS
SELECT
  WHTItem.CompanyCode AS CompanyCode,
  WHTItem.AccountingDocument AS AccountingDocument,
  WHTItem.FiscalYear AS FiscalYear,
  WHTItem.WithholdingTaxType AS WithholdingTaxType,
  WHTItem.StatryRptgEntity AS StatryRptgEntity,
  WHTItem.StatryRptCategory AS StatryRptCategory,
  WHTItem.StatryRptRunID AS StatryRptRunID,
  cast ('' as farp_buzei) AS AccountingDocumentItem,
  WHTItem.ReportingDate AS ReportingDate,
  WHTItem.ReportingDate AS WithholdingTaxReportingDate,
  concat(concat(concat(concat(substring(WHTItem.ReportingDate,7,2),'.') ,substring(WHTItem.ReportingDate,5,2)),'.') ,substring(WHTItem.ReportingDate,1,4)) as ReportingDateAsText AS ReportingDate14asReportingDateAsText,
  WHTItem.FiscalPeriod AS FiscalPeriod,
  WHTItem.DocumentDate AS DocumentDate,
  WHTItem.ClearingDate AS ClearingDate,
  WHTItem.PostingDate AS PostingDate,
  case when Discount.CashDiscountAmtInCoCodeCrcy = 0.00 or Discount.CashDiscountAmtInCoCodeCrcy is null then '' else concat(concat(concat(concat(substring(WHTItem.ReportingDate,7,2),'.') ,substring(WHTItem.ReportingDate,5,2)),'.') ,substring(WHTItem.ReportingDate,1,4)) end as PostingDateAsText AS ReportingDate14endasPostingDateAsText,
  WHTItem.WithholdingTaxCode AS WithholdingTaxCode,
  WHTItem.OfficialWhldgTaxCode AS OfficialWhldgTaxCode,
  WHTItem.TransactionCurrency AS TransactionCurrency,
  WHTItem.ReportingCurrency AS ReportingCurrency,
  WHTItem.AmountInCompanyCodeCurrency AS AmountInCompanyCodeCurrency,
  WHTItem.WhldgTaxBaseAmtInCoCodeCrcy AS WhldgTaxBaseAmtInCoCodeCrcy,
  WHTItem.WhldgTaxBaseAmtInTransacCrcy AS WhldgTaxBaseAmtInTransacCrcy,
  WHTItem.WithholdingTaxPercent AS WithholdingTaxPercent,
  WHTItem.WhldgTaxAmtInCoCodeCrcy AS WhldgTaxAmtInCoCodeCrcy,
  WHTItem.WhldgTaxAmtInTransacCrcy AS WhldgTaxAmtInTransacCrcy,
  WHTItem.AmountInTransactionCurrency AS AmountInTransactionCurrency,
  WHTItem.AmountInLocalCurrency AS AmountInLocalCurrency,
  WHTItem.BusinessPartner AS BusinessPartner,
  WHTItem.Name AS BusinessPartnerName,
  WHTItem.BusinessPartnerNumber AS BusinessPartnerNumber,
  WHTItem.Debtor AS Debtor,
  WHTItem.Creditor AS Creditor,
  case when (TaxNum2.BPTaxType = 'EG4') then WHTItem.Name else '' end as Name AS NameelseendasName,
  WHTItem.Country AS Country,
  coalesce( WHTItem.ItemIsReportingRelevant, '' ) AS ItemIsReportingRelevant,
  WHTItem.SupplierRecipientType AS SupplierRecipientType,
  Discount.CashDiscountAmtInCoCodeCrcy AS CashDiscountAmtInCoCodeCrcy,
  cast(abs(WHTItem.ExchangeRate)as fis_absolute_exchangerate preserving type) AS ExchangeRate,
  case when ( TaxNum1.BPTaxType = 'EG2' ) then TaxNum1.BPTaxNumber else '' end as BPTaxNumber AS BPTaxNumberelseendasBPTaxNumber,
  case when ( TaxNum2.BPTaxType = 'EG4' ) then TaxNum2.BPTaxNumber else '' end as BPTaxLongNumber AS BPTaxNumberelseendasBPTaxLongNumber,
  WHTItem.DocumentReferenceID AS DocumentReferenceID,
  case when WHTItem.TransactionCurrency = 'EGP' then cast ('' as waers_frgn) else WHTItem.TransactionCurrency end as ForeignCurrency AS TransactionCurrencyendasForeignCurrency,
  TaxNum2.BPTaxType AS BPTaxType
FROM C_EG_StRpAggrgdWhldgTaxItem AS WHTItem
;