P_EBOC_Variance1

DDL: P_EBOC_VARIANCE1 SQL: PEBOCVARC1 Type: view COMPOSITE

P_EBOC_Variance1 is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (I_JournalEntryItem) and exposes 29 fields with key fields CompanyCode, ControllingArea, CostElement, BusinessTransactionType, ControllingDebitCreditCode.

Data Sources (1)

SourceAliasJoin Type
I_JournalEntryItem I_JournalEntryItem from

Parameters (4)

NameTypeDefault
P_OrderID fis_order_number
P_FromFiscalYearPeriod fis_jahrper
P_ToFiscalYearPeriod fis_jahrper
P_Ledger fins_ledger

Annotations (8)

NameValueLevelField
AbapCatalog.sqlViewName PEBOCVARC1 view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.viewType #COMPOSITE view
VDM.private true view
VDM.lifecycle.status #DEPRECATED view

Fields (29)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode CompanyCode
KEY ControllingArea ControllingArea
KEY CostElement
KEY BusinessTransactionType BusinessTransactionType
KEY ControllingDebitCreditCode ControllingDebitCreditCode
KEY OriginSenderObject OriginSenderObject
KEY OrderID OrderID
KEY OrderItem OrderItem
KEY AccountAssignmentType AccountAssignmentType
KEY PartnerAccountAssignment PartnerAccountAssignment
KEY PartnerAccountAssignmentType PartnerAccountAssignmentType
KEY PartnerCostCenter PartnerCostCenter
KEY PartnerCostCtrActivityType PartnerCostCtrActivityType
KEY PartnerBusinessProcess PartnerBusinessProcess
KEY PartnerOrder PartnerOrder_2
KEY UnitOfMeasure
KEY Material Material
KEY CostOriginGroup CostOriginGroup
AmountInCompanyCodeCurrency
AmountInGlobalCurrency
FixedAmountInGlobalCrcy
AmountInFreeDefinedCurrency1
AmountInFreeDefinedCurrency2
AmountInFreeDefinedCurrency3
AmountInFreeDefinedCurrency4
AmountInFreeDefinedCurrency5
AmountInFreeDefinedCurrency6
AmountInFreeDefinedCurrency7
AmountInFreeDefinedCurrency8
@AbapCatalog.sqlViewName: 'PEBOCVARC1'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE

@VDM.viewType: #COMPOSITE
@VDM.private: true

@VDM.lifecycle.status: #DEPRECATED

define view P_EBOC_Variance1
  with parameters
    P_OrderID              : fis_order_number,
    P_FromFiscalYearPeriod : fis_jahrper,
    P_ToFiscalYearPeriod   : fis_jahrper,
    P_Ledger               : fins_ledger
  as select from I_JournalEntryItem
{
  key CompanyCode,
  key ControllingArea,
  key cast(GLAccount as fis_racct)      as CostElement,
  key BusinessTransactionType,
  key ControllingDebitCreditCode,
  key OriginSenderObject,
  key OrderID,
  key OrderItem,
  key AccountAssignmentType,
  key PartnerAccountAssignment,
  key PartnerAccountAssignmentType,
  key PartnerCostCenter,
  key PartnerCostCtrActivityType,
  key PartnerBusinessProcess,
  key PartnerOrder_2                    as PartnerOrder,
  key cast(BaseUnit as meins)           as UnitOfMeasure,
  key Material,
  key CostOriginGroup,

      // Actual Amounts from ACDOCA

      sum(AmountInCompanyCodeCurrency)  as AmountInCompanyCodeCurrency,
      sum(AmountInGlobalCurrency)       as AmountInGlobalCurrency,
      sum(FixedAmountInGlobalCrcy)      as FixedAmountInGlobalCrcy,

      sum(AmountInFreeDefinedCurrency1) as AmountInFreeDefinedCurrency1,
      sum(AmountInFreeDefinedCurrency2) as AmountInFreeDefinedCurrency2,
      sum(AmountInFreeDefinedCurrency3) as AmountInFreeDefinedCurrency3,
      sum(AmountInFreeDefinedCurrency4) as AmountInFreeDefinedCurrency4,
      sum(AmountInFreeDefinedCurrency5) as AmountInFreeDefinedCurrency5,
      sum(AmountInFreeDefinedCurrency6) as AmountInFreeDefinedCurrency6,
      sum(AmountInFreeDefinedCurrency7) as AmountInFreeDefinedCurrency7,
      sum(AmountInFreeDefinedCurrency8) as AmountInFreeDefinedCurrency8
}
where
  (
       AccountAssignmentType      =  'OR'
    or AccountAssignmentType      =  'OP'
  )
  and  ControllingDebitCreditCode =  'A'
  and  BusinessTransactionType    =  'KOAE'
  and  PartnerOrder_2             <> :P_OrderID
  and  OrderID                    =  :P_OrderID
  and  Ledger                     =  :P_Ledger
  and  FiscalYearPeriod           >= :P_FromFiscalYearPeriod
  and  FiscalYearPeriod           <= :P_ToFiscalYearPeriod

group by
  CompanyCode,
  ControllingArea,
  GLAccount,
  BusinessTransactionType,
  ControllingDebitCreditCode,
  OriginSenderObject,
  OrderID,
  OrderItem,
  AccountAssignmentType,
  PartnerAccountAssignment,
  PartnerAccountAssignmentType,
  PartnerCostCenter,
  PartnerCostCtrActivityType,
  PartnerBusinessProcess,
  PartnerOrder_2,
  BaseUnit,
  Material,
  CostOriginGroup
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_JOURNALENTRYITEM"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/