P_RSHCalWorkDaysTimeFrame

DDL: P_RSHCALWORKDAYSTIMEFRAME SQL: PRSHCALWDTF Type: view CONSUMPTION Package: RSH_CDS_WC_CONSUMPTION

Return the calendar work days within the required time frame

P_RSHCalWorkDaysTimeFrame is a Consumption CDS View that provides data about "Return the calendar work days within the required time frame" in SAP S/4HANA. It reads from 1 data source (P_RSHCALWORKDAYS) and exposes 4 fields with key fields Client, WorkDays, CalendarDate, CapacityInternalID. Part of development package RSH_CDS_WC_CONSUMPTION.

Data Sources (1)

SourceAliasJoin Type
P_RSHCALWORKDAYS P_RSHCALWORKDAYS from

Parameters (2)

NameTypeDefault
P_StartDate datum
P_EndDate datum

Annotations (5)

NameValueLevelField
AbapCatalog.sqlViewName PRSHCALWDTF view
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.private true view
VDM.viewType #CONSUMPTION view
ClientHandling.algorithm #SESSION_VARIABLE view

Fields (4)

KeyFieldSource TableSource FieldDescription
KEY Client isWorkDay client
KEY WorkDays isWorkDay WorkDays
KEY CalendarDate isWorkDay CalendarDate
KEY CapacityInternalID isWorkDay CapacityInternalID
@AbapCatalog.sqlViewName: 'PRSHCALWDTF'
@AccessControl.authorizationCheck: #NOT_REQUIRED
@VDM.private: true
@VDM.viewType: #CONSUMPTION
@ClientHandling.algorithm: #SESSION_VARIABLE

/*
CONTRACT**********************************************************************************************************************

Name:                       Calander Working Days for requested timeframe
Specification:              This view retrieves the information on whether each day is a working day(1) or not(0), as per the 
                            factory calander
Requires:                   NA
Ensures:                    Information on whether each day is a working day(1) or not(0), as per the factory calander
                            is returned. Only the days within the requested timeframe is included in the results
Owners:                     PRP
Contributors:               CK, AN
Unit Test required Y/N:     Yes

END OF CONTRACT***************************************************************************************************************
*/

define view P_RSHCalWorkDaysTimeFrame

  with parameters
    P_StartDate : datum,
    P_EndDate   : datum
  
  as select from P_RSHCALWORKDAYS( P_SAPClient : $session.client ) isWorkDay 
{

      key isWorkDay.client as Client,
      key isWorkDay.WorkDays as WorkDays,
      key isWorkDay.CalendarDate as CalendarDate,
      key isWorkDay.CapacityInternalID as CapacityInternalID
}

where isWorkDay.CalendarDate >= $parameters.P_StartDate and isWorkDay.CalendarDate <= $parameters.P_EndDate