C_FinStatisticalKeyFigure

DDL: C_FINSTATISTICALKEYFIGURE SQL: CFIFINSSKF Type: view CONSUMPTION

Read Statistical Key Figures per Period

C_FinStatisticalKeyFigure is a Consumption CDS View that provides data about "Read Statistical Key Figures per Period" in SAP S/4HANA. It reads from 2 data sources (I_Ledger, I_FinStatisticalKeyFigureItem) and exposes 38 fields.

Data Sources (2)

SourceAliasJoin Type
I_Ledger _Ledger inner
I_FinStatisticalKeyFigureItem I_FinStatisticalKeyFigureItem from

Annotations (13)

NameValueLevelField
AbapCatalog.preserveKey true view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.sqlViewName CFIFINSSKF view
AccessControl.authorizationCheck #CHECK view
EndUserText.label Read Statistical Key Figures per Period view
VDM.viewType #CONSUMPTION view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #D view
ClientHandling.algorithm #SESSION_VARIABLE view
AbapCatalog.buffering.status #NOT_ALLOWED view
Metadata.ignorePropagatedAnnotations true view
Analytics.settings.maxProcessingEffort #HIGH view

Fields (38)

KeyFieldSource TableSource FieldDescription
Ledger I_FinStatisticalKeyFigureItem Ledger
CompanyCode CompanyCode
StatisticalKeyFigure StatisticalKeyFigure
FiscalYear FiscalYear
FiscalPeriod FiscalPeriod
PlanningCategory PlanningCategory
ControllingArea ControllingArea
FiscalYearPeriod
StatisticalKeyFigureCategory StatisticalKeyFigureCategory
Segment Segment
ProfitCenter ProfitCenter
CostCenter CostCenter
StatisticalKeyFigQtyUnit
IntmdStatisticalKeyFigFixedQty IntmdStatisticalKeyFigFixedQty
IntmdStatisticalKeyFigSumQty IntmdStatisticalKeyFigSumQty
StstclKeyFigIntmdActlFixedQty StstclKeyFigIntmdActlFixedQty
StstclKeyFigIntmdPlanFixedQty StstclKeyFigIntmdPlanFixedQty
StstclKeyFigIntmdActlSumQty StstclKeyFigIntmdActlSumQty
StstclKeyFigIntmdPlanSumQty StstclKeyFigIntmdPlanSumQty
StatisticalKeyFigFixedQty
StatisticalKeyFigSumQty
StatisticalKeyFigureQuantity
StatisticalKeyFigPlanFixedQty
StatisticalKeyFigPlanSumQty
StatisticalKeyFigurePlanQty
FunctionalArea FunctionalArea
BusinessArea BusinessArea
OrderID OrderID
CostCtrActivityType CostCtrActivityType
WBSElement WBSElement
ControllingBusTransacType ControllingBusTransacType
ControllingObject ControllingObject
ControllingObjectClass ControllingObjectClass
SalesOrder SalesOrder
SalesOrderItem SalesOrderItem
ServiceDocumentType ServiceDocumentType
ServiceDocument ServiceDocument
ServiceDocumentItem ServiceDocumentItem
@AbapCatalog.preserveKey: true
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.sqlViewName: 'CFIFINSSKF'
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Read Statistical Key Figures per Period'
@VDM.viewType: #CONSUMPTION
//@OData.publish: true


@ObjectModel.usageType.sizeCategory: #XXL
@ObjectModel.usageType.dataClass:  #MIXED
@ObjectModel.usageType.serviceQuality: #D

@ClientHandling.algorithm: #SESSION_VARIABLE
@AbapCatalog.buffering.status: #NOT_ALLOWED
@Metadata.ignorePropagatedAnnotations: true 

@AccessControl.personalData.blocking: #('TRANSACTIONAL_DATA')
@Analytics.settings.maxProcessingEffort: #HIGH

define view C_FinStatisticalKeyFigure
  
as select from I_FinStatisticalKeyFigureItem

inner join I_Ledger as _Ledger on I_FinStatisticalKeyFigureItem.Ledger = _Ledger.Ledger
                               and _Ledger.IsLeadingLedger = 'X'

{

// P_FinStatisticalKeyFigureItem.rldnr as Ledger,


// P_FinStatisticalKeyFigureItem.rbukrs as CompanyCode, 


// P_FinStatisticalKeyFigureItem.RYEAR as FiscalYear, 


// P_FinStatisticalKeyFigureItem.poper as FiscalPeriod,


// cast(P_FinStatisticalKeyFigureItem.FISCYEARPER as abap.char(8)) as  FiscalYearPeriod,

//P_FinStatisticalKeyFigureItem.FISCYEARPER as FiscalYearPeriod, 


// P_FinStatisticalKeyFigureItem.periv as FiscalYearVariant,


// P_FinStatisticalKeyFigureItem.stagr as StatisticalKeyFigure,


// @Semantics.unitOfMeasure:true

// cast( P_FinStatisticalKeyFigureItem.runit as fis_ui_seinh preserving type ) as StatisticalKeyFigQtyUnit,

//P_FinStatisticalKeyFigureItem.runit as StatisticalKeyFigQtyUnit,

 
// @DefaultAggregation: #SUM

// @Semantics.quantity.unitOfMeasure: 'StatisticalKeyFigQtyUnit'

// cast( cast(P_FinStatisticalKeyFigureItem.msl as abap.quan(23,3)) as fis_ui_smexxx_long ) as StatisticalKeyFigureQuantity,

 //P_FinStatisticalKeyFigureItem.msl as StatisticalKeyFigureQuantity, 


//P_FinStatisticalKeyFigureItem.grtyp as StatisticalKeyFigureCategory, 


//P_FinStatisticalKeyFigureItem.category as PlanningCategory,


//P_FinStatisticalKeyFigureItem.rcntr as CostCenter,


//P_FinStatisticalKeyFigureItem.prctr as ProfitCenter,

 
//P_FinStatisticalKeyFigureItem.rfarea as FunctionalArea,


//P_FinStatisticalKeyFigureItem.rbusa as BusinessArea,


//P_FinStatisticalKeyFigureItem.kokrs as ControllingArea,


//P_FinStatisticalKeyFigureItem.segment as Segment,

 
//P_FinStatisticalKeyFigureItem.vorgn as ControllingBusTransacType,


//P_FinStatisticalKeyFigureItem.accasty as AccountAssignmentType,

 
// P_FinStatisticalKeyFigureItem.logsys as LogicalSystem,                      


//P_FinStatisticalKeyFigureItem.objnr as ControllingObject,

  
// P_FinStatisticalKeyFigureItem.hrkft as ControllingKeySubNumber,                          


//P_FinStatisticalKeyFigureItem.scope as ControllingObjectClass,

 
//P_FinStatisticalKeyFigureItem.aufnr as OrderID,

 
//P_FinStatisticalKeyFigureItem.autyp as OrderCategory,


//@ObjectModel.foreignKey.association: '_WBSElementInternalID' 

//P_FinStatisticalKeyFigureItem.ps_psp_pnr as WBSElementInternalID,      // we use the external WBSElement (at time of posting)

 
//P_FinStatisticalKeyFigureItem.ps_posid as WBSElement,                   

 
//P_FinStatisticalKeyFigureItem.ps_prj_pnr as ProjectInternalID,        // not filled   

// 

//P_FinStatisticalKeyFigureItem.ps_pspid as Project,                   // not filled

 
//P_FinStatisticalKeyFigureItem.nplnr as ProjectNetwork,                // not filled   

// 

//P_FinStatisticalKeyFigureItem.nplnr_vorgn as RelatedNetworkActivity,  // not filled

// 

//P_FinStatisticalKeyFigureItem.prznr as BusinessProcess,               // not in cloud

// 

//P_FinStatisticalKeyFigureItem.kstrg as CostObject,                    // not in cloud

 
//P_FinStatisticalKeyFigureItem.rfund as Fund,

 
//P_FinStatisticalKeyFigureItem.rgrant_nbr as GrantID,


//P_FinStatisticalKeyFigureItem.lstar as CostCtrActivityType


//GLRecordType,

  I_FinStatisticalKeyFigureItem.Ledger as Ledger,
  CompanyCode,
  StatisticalKeyFigure,
  FiscalYear,
  FiscalPeriod,
  PlanningCategory,
  ControllingArea,
//FiscalYearVariant,

  cast(FiscalYearPeriod as abap.char(8)) as  FiscalYearPeriod,
  StatisticalKeyFigureCategory,
  Segment,
  ProfitCenter,
  CostCenter,

  @Semantics.unitOfMeasure:true
  cast( I_FinStatisticalKeyFigureItem.StatisticalKeyFigQtyUnit as fis_ui_seinh preserving type ) as StatisticalKeyFigQtyUnit,
 
//-----------------------------------------------------------------//

// the Intermediate Quantities are needed only for calculation

  @Consumption.hidden: true
  @Semantics.quantity.unitOfMeasure: 'StatisticalKeyFigQtyUnit'
  IntmdStatisticalKeyFigFixedQty,

  @Consumption.hidden: true
  @Semantics.quantity.unitOfMeasure: 'StatisticalKeyFigQtyUnit'
  IntmdStatisticalKeyFigSumQty,

  @Consumption.hidden: true
  @Semantics.quantity.unitOfMeasure: 'StatisticalKeyFigQtyUnit'
  StstclKeyFigIntmdActlFixedQty,

  @Consumption.hidden: true
  @Semantics.quantity.unitOfMeasure: 'StatisticalKeyFigQtyUnit'
  StstclKeyFigIntmdPlanFixedQty,

  @Consumption.hidden: true
  @Semantics.quantity.unitOfMeasure: 'StatisticalKeyFigQtyUnit'
  StstclKeyFigIntmdActlSumQty,

  @Consumption.hidden: true
  @Semantics.quantity.unitOfMeasure: 'StatisticalKeyFigQtyUnit'
  StstclKeyFigIntmdPlanSumQty,

  //-----------------------------------------------------------------//

// Quantity = Fixed Quantity + Sum Quantity


@DefaultAggregation: #SUM
@Semantics.quantity.unitOfMeasure: 'StatisticalKeyFigQtyUnit'
cast( cast( IntmdStatisticalKeyFigFixedQty  as abap.quan(23,3)) as fis_ui_fixed_smexxx_long ) as StatisticalKeyFigFixedQty,

@DefaultAggregation: #SUM
@Semantics.quantity.unitOfMeasure: 'StatisticalKeyFigQtyUnit'
cast( cast( IntmdStatisticalKeyFigSumQty as abap.quan(23,3)) as fis_ui_sum_smexxx_long ) as StatisticalKeyFigSumQty,


@DefaultAggregation: #SUM
@Semantics.quantity.unitOfMeasure: 'StatisticalKeyFigQtyUnit'
cast( cast(StatisticalKeyFigSumQty + StatisticalKeyFigFixedQty as abap.quan(23,3)) as fis_ui_smexxx_long ) as StatisticalKeyFigureQuantity,

//-----------------------------------------------------------------//

// Actual Quantity = Actual Fixed Quantity + Actual Sum Quantity


//@DefaultAggregation: #SUM

//@Semantics.quantity.unitOfMeasure: 'StatisticalKeyFigQtyUnit'

//cast( cast(StstclKeyFigIntmdActlFixedQty as abap.quan(23,3)) as fis_ui_act_fixed_smexxx_long ) as StatisticalKeyFigActlFixedQty,



//@DefaultAggregation: #SUM

//@Semantics.quantity.unitOfMeasure: 'StatisticalKeyFigQtyUnit'

//cast( cast(StstclKeyFigIntmdActlSumQty as abap.quan(23,3)) as fis_ui_act_sum_smexxx_long ) as StatisticalKeyFigActlSumQty,


//@DefaultAggregation: #SUM

//@Semantics.quantity.unitOfMeasure: 'StatisticalKeyFigQtyUnit'

//cast( cast(StatisticalKeyFigActlFixedQty + StatisticalKeyFigActlSumQty as abap.quan(23,3)) as fis_ui_act_smexxx_long ) as StatisticalKeyFigureActlQty,

    
//-----------------------------------------------------------------//

// Plan Quantity = Plan Fixed Quantity + Plan Sum Quantity


@DefaultAggregation: #SUM
@Semantics.quantity.unitOfMeasure: 'StatisticalKeyFigQtyUnit'
cast( cast(StstclKeyFigIntmdPlanFixedQty as abap.quan(23,3)) as fis_ui_pln_fixed_smexxx_long ) as StatisticalKeyFigPlanFixedQty,


@DefaultAggregation: #SUM
@Semantics.quantity.unitOfMeasure: 'StatisticalKeyFigQtyUnit'
cast( cast(StstclKeyFigIntmdPlanSumQty as abap.quan(23,3)) as fis_ui_pln_sum_smexxx_long ) as StatisticalKeyFigPlanSumQty,


@DefaultAggregation: #SUM
@Semantics.quantity.unitOfMeasure: 'StatisticalKeyFigQtyUnit'
cast( cast(StatisticalKeyFigPlanFixedQty + StatisticalKeyFigPlanSumQty as abap.quan(23,3)) as fis_ui_pln_smexxx_long ) as StatisticalKeyFigurePlanQty,
    
//-----------------------------------------------------------------------------------------------        


FunctionalArea,
BusinessArea,

//BudgetPeriod,


OrderID,                                                       //KB31N


CostCtrActivityType,

//I_FinStatisticalKeyFigureItem.WBSElementInternalID,         // we use the external WBSElement (at time of posting)

WBSElement,                                                   //KB31N


//I_FinStatisticalKeyFigureItem.ProjectInternalID,            // not filled      

//

//I_FinStatisticalKeyFigureItem.Project,                      // not filled


ControllingBusTransacType,

//AccountAssignmentType,


ControllingObject,
ControllingObjectClass,

//OrderCategory


//I_FinStatisticalKeyFigureItem.ProjectNetwork,                // not filled but in KB31N

//

//I_FinStatisticalKeyFigureItem.RelatedNetworkActivity,        //  not filled but in KB31N


//I_FinStatisticalKeyFigureItem.BusinessProcess,               // not in cloud but in KB31N

//

//I_FinStatisticalKeyFigureItem.CostObject,                    // not in cloud but in KB31N


//Fund,

//GrantID,


SalesOrder,                                                    //KB31N

SalesOrderItem,                                                //KB31N 


ServiceDocumentType,                                           //KB31N

ServiceDocument,                                               //KB31N

ServiceDocumentItem                                            //KB31N


//STATISTICALKEYFIGUREITEM,

//ISSPECIALPERIOD,


}  
where IsSpecialPeriod <> 'X'