I_WORKCENTERCAPACITY

CDS View

Work Center Capacity

I_WORKCENTERCAPACITY is a CDS View in S/4HANA. Work Center Capacity. It contains 8 fields. 18 CDS views read from this table.

CDS Views using this table (18)

ViewTypeJoinVDMDescription
A_WorkCenterAllCapacity_2 view from COMPOSITE Capacity Assignment Version 2
C_CapEvalWcUtilznInEvalHorzn view from CONSUMPTION WorkCenter Utilizn in Evaluation Horizon
C_MaintWrkCtrAssignedPersonVH view union CONSUMPTION Value Help for Maint. Work Center Person
C_MassMaintCapWrkCtrFltr view_entity from CONSUMPTION Filter for Capacity List
C_MassMaintCapWrkCtrGrpUsage view_entity from CONSUMPTION Work center group where used
I_CapEvalByAreaOfRespy view inner COMPOSITE Work Center By Area Of Responsibility
I_MassMaintCapAreaOfRespy view_entity from COMPOSITE Work Center Capacity AOR
I_MassMaintCapAreaOfRespy view_entity union COMPOSITE Work Center Capacity AOR
I_WorkCenterAllCapacity view from COMPOSITE All Capacities of Work Center
I_WorkCenterCapacity_2 view inner COMPOSITE Work Center Capacity
I_WrkCntrAssociatedCapForPlnr view from COMPOSITE Associated Capacity for planner
I_WrkCntrAssociatedCapForPlnr view cross COMPOSITE Associated Capacity for planner
P_CapEvalCalcdField view from CONSUMPTION
P_RSHWorkCenterCapacityChange view left_outer CONSUMPTION Work Center Capacity Change
P_WorkCenterAllCapacity view from COMPOSITE
P_WorkCenterCalcdField view from COMPOSITE
P_WrkCtrMntrSchedValidShift view from CONSUMPTION Work Center Valid Shifts
P_WrkCtrMntrSchedValidShift view union_all CONSUMPTION Work Center Valid Shifts

Fields (8)

KeyField CDS FieldsUsed in Views
KEY CapacityCategoryAllocation CapacityCategoryAllocation 7
KEY CapacityInternalID AssociatedCapacityInternalID,CapacityInternalID 8
KEY WorkCenterInternalID AssociatedWorkCenterInternalID,WorkCenterInternalID 8
KEY WorkCenterTypeCode WorkCenterTypeCode 6
CapacityCategoryCode CapacityCategoryCode 3
Plant Plant 4
WorkCenter AssociatedWorkCenter,WorkCenter 6
WorkCenterCategoryCode WorkCenterCategoryCode 2
@AbapCatalog.sqlViewName: 'IPPWRKCNTRCAP'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@AccessControl.personalData.blocking: #NOT_REQUIRED
@AccessControl.privilegedAssociations: ['_LastChangedByUser'] 
@Analytics.dataCategory: #DIMENSION
@ClientHandling.algorithm: #SESSION_VARIABLE
@Metadata.allowExtensions: true
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.modelingPattern: #ANALYTICAL_DIMENSION
@ObjectModel.supportedCapabilities: [#ANALYTICAL_DIMENSION, #CDS_MODELING_ASSOCIATION_TARGET, #SQL_DATA_SOURCE, #CDS_MODELING_DATA_SOURCE]
@ObjectModel.representativeKey: 'CapacityCategoryAllocation'
@ObjectModel.usageType: {serviceQuality: #B, sizeCategory: #S, dataClass: #MASTER}
@VDM.lifecycle.contract.type: #PUBLIC_LOCAL_API
@VDM.viewType: #BASIC
@EndUserText.label: 'Work Center Capacity'

/*+[hideWarning] { "IDS" : [ "CALCULATED_FIELD_CHECK" ]  } */
define view I_WorkCenterCapacity
  as select from crca as crca

  association [1..1] to I_Plant                   as _Plant                   on  $projection.Plant = _Plant.Plant
  association [1..1] to I_WorkCenter              as _WorkCenter              on  $projection.WorkCenterTypeCode   = _WorkCenter.WorkCenterTypeCode
                                                                              and $projection.WorkCenterInternalID = _WorkCenter.WorkCenterInternalID
  association [0..1] to I_WorkCenterBySemanticKey as _WorkCenterBySemanticKey on  $projection.Plant      = _WorkCenterBySemanticKey.Plant
                                                                              and $projection.WorkCenter = _WorkCenterBySemanticKey.WorkCenter
  association [1..1] to I_WorkCenterType          as _WorkCenterTypeCode      on  $projection.WorkCenterTypeCode = _WorkCenterTypeCode.WorkCenterTypeCode
  association [1..1] to I_WorkCenterCategory      as _WorkCenterCategory      on  $projection.WorkCenterCategoryCode = _WorkCenterCategory.WorkCenterCategoryCode
  association [1..1] to I_Capacity                as _Capacity                on  $projection.CapacityInternalID = _Capacity.CapacityInternalID
  association [1..1] to I_CapacityCategory        as _CapacityCategory        on  $projection.CapacityCategoryCode = _CapacityCategory.CapacityCategoryCode
  association [0..1] to I_User                    as _LastChangedByUser       on  $projection.LastChangedByUser = _LastChangedByUser.UserID
  association [0..1] to I_UnitOfMeasure           as _CapacityQuantityUnit    on  $projection.CapacityQuantityUnit = _CapacityQuantityUnit.UnitOfMeasure
  association [0..1] to I_WorkCenterResponsible   as _WorkCenterResponsible   on  $projection.Plant                 = _WorkCenterResponsible.Plant
                                                                              and $projection.WorkCenterResponsible = _WorkCenterResponsible.WorkCenterResponsible 
{
      // Key

      @ObjectModel.foreignKey.association: '_WorkCenter'
  key crca.objid                                        as WorkCenterInternalID,
      @ObjectModel.foreignKey.association: '_WorkCenterTypeCode'
  key crca.objty                                        as WorkCenterTypeCode,
  key cast(crca.canum as pph_cr_capnum preserving type) as CapacityCategoryAllocation,

      // Admin

      @Semantics.systemDate.lastChangedAt: true
      crca.aedat_kapa                                   as LastChangeDate,
      @Semantics.user.lastChangedBy: true
      crca.aenam_kapa                                   as LastChangedByUser,

      // Assignments

      @ObjectModel.foreignKey.association: '_Plant'
      _WorkCenter.Plant                                 as Plant,
      @ObjectModel.foreignKey.association: '_WorkCenterBySemanticKey'
      _WorkCenter.WorkCenter                            as WorkCenter,
      @ObjectModel.foreignKey.association: '_WorkCenterCategory'
      _WorkCenter.WorkCenterCategoryCode                as WorkCenterCategoryCode,
      @ObjectModel.foreignKey.association: '_WorkCenterResponsible'
      _WorkCenter.WorkCenterResponsible                 as WorkCenterResponsible,
      @ObjectModel.foreignKey.association: '_Capacity'
      crca.kapid                                        as CapacityInternalID,
      @ObjectModel.foreignKey.association: '_CapacityCategory'
      _Capacity.CapacityCategoryCode                    as CapacityCategoryCode,
      _Capacity.Capacity                                as Capacity,

      // Formula IDs

      crca.fork1                                        as SetupCapRequirementFormula,
      crca.fork2                                        as ProcgCapRequirementFormula,
      crca.fork3                                        as TeardownCapRequirementFormula,
      crca.forkn                                        as OtherCapRequirementFormula,

      // Dates

      @Semantics.businessDate.from
      crca.begda                                        as ValidityStartDate,
      @Semantics.businessDate.to
      crca.endda                                        as ValidityEndDate,

      // UoM

      @Semantics.unitOfMeasure: true
      _Capacity.CapacityQuantityUnit                    as CapacityQuantityUnit,

      case 
        when _WorkCenter.WorkCenterLastChangeDateTime is null 
        then cast(dats_tims_to_tstmp(cast('20190101' as dats), cast('120000'as tims), 'UTC', $session.client, 'NULL') as cr_lastchange_datetime)
        else _WorkCenter.WorkCenterLastChangeDateTime 
      end                                               as WorkCenterLastChangeDateTime,

      // Associations

      _Plant,
      _WorkCenter,
      _WorkCenterBySemanticKey,
      _WorkCenterTypeCode,
      _WorkCenterCategory,
      _Capacity,
      _CapacityCategory,
      _CapacityQuantityUnit,
      _LastChangedByUser,
      _WorkCenterResponsible
};