C_MassMaintCapShftSqncWeeklyVH is a Consumption CDS View that provides data about "Shift Sequence Weekly" in SAP S/4HANA. It reads from 1 data source (I_MassMaintCapShiftSequence) and exposes 41 fields with key fields ShiftGrouping, ShiftSequence, ShiftNumber. It has 2 associations to related views. It is exposed through 1 OData service (UI_WORKCENTERCAPLIST_02). It is used in 1 Fiori application: Mass Maintenance Of Work Center Capacities.
The application is used to perform a mass create of interval for selected work center capacities. As a Production Planner, you must manage the capacities of multiple work centers to meet future demands. When you foresee a spike in demand, you can create multiple intervals for a few or all capacities that belong to the work centers in a production line/Work Center group. Intervals can be created for both working and non-working days. Within the given interval, you can create shifts for a single day and allow it to repeat on a daily, weekly or monthly basis. On the other hand, you could also create weekly shifts. You can then define a shift order by either assigning existing shift sequences or create your own custom shift definitions. While creating intervals, you can choose to override the existing factory calendar and make edits to Utilization and number of capacities.
Mass Maintenance Of Work Center Capacities
Business Role: Production Planner
With this app, you can perform a mass create of interval for selected work center capacities. As a Production Planner, you must manage the capacities of multiple work centers to meet future demands. When you foresee a spike in demand, you can create multiple intervals for a few or all capacities that belong to the work centers in a production line/Work Center group. Intervals can be created for both working and non-working days. Within the given interval, you can create shifts for a single day and allow it to repeat on a daily, weekly or monthly basis. On the other hand, you could also create weekly shifts. You can then define a shift order by either assigning existing shift sequences or create your own custom shift definitions. While creating intervals, you can choose to override the existing factory calendar and make edits to Utilization and number of capacities.
Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.
-- Derived SQL interpretation of CDS view C_MassMaintCapShftSqncWeeklyVH.-- Reconstructed from parsed metadata (data sources, associations, fields).-- SAP annotations are omitted and the structure is reformulated as SQL;-- this is a functional approximation, not the verbatim SAP source. Some join-- conditions may be unavailable and a few CDS constructs are kept as-is.-- Parameters: P_IntervalStartDate : endda, P_IntervalEndDate : begdaCREATE VIEW C_MassMaintCapShftSqncWeeklyVH ASSELECT
_seq.ShiftGrouping AS ShiftGrouping,
_seq.ShiftSequence AS ShiftSequence,
_seq.ShiftNumber AS ShiftNumber,
_Text[1:Language=$session.system_language].ShiftSequenceName AS ShiftSequenceName,
_seq.ShiftDay1DefID AS ShiftDay1DefID,
_Def[1:ShiftDefinition=ShiftDay1DefID and ShiftGrouping=ShiftGrouping and ShiftStartDate <= $parameters.P_IntervalStartDate and ShiftEndDate >= $parameters.P_IntervalEndDate ].ShiftStartTime AS ShiftDay1StartTime,
_Def[1:ShiftDefinition=ShiftDay1DefID and ShiftGrouping=ShiftGrouping and ShiftStartDate <= $parameters.P_IntervalStartDate and ShiftEndDate >= $parameters.P_IntervalEndDate ].ShiftEndTime AS ShiftDay1EndTime,
_Def[1:ShiftDefinition=ShiftDay1DefID and ShiftGrouping=ShiftGrouping and ShiftStartDate <= $parameters.P_IntervalStartDate and ShiftEndDate >= $parameters.P_IntervalEndDate ].OperatingDurationInSeconds AS ShiftDay1OpgDurn,
cast(0 as abap.int4(10)) AS ShiftDay1BreakDurn,
_seq.ShiftDay2DefID AS ShiftDay2DefID,
_Def[1:ShiftDefinition=ShiftDay2DefID and ShiftGrouping=ShiftGrouping and ShiftStartDate <= $parameters.P_IntervalStartDate and ShiftEndDate >= $parameters.P_IntervalEndDate ].ShiftStartTime AS ShiftDay2StartTime,
_Def[1:ShiftDefinition=ShiftDay2DefID and ShiftGrouping=ShiftGrouping and ShiftStartDate <= $parameters.P_IntervalStartDate and ShiftEndDate >= $parameters.P_IntervalEndDate ].ShiftEndTime AS ShiftDay2EndTime,
_Def[1:ShiftDefinition=ShiftDay2DefID and ShiftGrouping=ShiftGrouping and ShiftStartDate <= $parameters.P_IntervalStartDate and ShiftEndDate >= $parameters.P_IntervalEndDate ].OperatingDurationInSeconds AS ShiftDay2OpgDurn,
cast(0 as abap.int4(10)) AS ShiftDay2BreakDurn,
_seq.ShiftDay3DefID AS ShiftDay3DefID,
_Def[1:ShiftDefinition=ShiftDay3DefID and ShiftGrouping=ShiftGrouping and ShiftStartDate <= $parameters.P_IntervalStartDate and ShiftEndDate >= $parameters.P_IntervalEndDate ].ShiftStartTime AS ShiftDay3StartTime,
_Def[1:ShiftDefinition=ShiftDay3DefID and ShiftGrouping=ShiftGrouping and ShiftStartDate <= $parameters.P_IntervalStartDate and ShiftEndDate >= $parameters.P_IntervalEndDate ].ShiftEndTime AS ShiftDay3EndTime,
_Def[1:ShiftDefinition=ShiftDay3DefID and ShiftGrouping=ShiftGrouping and ShiftStartDate <= $parameters.P_IntervalStartDate and ShiftEndDate >= $parameters.P_IntervalEndDate ].OperatingDurationInSeconds AS ShiftDay3OpgDurn,
cast(0 as abap.int4(10)) AS ShiftDay3BreakDurn,
_seq.ShiftDay4DefID AS ShiftDay4DefID,
_Def[1:ShiftDefinition=ShiftDay4DefID and ShiftGrouping=ShiftGrouping and ShiftStartDate <= $parameters.P_IntervalStartDate and ShiftEndDate >= $parameters.P_IntervalEndDate ].ShiftStartTime AS ShiftDay4StartTime,
_Def[1:ShiftDefinition=ShiftDay4DefID and ShiftGrouping=ShiftGrouping and ShiftStartDate <= $parameters.P_IntervalStartDate and ShiftEndDate >= $parameters.P_IntervalEndDate ].ShiftEndTime AS ShiftDay4EndTime,
_Def[1:ShiftDefinition=ShiftDay4DefID and ShiftGrouping=ShiftGrouping and ShiftStartDate <= $parameters.P_IntervalStartDate and ShiftEndDate >= $parameters.P_IntervalEndDate ].OperatingDurationInSeconds AS ShiftDay4OpgDurn,
cast(0 as abap.int4(10)) AS ShiftDay4BreakDurn,
_seq.ShiftDay5DefID AS ShiftDay5DefID,
_Def[1:ShiftDefinition=ShiftDay5DefID and ShiftGrouping=ShiftGrouping and ShiftStartDate <= $parameters.P_IntervalStartDate and ShiftEndDate >= $parameters.P_IntervalEndDate ].ShiftStartTime AS ShiftDay5StartTime,
_Def[1:ShiftDefinition=ShiftDay5DefID and ShiftGrouping=ShiftGrouping and ShiftStartDate <= $parameters.P_IntervalStartDate and ShiftEndDate >= $parameters.P_IntervalEndDate ].ShiftEndTime AS ShiftDay5EndTime,
_Def[1:ShiftDefinition=ShiftDay5DefID and ShiftGrouping=ShiftGrouping and ShiftStartDate <= $parameters.P_IntervalStartDate and ShiftEndDate >= $parameters.P_IntervalEndDate ].OperatingDurationInSeconds AS ShiftDay5OpgDurn,
cast(0 as abap.int4(10)) AS ShiftDay5BreakDurn,
_seq.ShiftDay6DefID AS ShiftDay6DefID,
_Def[1:ShiftDefinition=ShiftDay6DefID and ShiftGrouping=ShiftGrouping and ShiftStartDate <= $parameters.P_IntervalStartDate and ShiftEndDate >= $parameters.P_IntervalEndDate ].ShiftStartTime AS ShiftDay6StartTime,
_Def[1:ShiftDefinition=ShiftDay6DefID and ShiftGrouping=ShiftGrouping and ShiftStartDate <= $parameters.P_IntervalStartDate and ShiftEndDate >= $parameters.P_IntervalEndDate ].ShiftEndTime AS ShiftDay6EndTime,
_Def[1:ShiftDefinition=ShiftDay6DefID and ShiftGrouping=ShiftGrouping and ShiftStartDate <= $parameters.P_IntervalStartDate and ShiftEndDate >= $parameters.P_IntervalEndDate ].OperatingDurationInSeconds AS ShiftDay6OpgDurn,
cast(0 as abap.int4(10)) AS ShiftDay6BreakDurn,
_seq.ShiftDay7DefID AS ShiftDay7DefID,
_Def[1:ShiftDefinition=ShiftDay7DefID and ShiftGrouping=ShiftGrouping and ShiftStartDate <= $parameters.P_IntervalStartDate and ShiftEndDate >= $parameters.P_IntervalEndDate ].ShiftStartTime AS ShiftDay7StartTime,
_Def[1:ShiftDefinition=ShiftDay7DefID and ShiftGrouping=ShiftGrouping and ShiftStartDate <= $parameters.P_IntervalStartDate and ShiftEndDate >= $parameters.P_IntervalEndDate ].ShiftEndTime AS ShiftDay7EndTime,
_Def[1:ShiftDefinition=ShiftDay7DefID and ShiftGrouping=ShiftGrouping and ShiftStartDate <= $parameters.P_IntervalStartDate and ShiftEndDate >= $parameters.P_IntervalEndDate ].OperatingDurationInSeconds AS ShiftDay7OpgDurn,
cast(0 as abap.int4(10)) AS ShiftDay7BreakDurn,
casewhen ShiftDay1DefID != '' then _Def[1:ShiftDefinition=ShiftDay1DefID and ShiftGrouping=ShiftGrouping and ShiftStartDate <= $parameters.P_IntervalStartDate and ShiftEndDate >= $parameters.P_IntervalEndDate ].ShiftStartTime when ShiftDay2DefID != '' then _Def[1:ShiftDefinition=ShiftDay2DefID and ShiftGrouping=ShiftGrouping and ShiftStartDate <= $parameters.P_IntervalStartDate and ShiftEndDate >= $parameters.P_IntervalEndDate ].ShiftStartTime when ShiftDay3DefID != '' then _Def[1:ShiftDefinition=ShiftDay3DefID and ShiftGrouping=ShiftGrouping and ShiftStartDate <= $parameters.P_IntervalStartDate and ShiftEndDate >= $parameters.P_IntervalEndDate ].ShiftStartTime when ShiftDay4DefID != '' then _Def[1:ShiftDefinition=ShiftDay4DefID and ShiftGrouping=ShiftGrouping and ShiftStartDate <= $parameters.P_IntervalStartDate and ShiftEndDate >= $parameters.P_IntervalEndDate ].ShiftStartTime when ShiftDay5DefID != '' then _Def[1:ShiftDefinition=ShiftDay5DefID and ShiftGrouping=ShiftGrouping and ShiftStartDate <= $parameters.P_IntervalStartDate and ShiftEndDate >= $parameters.P_IntervalEndDate ].ShiftStartTime when ShiftDay6DefID != '' then _Def[1:ShiftDefinition=ShiftDay6DefID and ShiftGrouping=ShiftGrouping and ShiftStartDate <= $parameters.P_IntervalStartDate and ShiftEndDate >= $parameters.P_IntervalEndDate ].ShiftStartTime when ShiftDay7DefID != '' then _Def[1:ShiftDefinition=ShiftDay7DefID and ShiftGrouping=ShiftGrouping and ShiftStartDate <= $parameters.P_IntervalStartDate and ShiftEndDate >= $parameters.P_IntervalEndDate ].ShiftStartTime elsecast('000000' as abap.tims) endas ShiftStartTime AS timsendasShiftStartTime,
casewhen ShiftDay1DefID != '' then _Def[1:ShiftDefinition=ShiftDay1DefID and ShiftGrouping=ShiftGrouping and ShiftStartDate <= $parameters.P_IntervalStartDate and ShiftEndDate >= $parameters.P_IntervalEndDate ].ShiftEndTime when ShiftDay2DefID != '' then _Def[1:ShiftDefinition=ShiftDay2DefID and ShiftGrouping=ShiftGrouping and ShiftStartDate <= $parameters.P_IntervalStartDate and ShiftEndDate >= $parameters.P_IntervalEndDate ].ShiftEndTime when ShiftDay3DefID != '' then _Def[1:ShiftDefinition=ShiftDay3DefID and ShiftGrouping=ShiftGrouping and ShiftStartDate <= $parameters.P_IntervalStartDate and ShiftEndDate >= $parameters.P_IntervalEndDate ].ShiftEndTime when ShiftDay4DefID != '' then _Def[1:ShiftDefinition=ShiftDay4DefID and ShiftGrouping=ShiftGrouping and ShiftStartDate <= $parameters.P_IntervalStartDate and ShiftEndDate >= $parameters.P_IntervalEndDate ].ShiftEndTime when ShiftDay5DefID != '' then _Def[1:ShiftDefinition=ShiftDay5DefID and ShiftGrouping=ShiftGrouping and ShiftStartDate <= $parameters.P_IntervalStartDate and ShiftEndDate >= $parameters.P_IntervalEndDate ].ShiftEndTime when ShiftDay6DefID != '' then _Def[1:ShiftDefinition=ShiftDay6DefID and ShiftGrouping=ShiftGrouping and ShiftStartDate <= $parameters.P_IntervalStartDate and ShiftEndDate >= $parameters.P_IntervalEndDate ].ShiftEndTime when ShiftDay7DefID != '' then _Def[1:ShiftDefinition=ShiftDay7DefID and ShiftGrouping=ShiftGrouping and ShiftStartDate <= $parameters.P_IntervalStartDate and ShiftEndDate >= $parameters.P_IntervalEndDate ].ShiftEndTime elsecast('000000' as abap.tims) endas ShiftEndTime AS timsendasShiftEndTime
FROM I_MassMaintCapShiftSequence AS _seq
LEFTOUTERJOIN I_MassMaintCapShiftDefinition AS _Def ON _seq.ShiftGrouping = _Def.ShiftGrouping -- association [0..*]LEFTOUTERJOIN I_ShiftSequenceText AS _Text ON ShiftGrouping = _Text.ShiftGrouping AND ShiftSequence = _Text.ShiftSequence -- association [0..*]
;