I_RevenueVariance

DDL: I_REVENUEVARIANCE SQL: IREVVAR Type: view COMPOSITE

Revenue Variance

I_RevenueVariance is a Composite CDS View that provides data about "Revenue Variance" in SAP S/4HANA. It reads from 1 data source (P_RevenueVarianceCnstnt) and exposes 68 fields with key fields Ledger, SourceLedger, CompanyCode, FiscalYear, AccountingDocument. It has 1 association to related views.

Data Sources (1)

SourceAliasJoin Type
P_RevenueVarianceCnstnt P_RevenueVarianceCnstnt from

Parameters (10)

NameTypeDefault
P_Interval1Year fis_gjahr
P_Interval1FromFiscalPeriod fis_period_from
P_Interval1ToFiscalPeriod fis_period_to
P_Interval1Type fac_revvar_interval_type
P_Interval2Year fis_gjahr
P_Interval2FromFiscalPeriod fis_period_from
P_Interval2ToFiscalPeriod fis_period_to
P_Interval2Type fac_revvar_interval_type
P_PlanningCategory fac_revvar_pln_category
P_QuantityType fac_revvar_quantity_type

Associations (1)

CardinalityTargetAliasCondition
[0..1] I_Division _Division $projection.OrganizationDivision = _Division.Division

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName IREVVAR view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #CHECK view
EndUserText.label Revenue Variance view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.dataClass #MIXED view
VDM.viewType #COMPOSITE view
ClientHandling.algorithm #SESSION_VARIABLE view
AccessControl.personalData.blocking #REQUIRED view

Fields (68)

KeyFieldSource TableSource FieldDescription
KEY Ledger Ledger Ledger
KEY SourceLedger SourceLedger Source Ledger
KEY CompanyCode CompanyCode Receiver Company Code
KEY FiscalYear FiscalYear G/L Fiscal Year
KEY AccountingDocument AccountingDocument Journal Entry
KEY LedgerGLLineItem LedgerGLLineItem Journal Entry Item
KEY FinancialPlanningReqTransSqnc FinancialPlanningReqTransSqnc Request TSN
KEY FinancialPlanningDataPacket FinancialPlanningDataPacket Data packet number
KEY FinancialPlanningEntryItem FinancialPlanningEntryItem
KEY GLAccountHierarchy GLAccountHierarchy
FiscalPeriod FiscalPeriod Tax period
PlanningCategory PlanningCategory Plan Category
BaseUnit BaseUnit Unit of Measure
BaseUnitName
LedgerName
CompanyCodeName _CompanyCode CompanyCodeName Company Name
CompanyCodeCurrency CompanyCodeCurrency Local Currency
Country _CustomerSupplierCountry Country Venue: Ctry/Reg
CountryName
SalesOrganization SalesOrganization Sales Organization
SalesOrganizationName
Division OrganizationDivision Org. Division
DivisionName
DistributionChannel DistributionChannel RefDistCh-Cust/Mat.
DistributionChannelName
Customer Customer Sold-to Party
CustomerName _Customer CustomerName Name of Customer
Material SoldMaterial Product Sold
MaterialName
MaterialGroup MaterialGroup Product Group
MaterialGroupName
CustomerGroup CustomerGroup Customer Group
GLAccount GLAccount General Ledger
ProfitCenter ProfitCenter Profit Center
CustomerSupplierCountry CustomerSupplierCountry Customer or Supplier Country/Region
CustomerSupplierIndustry CustomerSupplierIndustry Industry
DocumentDate DocumentDate Journal Entry Date
RatioUnit
GlobalCurrency GlobalCurrency GM Billing Element: Global Currency
CostSourceUnit CostSourceUnit
CustomerAccountGroup _Customer CustomerAccountGroup Account group
AuthorizationGroup _Customer AuthorizationGroup AuthorizGroup
AccountingDocumentType AccountingDocumentType Journal Entry Type
_Customer _Customer
_GLAccountInCompanyCode _GLAccountInCompanyCode
_AccountingDocumentType _AccountingDocumentType
AssetClass AssetClass Asset Class
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
PostingDate PostingDate Posting Date for GR
Supplier Supplier Supplier
SalesDocument SalesDocument SD Document
OrderID OrderID Order ID
_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 I_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: IREVVAR
-- Parameters: P_Interval1Year : fis_gjahr, P_Interval1FromFiscalPeriod : fis_period_from, P_Interval1ToFiscalPeriod : fis_period_to, P_Interval1Type : fac_revvar_interval_type, P_Interval2Year : fis_gjahr, P_Interval2FromFiscalPeriod : fis_period_from, P_Interval2ToFiscalPeriod : fis_period_to, P_Interval2Type : fac_revvar_interval_type, P_PlanningCategory : fac_revvar_pln_category, P_QuantityType : fac_revvar_quantity_type

CREATE VIEW I_RevenueVariance AS
SELECT
  Ledger,
  SourceLedger,
  CompanyCode,
  FiscalYear,
  AccountingDocument,
  LedgerGLLineItem,
  FinancialPlanningReqTransSqnc,
  FinancialPlanningDataPacket,
  FinancialPlanningEntryItem,
  GLAccountHierarchy,
  FiscalPeriod,
  PlanningCategory,
  BaseUnit,
  _BaseUnit._Text[1:Language = $session.system_language].UnitOfMeasureName AS BaseUnitName,
  _Ledger._Text[1:Language = $session.system_language].LedgerName AS LedgerName,
  _CompanyCode.CompanyCodeName AS CompanyCodeName,
  CompanyCodeCurrency,
  _CustomerSupplierCountry.Country AS Country,
  _CustomerSupplierCountry._Text[1:Language = $session.system_language].CountryName AS CountryName,
  SalesOrganization,
  _SalesOrganization._Text[1:Language = $session.system_language].SalesOrganizationName AS SalesOrganizationName,
  OrganizationDivision AS Division,
  _Division._Text[1:Language = $session.system_language].DivisionName AS DivisionName,
  DistributionChannel,
  _DistributionChannel._Text[1:Language = $session.system_language].DistributionChannelName AS DistributionChannelName,
  Customer,
  _Customer.CustomerName AS CustomerName,
  SoldMaterial AS Material,
  _SoldMaterial._Text[1:Language = $session.system_language].MaterialName AS MaterialName,
  MaterialGroup,
  _MaterialGroup._Text[1:Language = $session.system_language].MaterialGroupName AS MaterialGroupName,
  CustomerGroup,
  GLAccount,
  ProfitCenter,
  CustomerSupplierCountry,
  CustomerSupplierIndustry,
  DocumentDate,
  cast('%' as msehi) AS RatioUnit,
  GlobalCurrency,
  CostSourceUnit,
  _Customer.CustomerAccountGroup AS CustomerAccountGroup,
  _Customer.AuthorizationGroup AS AuthorizationGroup,
  AccountingDocumentType,
  AssetClass,
  FinancialAccountType,
  FunctionalArea,
  BusinessArea,
  Segment,
  ControllingArea,
  CostCenter,
  Plant,
  ValuationArea,
  OrganizationDivision,
  ServiceDocument,
  ServiceDocumentType,
  PostingDate,
  Supplier,
  SalesDocument,
  OrderID
FROM P_RevenueVarianceCnstnt
LEFT OUTER JOIN I_Division AS _Division ON OrganizationDivision = _Division.Division  -- association [0..1]
;