P_EBWIP_MaterialCostEstimate1

DDL: P_EBWIP_MATERIALCOSTESTIMATE1 SQL: PEBWIPMTCSTEST1 Type: view COMPOSITE

P_EBWIP_MaterialCostEstimate1 is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (I_FinancialPlanningEntryItem) and exposes 20 fields with key fields CompanyCode, Plant, ProducedProduct, PlanningCategory, CostEstimateValidityStartDate.

Data Sources (1)

SourceAliasJoin Type
I_FinancialPlanningEntryItem I_FinancialPlanningEntryItem from

Parameters (2)

NameTypeDefault
P_KeyDate fins_fperiod_enddate
P_Ledger fins_ledger

Annotations (7)

NameValueLevelField
AbapCatalog.sqlViewName PEBWIPMTCSTEST1 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

Fields (20)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode CompanyCode
KEY Plant Plant
KEY ProducedProduct ProducedProduct
KEY PlanningCategory PlanningCategory
KEY CostEstimateValidityStartDate CostEstimateValidityStartDate
KEY CostEstimateValidityEndDate CostEstimateValidityEndDate
KEY CostingLotSize CostingLotSize
KEY LotSizeUnit LotSizeUnit
KEY IsLotSizeIndependent IsLotSizeIndependent
KeyDate
AmountInGlobalCurrency
AmountInCompanyCodeCurrency
AmountInFreeDefinedCurrency1
AmountInFreeDefinedCurrency2
AmountInFreeDefinedCurrency3
AmountInFreeDefinedCurrency4
AmountInFreeDefinedCurrency5
AmountInFreeDefinedCurrency6
AmountInFreeDefinedCurrency7
AmountInFreeDefinedCurrency8
@AbapCatalog.sqlViewName: 'PEBWIPMTCSTEST1'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey:true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE

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

define view P_EBWIP_MaterialCostEstimate1
  with parameters
    @Environment.systemField: #SYSTEM_DATE
    P_KeyDate : fins_fperiod_enddate,
    P_Ledger  : fins_ledger
  as select from I_FinancialPlanningEntryItem
{
  key CompanyCode,
  key Plant,
  key ProducedProduct,
  key PlanningCategory,
  key CostEstimateValidityStartDate,
  key CostEstimateValidityEndDate,
  key CostingLotSize,
  key LotSizeUnit,
  key IsLotSizeIndependent,

      :P_KeyDate                        as KeyDate,

      sum(AmountInGlobalCurrency)       as AmountInGlobalCurrency,
      sum(AmountInCompanyCodeCurrency)  as AmountInCompanyCodeCurrency,
      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
       Ledger                     = :P_Ledger
  and  ProducedProduct            is not initial
  and  OrderID                    is initial
  and( // Debit

       ControllingDebitCreditCode = 'H'
    or ControllingDebitCreditCode = 'S'
  )
group by
  CompanyCode,
  Plant,
  ProducedProduct,
  PlanningCategory,
  CostEstimateValidityStartDate,
  CostEstimateValidityEndDate,
  CostingLotSize,
  LotSizeUnit,
  IsLotSizeIndependent
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_FINANCIALPLANNINGENTRYITEM"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/