C_RevenueVariance

DDL: C_REVENUEVARIANCE SQL: CREVVAR Type: view CONSUMPTION

Revenue Variance

C_RevenueVariance is a Consumption CDS View that provides data about "Revenue Variance" in SAP S/4HANA. It reads from 1 data source (I_RevenueVariance) and exposes 75 fields.

Data Sources (1)

SourceAliasJoin Type
I_RevenueVariance I_RevenueVariance from

Parameters (14)

NameTypeDefault
P_KeyDate datum
P_DisplayCurrency vdm_v_display_currency
P_RevenueComparisonVariant fac_revvar_comprn_type
P_FiscalYear fis_gjahr
P_PlanningCategory fac_revvar_pln_category
P_QuantityType fac_revvar_quantity_type
P_Interval1Year fis_gjahr
P_Interval2Year fis_gjahr
P_Interval1FromFiscalPeriod fins_fiscalperiod
P_Interval2FromFiscalPeriod fins_fiscalperiod
P_Interval1ToFiscalPeriod fins_fiscalperiod
P_Interval2ToFiscalPeriod fins_fiscalperiod
P_Interval1Type fac_revvar_interval_type
P_Interval2Type fac_revvar_interval_type

Annotations (11)

NameValueLevelField
AbapCatalog.sqlViewName CREVVAR view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #CHECK view
EndUserText.label Revenue Variance view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.dataClass #MIXED view
VDM.viewType #CONSUMPTION view
ClientHandling.algorithm #SESSION_VARIABLE view
AccessControl.personalData.blocking #REQUIRED view
Metadata.allowExtensions true view

Fields (75)

KeyFieldSource TableSource FieldDescription
lookupEntityP_RevenueVariance
resultElementInterval1Year
resultElementInterval2Year
resultElementInterval1FromFiscalPeriod
resultElementInterval2FromFiscalPeriod
resultElementInterval1ToFiscalPeriod
resultElementInterval2ToFiscalPeriod
resultElementInterval1Type
resultElementInterval2Type
RevenueVarianceKPIName
RevenueVarianceKPIValue
RevenueVarianceKPIType
Material Material Vehicle Model
PlanningCategory Plan Category
CompanyCode CompanyCode Receiver Company Code
Ledger Ledger Ledger
Customer Customer Sold-to Party
SalesOrganization SalesOrganization Sales Organization
MaterialGroup MaterialGroup Product Group
CompanyCodeCurrency CompanyCodeCurrency Local Currency
FiscalPeriod FiscalPeriod Tax period
SourceLedger SourceLedger Source Ledger
FiscalYear FiscalYear G/L Fiscal Year
AccountingDocument AccountingDocument Journal Entry
LedgerGLLineItem LedgerGLLineItem Journal Entry Item
FinancialPlanningReqTransSqnc FinancialPlanningReqTransSqnc Request TSN
FinancialPlanningDataPacket FinancialPlanningDataPacket Data packet number
FinancialPlanningEntryItem FinancialPlanningEntryItem
GLAccountHierarchy
QuantityType
InputFiscalYear
InputPlanningCategory
RevenueComparisonVariant
Interval1Type
Interval2Type
DisplayCurrency
Interval1LineItemVolume Interval1LineItemVolume
trueasInterval1LineItemRevenue
Interval2LineItemVolume Interval2LineItemVolume
trueasInterval2LineItemRevenue
GlobalCurrency GlobalCurrency GM Billing Element: Global Currency
Country Country Venue: Ctry/Reg
CustomerGroup CustomerGroup Customer Group
ProfitCenter ProfitCenter Profit Center
GLAccount GLAccount General Ledger
CustomerSupplierCountry Customer or Supplier Country/Region
CustomerSupplierIndustry CustomerSupplierIndustry Industry
Division Division Internal Division ID
DistributionChannel DistributionChannel RefDistCh-Cust/Mat.
FinancialAccountType FinancialAccountType Fin. Account Type
FunctionalArea FunctionalArea Sendr Fctl Area
BusinessArea BusinessArea Business Area
Segment Segment Segment number
ControllingArea ControllingArea Controlling Area
CostCenter CostCenter Cost Center
Plant Plant Valuation Area
ValuationArea ValuationArea Valuation Area
OrganizationDivision OrganizationDivision Org. Division
ServiceDocument ServiceDocument Transaction ID
ServiceDocumentType ServiceDocumentType Transaction Type
AssetClass AssetClass Asset Class
PostingDate PostingDate Posting Date for GR
Supplier Supplier Supplier
SalesDocument SalesDocument SD Document
OrderID OrderID Order ID
AccountingDocumentType AccountingDocumentType Journal Entry Type
_GLAccountInCompanyCode _GLAccountInCompanyCode
_Customer _Customer
_AccountingDocumentType _AccountingDocumentType
_Supplier _Supplier
_CurrentProfitCenter _CurrentProfitCenter
_CurrentCostCenter _CurrentCostCenter
_SalesDocument _SalesDocument
_Order _Order
_ServiceDocument _ServiceDocument

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_RevenueVariance.
-- 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: CREVVAR
-- Parameters: P_KeyDate : datum, P_DisplayCurrency : vdm_v_display_currency, P_RevenueComparisonVariant : fac_revvar_comprn_type, P_FiscalYear : fis_gjahr, P_PlanningCategory : fac_revvar_pln_category, P_QuantityType : fac_revvar_quantity_type, P_Interval1Year : fis_gjahr, P_Interval2Year : fis_gjahr, P_Interval1FromFiscalPeriod : fins_fiscalperiod, P_Interval2FromFiscalPeriod : fins_fiscalperiod, P_Interval1ToFiscalPeriod : fins_fiscalperiod, P_Interval2ToFiscalPeriod : fins_fiscalperiod, P_Interval1Type : fac_revvar_interval_type, P_Interval2Type : fac_revvar_interval_type

CREATE VIEW C_RevenueVariance AS
SELECT
  lookupEntity: 'P_RevenueVariance' AS lookupEntityP_RevenueVariance,
  resultElement: 'Interval1Year' AS resultElementInterval1Year,
  resultElement: 'Interval2Year' AS resultElementInterval2Year,
  resultElement: 'Interval1FromFiscalPeriod' AS resultElementInterval1FromFiscalPeriod,
  resultElement: 'Interval2FromFiscalPeriod' AS resultElementInterval2FromFiscalPeriod,
  resultElement: 'Interval1ToFiscalPeriod' AS resultElementInterval1ToFiscalPeriod,
  resultElement: 'Interval2ToFiscalPeriod' AS resultElementInterval2ToFiscalPeriod,
  resultElement: 'Interval1Type' AS resultElementInterval1Type,
  resultElement: 'Interval2Type' AS resultElementInterval2Type,
  cast('' as fac_revvar_kpi_name) AS RevenueVarianceKPIName,
  cast(0 as fac_revvar_revenue) AS RevenueVarianceKPIValue,
  cast('' as fac_revvar_kpi_type) AS RevenueVarianceKPIType,
  Material,
  cast(PlanningCategory as fac_revvar_pln_category preserving type) AS PlanningCategory,
  CompanyCode,
  Ledger,
  Customer,
  SalesOrganization,
  MaterialGroup,
  CompanyCodeCurrency,
  FiscalPeriod,
  SourceLedger,
  FiscalYear,
  AccountingDocument,
  LedgerGLLineItem,
  FinancialPlanningReqTransSqnc,
  FinancialPlanningDataPacket,
  FinancialPlanningEntryItem,
  cast( GLAccountHierarchy as fis_fsv_hryid preserving type ) AS GLAccountHierarchy,
  cast(:P_QuantityType as fac_revvar_quantity_type) AS QuantityType,
  cast(:P_FiscalYear as fis_gjahr) AS InputFiscalYear,
  cast(:P_PlanningCategory as fac_revvar_pln_category) AS InputPlanningCategory,
  cast(:P_RevenueComparisonVariant as fac_revvar_comprn_type) AS RevenueComparisonVariant,
  cast(:P_Interval1Type as fac_revvar_interval_type) AS Interval1Type,
  cast(:P_Interval2Type as fac_revvar_interval_type) AS Interval2Type,
  cast(:P_DisplayCurrency as vdm_v_display_currency) AS DisplayCurrency,
  Interval1LineItemVolume,
  currency_conversion( amount => Interval1LineItemRevenue, source_currency => GlobalCurrency, target_currency => :P_DisplayCurrency, exchange_rate_date => :P_KeyDate, exchange_rate_type => 'M', round => #CDSBoolean.true, decimal_shift => #CDSBoolean.true, decimal_shift_back => #CDSBoolean.true ) as Interval1LineItemRevenue AS trueasInterval1LineItemRevenue,
  Interval2LineItemVolume,
  currency_conversion( amount => Interval2LineItemRevenue, source_currency => GlobalCurrency, target_currency => :P_DisplayCurrency, exchange_rate_date => :P_KeyDate, exchange_rate_type => 'M', round => #CDSBoolean.true, decimal_shift => #CDSBoolean.true, decimal_shift_back => #CDSBoolean.true ) as Interval2LineItemRevenue AS trueasInterval2LineItemRevenue,
  GlobalCurrency,
  Country,
  CustomerGroup,
  ProfitCenter,
  GLAccount,
  cast(CustomerSupplierCountry as fac_revvar_country_region preserving type ) AS CustomerSupplierCountry,
  CustomerSupplierIndustry,
  Division,
  DistributionChannel,
  FinancialAccountType,
  FunctionalArea,
  BusinessArea,
  Segment,
  ControllingArea,
  CostCenter,
  Plant,
  ValuationArea,
  OrganizationDivision,
  ServiceDocument,
  ServiceDocumentType,
  AssetClass,
  PostingDate,
  Supplier,
  SalesDocument,
  OrderID,
  AccountingDocumentType
FROM I_RevenueVariance
;