I_CAPACITY

CDS View

Capacity Header

I_CAPACITY is a CDS View in S/4HANA. Capacity Header. It contains 23 fields. 23 CDS views read from this table.

CDS Views using this table (23)

ViewTypeJoinVDMDescription
A_WorkCenterCapacity view from COMPOSITE Capacity Header
C_SchedProdnProdVersDay view inner CONSUMPTION Production Versions In Day Bucket
C_SchedProdnProdVersShift view inner CONSUMPTION Production versions in shift bucket
C_SchedProdnProdVersWeek view inner CONSUMPTION Production Versions In Week Bucket
C_WorkCenterObjPgCap view from CONSUMPTION Work Center Object Page Capacities
C_WrkCtrMntrReschedule view inner CONSUMPTION Monitor Work Center Reschedule
I_CapacityBySemanticKey view_entity from BASIC Capacity Header by Semantic Key
I_CapacityStdVH view from COMPOSITE Capacity Header
I_CapEvalByAreaOfRespy view inner COMPOSITE Work Center By Area Of Responsibility
I_EvaltCapWrkCtrGrpAreaOfRespy view_entity inner COMPOSITE Work Center Group Area of Responsibility
I_SchedProdnWrkCtrSqncVH view inner COMPOSITE Work Ctr Filter for dispatch by sequence
I_WorkCenterCapacity_2 view from COMPOSITE Work Center Capacity
I_WorkCenterCapacityInterval_2 view from COMPOSITE Work Center Capacity Intervals 2
I_WorkCenterPooledCapacity view from COMPOSITE Work Center Pooled Capacity
I_WrkCtrCapByAreaOfRespy view inner COMPOSITE Work Center By Area Of Responsibility
P_ALTERNATEPRODLINES view inner BASIC
P_CapacityHeaderDef view from COMPOSITE
P_NUMBEROFSOS view inner BASIC
P_RSHWCHeaderCapacity_Cache view from CONSUMPTION
P_RSHWCHeaderCapacityDefinitio view from CONSUMPTION
P_RSHWorkCenterCapacityChange view inner CONSUMPTION Work Center Capacity Change
P_WorkCenterCapacityBase view from COMPOSITE
P_WrkCtrMntrSchedInterval view left_outer CONSUMPTION Work Center Intervals

Fields (23)

KeyField CDS FieldsUsed in Views
KEY Capacity Capacity 3
KEY CapacityInternalID CapacityInternalID 6
KEY Plant Plant 5
CapacityActiveVersion CapacityActiveVersion 6
CapacityBaseQtyUnit CapacityBaseQtyUnit 1
CapacityBreakDuration CapacityBreakDuration 4
CapacityCategoryCode CapacityCategoryCode 3
CapacityEndTime CapacityEndTime 3
CapacityHasIndivCapacities CapacityHasIndivCapacities 1
CapacityIsExcldFrmLongTermPlng CapacityIsExcldFrmLongTermPlng 1
CapacityIsFinite CapacityIsFinite 1
CapacityIsPooled CapacityIsPooled 3
CapacityLastChangeDateTime CapacityLastChangeDateTime 2
CapacityNumberOfCapacities CapacityNumberOfCapacities 4
CapacityPlanUtilizationPercent CapacityPlanUtilizationPercent 4
CapacityQuantityUnit CapacityQuantityUnit 2
CapacityResponsiblePlanner CapacityResponsiblePlanner 5
CapacityStartTime CapacityStartTime 3
CapIsUsedInMultiOperations CapIsUsedInMultiOperations 1
CapOverloadThresholdInPercent CapOverloadThresholdInPercent 1
FactoryCalendar FactoryCalendar 1
ReferencedCapacityInternalID ReferencedCapacityInternalID 2
ShiftGroup ShiftGroup 4
@AbapCatalog.sqlViewName: 'IPPCAPACITY'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@Analytics.dataCategory: #DIMENSION
@Analytics.dataExtraction.enabled: true
@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, #EXTRACTION_DATA_SOURCE]
@ObjectModel.representativeKey: 'CapacityInternalID'
@ObjectModel.semanticKey: ['Capacity']
@ObjectModel.usageType: {serviceQuality: #A, sizeCategory: #S, dataClass: #MASTER}
@VDM.lifecycle.contract.type: #PUBLIC_LOCAL_API
@VDM.viewType: #BASIC
@EndUserText.label: 'Capacity Header'

define view I_Capacity
  as select from kako as kako
  association [1..1] to I_Plant                 as _Plant                      on  $projection.Plant = _Plant.Plant
  association [0..*] to I_CapacityText          as _Text                       on  $projection.CapacityInternalID = _Text.CapacityInternalID
  association [0..*] to I_CapacityText          as _ReferencedCapacityText     on  $projection.ReferencedCapacityInternalID = _ReferencedCapacityText.CapacityInternalID
  association [1..1] to I_CapacityCategory      as _CapacityCategory           on  $projection.CapacityCategoryCode = _CapacityCategory.CapacityCategoryCode
  association [0..1] to I_CapacityRespPlanner   as _CapacityResponsiblePlanner on  $projection.CapacityResponsiblePlanner = _CapacityResponsiblePlanner.CapacityResponsiblePlanner
  association [0..1] to I_FactoryCalendar       as _FactoryCalendar            on  $projection.FactoryCalendar = _FactoryCalendar.FactoryCalendar
  association [0..1] to I_ShiftGrouping         as _ShiftGrouping              on  $projection.ShiftGroup = _ShiftGrouping.ShiftGrouping
  association [0..1] to I_UnitOfMeasure         as _CapacityQuantityUnit       on  $projection.CapacityQuantityUnit = _CapacityQuantityUnit.UnitOfMeasure
  association [0..1] to I_UnitOfMeasure         as _CapacityBaseQtyUnit        on  $projection.CapacityBaseQtyUnit = _CapacityBaseQtyUnit.UnitOfMeasure
  association [0..1] to I_Capacity              as _Capacity                   on  $projection.ReferencedCapacityInternalID = _Capacity.CapacityInternalID
  association [0..1] to I_CapacityBySemanticKey as _CapacityBySemanticKey      on  $projection.Plant    = _CapacityBySemanticKey.Plant
                                                                               and $projection.Capacity = _CapacityBySemanticKey.Capacity
  association [0..1] to I_UnitOfMeasure         as _ResourceTimeBufferUnit     on  $projection.ResourceTimeBufferUnit = _ResourceTimeBufferUnit.UnitOfMeasure
  association [0..1] to I_UnitOfMeasure         as _RsceMaxOverlapDurationUnit on  $projection.ResourceMaxOverlapDurationUnit = _RsceMaxOverlapDurationUnit.UnitOfMeasure
  association [0..1] to I_UnitOfMeasure         as _RsceStorageQuantityUnit    on  $projection.RsceStorageQuantityUnit = _RsceStorageQuantityUnit.UnitOfMeasure
{
      // Key

      @ObjectModel.text.association: '_Text'
  key kako.kapid                                     as CapacityInternalID,

      // Semantic Key

      @ObjectModel.foreignKey.association: '_Plant'
      kako.werks                                     as Plant,
      @ObjectModel.foreignKey.association: '_CapacityBySemanticKey'
      kako.name                                      as Capacity,

      // Attributes

      @ObjectModel.foreignKey.association: '_CapacityCategory'
      cast(kako.kapar as pph_kapart preserving type) as CapacityCategoryCode,
      kako.versa                                     as CapacityActiveVersion,
      kako.kapter                                    as CapacityIsFinite,
      kako.poolk                                     as CapacityIsPooled,
      kako.mehr                                      as CapacityHasIndivCapacities,
      kako.kaplpl                                    as CapacityIsExcldFrmLongTermPlng,
      kako.aznor                                     as CapacityNumberOfCapacities,
      @ObjectModel.foreignKey.association: '_CapacityResponsiblePlanner'
      kako.planr                                     as CapacityResponsiblePlanner,
      kako.ngrad                                     as CapacityPlanUtilizationPercent,
      kako.pause                                     as CapacityBreakDuration,
      cast(kako.kapavo as pph_kzavo preserving type) as CapIsUsedInMultiOperations,
      @ObjectModel.text.association: '_ReferencedCapacityText'
      @ObjectModel.foreignKey.association: '_Capacity'
      cast(kako.refid  as pph_refid preserving type) as ReferencedCapacityInternalID,
      kako.ueberlast                                 as CapOverloadThresholdInPercent,

      // Assignments

      @ObjectModel.foreignKey.association: '_FactoryCalendar'
      kako.kalid                                     as FactoryCalendar,
      --    @ObjectModel.foreignKey.association: '_AuthorizationGroup'
      kako.brgru                                     as AuthorizationGroup,
      @ObjectModel.foreignKey.association: '_ShiftGrouping'
      kako.mosid                                     as ShiftGroup,

      // Times (internal in seconds)

      @API.element.releaseState: #DEPRECATED
      @API.element.successor: 'CapacityStartTimeID'
      kako.begzt                                     as CapacityStartTime,
      @API.element.releaseState: #DEPRECATED
      @API.element.successor: 'CapacityEndTimeID'
      kako.endzt                                     as CapacityEndTime,
      cast(kako.begzt as vdm_begzt preserving type)  as CapacityStartTimeID,
      cast(kako.endzt as vdm_endzt preserving type)  as CapacityEndTimeID,

      // Unit of Measures

      @Semantics.unitOfMeasure: true
      kako.kapeh                                     as CapacityQuantityUnit,
      @Semantics.unitOfMeasure: true
      kako.meins                                     as CapacityBaseQtyUnit,

      @Semantics.systemDateTime.lastChangedAt: true
      case when kako.lastchange_datetime = 0 or kako.lastchange_datetime is null then
           cast('20190101120000' as kap_lastchange_datetime)
      else kako.lastchange_datetime end              as CapacityLastChangeDateTime,

      // Advanced Planning / APO Resource Attributes

      //=============================================

      kako.type                                      as ResourceType,
      kako.restype                                   as ResourceCategory,

      // - Planning Params / General

      kako.lc_days_minus                             as RsceValidityStartOffsetInDays,
      kako.lc_days_plus                              as RsceValidityEndOffsetInDays,
      kako.sort                                      as ResourceSortText,
      kako.finity_level                              as ResourceFinitenessLevel,
      kako.is_bottleneck                             as ResourceIsBottleNeck,

      // - Planning Params / Time-Oriented

      kako.sync_start                                as RsceOverlappingActiesSync,
      @Semantics.quantity.unitOfMeasure : 'ResourceTimeBufferUnit'
      kako.buffertime                                as ResourceTimeBufferQuantity,
      kako.buffertime_unit                           as ResourceTimeBufferUnit,
      @Semantics.quantity.unitOfMeasure : 'ResourceMaxOverlapDurationUnit'
      kako.min_overlap                               as ResourceMaxOverlapDuration,
      kako.min_overlap_unit                          as ResourceMaxOverlapDurationUnit,
      kako.campaign_ppds                             as ResourceIsCampaignRelevant,

      // - Standard Capacity

      kako.tstream_external                          as RsceShiftsAndBreaksAreDerived,

      // - Standard Capacity / PPDS-Period Capacity

      kako.pp_def_buckets                            as PPDSPeriodSourceType,
      kako.pp_bucket_schema                          as PPDSPeriodDurationSchema,
      kako.pp_bucket_fact                            as PPDSPeriodTimeRatioInPercent,
      kako.mix_plan_type                             as PPDSCapacitySupplyTimeCategory,

      // - Storage Chars

      kako.storage_capable                           as RsceHasStorCharcs,
      //      @AbapCatalog.foreignKey.screenCheck : true

      kako.dim_storage                               as RsceStorageQuantityDimension,
      kako.storage_unit                              as RsceStorageQuantityUnit,

      @Semantics.quantity.unitOfMeasure : 'RsceStorageQuantityUnit'
      kako.min_storage                               as RsceStorageMinProductionQty,
      @Semantics.quantity.unitOfMeasure : 'RsceStorageQuantityUnit'
      kako.max_storage                               as RsceStorageMaxQuantity,
      kako.storage_to_zero                           as RsceStorIsZeroOnNoFillPurity,
      kako.campaign_ppo                              as CapacityPlanningPeriodLotSize,
      kako.multiple_product                          as RsceStorHasMltplProds,
      @Semantics.quantity.unitOfMeasure : 'RsceStorageQuantityUnit'
      kako.zero_threshold                            as RsceStorZeroFillPurityThldQty,

      //Associations

      _CapacityCategory,
      _FactoryCalendar,
      _Plant,
      _Text,
      _ReferencedCapacityText,
      _CapacityResponsiblePlanner,
      _ShiftGrouping,
      _CapacityQuantityUnit,
      _CapacityBaseQtyUnit,
      _CapacityBySemanticKey,
      _Capacity,
      _ResourceTimeBufferUnit,
      _RsceMaxOverlapDurationUnit,
      _RsceStorageQuantityUnit
};
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"KAKO"
],
"ASSOCIATED":
[
"I_CAPACITYBYSEMANTICKEY",
"I_CAPACITYCATEGORY",
"I_CAPACITYRESPPLANNER",
"I_CAPACITYTEXT",
"I_FACTORYCALENDAR",
"I_PLANT",
"I_SHIFTGROUPING",
"I_UNITOFMEASURE"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/