P_WEEKLYPLNDINDEPRQMTHIST

CDS View

P_WEEKLYPLNDINDEPRQMTHIST is a CDS View in S/4HANA. It contains 3 fields. 1 CDS views read from this table.

CDS Views using this table (1)

ViewTypeJoinVDMDescription
P_WeeklyPlndIndepRqmtHistByDte view from CONSUMPTION

Fields (3)

KeyField CDS FieldsUsed in Views
AverageDailyUsage QuantityInBaseUnit 1
FirstDayOfWeekDate FirstDayOfWeekDate 1
LastDayOfWeekDate LastDayOfWeekDate 1
@AbapCatalog.sqlViewName: 'PWPIRHIST'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@VDM.viewType: #CONSUMPTION
@VDM.private: true

define view P_WeeklyPlndIndepRqmtHist
  as select from P_PlndIndepRqmtItemHist as _PlndIndReqHist
  association [0..1] to I_CalendarDate as _CalendarDate on $projection.DeliveryDate = _CalendarDate.CalendarDate
{
      //_PlndIndReqHist

  key Forecast,
  key ForecastYearMonth,
  key LastChangeDate,
  key LastChangeTime,
  key Material,
  key ProductionPlant,
  key MRPArea,
      ForecastQuantity,
      LastChangeDateTime,
      DeliveryDate,
      _CalendarDate.CalendarWeek,
      _CalendarDate.FirstDayOfWeekDate,
      dats_add_days(_CalendarDate.FirstDayOfWeekDate, 6, 'NULL')                           as LastDayOfWeekDate,
      division(  fltp_to_dec( _PlndIndReqHist.ForecastQuantity as abap.dec(10,0) ), 7, 3 ) as AverageDailyUsage
}
where
  ForecastPeriodMode = '2'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_CALENDARDATE",
"P_PLNDINDEPRQMTITEMHIST"
],
"ASSOCIATED":
[
"I_CALENDARDATE"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/