P_WorkCenterActivity1

DDL: P_WORKCENTERACTIVITY1 SQL: PWRKCNTRACT1 Type: view_entity COMPOSITE

P_WorkCenterActivity1 is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (I_StandardWorkFmlaParamGroup, I_WorkCenter) and exposes 59 fields with key fields WorkCenterInternalID, WorkCenterTypeCode.

Data Sources (2)

SourceAliasJoin Type
I_StandardWorkFmlaParamGroup tc21 inner
I_WorkCenter wrkctr from

Annotations (3)

NameValueLevelField
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.viewType #COMPOSITE view
VDM.private true view

Fields (59)

KeyFieldSource TableSource FieldDescription
KEY WorkCenterInternalID I_WorkCenter WorkCenterInternalID
KEY WorkCenterTypeCode I_WorkCenter WorkCenterTypeCode
WorkCenterCategoryCode I_WorkCenter WorkCenterCategoryCode
WorkCenter I_WorkCenter WorkCenter
Plant I_WorkCenter Plant
StandardWorkFormulaParamGroup I_WorkCenter StandardWorkFormulaParamGroup
StandardWorkFormulaParam1 I_StandardWorkFmlaParamGroup StandardWorkFormulaParam1
StandardWorkFormulaParam2 I_StandardWorkFmlaParamGroup StandardWorkFormulaParam2
StandardWorkFormulaParam3 I_StandardWorkFmlaParamGroup StandardWorkFormulaParam3
StandardWorkFormulaParam4 I_StandardWorkFmlaParamGroup StandardWorkFormulaParam4
StandardWorkFormulaParam5 I_StandardWorkFmlaParamGroup StandardWorkFormulaParam5
StandardWorkFormulaParam6 I_StandardWorkFmlaParamGroup StandardWorkFormulaParam6
CostCenterAllocation1 costctr1 CostCenterAllocation
ControllingArea1 costctr1 ControllingArea
CostCtrActivityType1 costctr1 CostCtrActivityType
ActivityDescOriginType1 costctr1 ActivityDescOriginType
CostCenterActivityAltvDescID1 costctr1 CostCenterActivityAltvDescID
ValidityStartDate1 costctr1 ValidityStartDate
ValidityEndDate1 costctr1 ValidityEndDate
CostCenterAllocation2 costctr2 CostCenterAllocation
ControllingArea2 costctr2 ControllingArea
CostCtrActivityType2 costctr2 CostCtrActivityType
ActivityDescOriginType2 costctr2 ActivityDescOriginType
CostCenterActivityAltvDescID2 costctr2 CostCenterActivityAltvDescID
ValidityStartDate2 costctr2 ValidityStartDate
ValidityEndDate2 costctr2 ValidityEndDate
CostCenterAllocation3 costctr3 CostCenterAllocation
ControllingArea3 costctr3 ControllingArea
CostCtrActivityType3 costctr3 CostCtrActivityType
ActivityDescOriginType3 costctr3 ActivityDescOriginType
CostCenterActivityAltvDescID3 costctr3 CostCenterActivityAltvDescID
ValidityStartDate3 costctr3 ValidityStartDate
ValidityEndDate3 costctr3 ValidityEndDate
CostCenterAllocation4 costctr4 CostCenterAllocation
ControllingArea4 costctr4 ControllingArea
CostCtrActivityType4 costctr4 CostCtrActivityType
ActivityDescOriginType4 costctr4 ActivityDescOriginType
CostCenterActivityAltvDescID4 costctr4 CostCenterActivityAltvDescID
ValidityStartDate4 costctr4 ValidityStartDate
ValidityEndDate4 costctr4 ValidityEndDate
CostCenterAllocation5 costctr5 CostCenterAllocation
ControllingArea5 costctr5 ControllingArea
CostCtrActivityType5 costctr5 CostCtrActivityType
ActivityDescOriginType5 costctr5 ActivityDescOriginType
CostCenterActivityAltvDescID5 costctr5 CostCenterActivityAltvDescID
ValidityStartDate5 costctr5 ValidityStartDate
ValidityEndDate5 costctr5 ValidityEndDate
CostCenterAllocation6 costctr6 CostCenterAllocation
ControllingArea6 costctr6 ControllingArea
CostCtrActivityType6 costctr6 CostCtrActivityType
ActivityDescOriginType6 costctr6 ActivityDescOriginType
CostCenterActivityAltvDescID6 costctr6 CostCenterActivityAltvDescID
ValidityStartDate6 costctr6 ValidityStartDate
ValidityEndDate6 costctr6 ValidityEndDate
_WorkCenter I_WorkCenter _WorkCenter
_WorkCenterType I_WorkCenter _WorkCenterType
_WorkCenterCategory I_WorkCenter _WorkCenterCategory
_Plant I_WorkCenter _Plant
_StandardWorkFmlaParamGroup I_WorkCenter _StandardWorkFmlaParamGroup
//@AbapCatalog.sqlViewName: 'PWRKCNTRACT1'

//@AbapCatalog.compiler.compareFilter: true

//@AbapCatalog.preserveKey: true

@AccessControl.authorizationCheck: #NOT_REQUIRED
//@ClientHandling.algorithm: #SESSION_VARIABLE

@VDM.viewType: #COMPOSITE
@VDM.private: true

//define view P_WorkCenterActivity1 

define view entity P_WorkCenterActivity1 

  as select from I_WorkCenter as wrkctr

  inner join I_StandardWorkFmlaParamGroup as tc21
    on tc21.StandardWorkFormulaParamGroup = wrkctr.StandardWorkFormulaParamGroup
  
  left outer to one join I_WorkCenterCostCenter as costctr1
    on  costctr1.WorkCenterInternalID =  wrkctr.WorkCenterInternalID
    and costctr1.WorkCenterTypeCode   =  wrkctr.WorkCenterTypeCode
    and costctr1.CostCenterAllocation =  '0001'
    and costctr1.ValidityStartDate    <= $session.system_date
    and costctr1.ValidityEndDate      >= $session.system_date

  left outer to one join I_WorkCenterCostCenter as costctr2
    on  costctr2.WorkCenterInternalID =  wrkctr.WorkCenterInternalID
    and costctr2.WorkCenterTypeCode   =  wrkctr.WorkCenterTypeCode
    and costctr2.CostCenterAllocation =  '0002'
    and costctr2.ValidityStartDate    <= $session.system_date
    and costctr2.ValidityEndDate      >= $session.system_date

  left outer to one join I_WorkCenterCostCenter as costctr3
    on  costctr3.WorkCenterInternalID =  wrkctr.WorkCenterInternalID
    and costctr3.WorkCenterTypeCode   =  wrkctr.WorkCenterTypeCode
    and costctr3.CostCenterAllocation =  '0003'
    and costctr3.ValidityStartDate    <= $session.system_date
    and costctr3.ValidityEndDate      >= $session.system_date    

  left outer to one join I_WorkCenterCostCenter as costctr4
    on  costctr4.WorkCenterInternalID =  wrkctr.WorkCenterInternalID
    and costctr4.WorkCenterTypeCode   =  wrkctr.WorkCenterTypeCode
    and costctr4.CostCenterAllocation =  '0004'
    and costctr4.ValidityStartDate    <= $session.system_date
    and costctr4.ValidityEndDate      >= $session.system_date    

  left outer to one join I_WorkCenterCostCenter as costctr5
    on  costctr5.WorkCenterInternalID =  wrkctr.WorkCenterInternalID
    and costctr5.WorkCenterTypeCode   =  wrkctr.WorkCenterTypeCode
    and costctr5.CostCenterAllocation =  '0005'
    and costctr5.ValidityStartDate    <= $session.system_date
    and costctr5.ValidityEndDate      >= $session.system_date    

  left outer to one join I_WorkCenterCostCenter as costctr6
    on  costctr6.WorkCenterInternalID =  wrkctr.WorkCenterInternalID
    and costctr6.WorkCenterTypeCode   =  wrkctr.WorkCenterTypeCode
    and costctr6.CostCenterAllocation =  '0006'
    and costctr6.ValidityStartDate    <= $session.system_date
    and costctr6.ValidityEndDate      >= $session.system_date      
  
{

  // Technical key

  key wrkctr.WorkCenterInternalID,
  key wrkctr.WorkCenterTypeCode,
  
  wrkctr.WorkCenterCategoryCode,
  wrkctr.WorkCenter,
  wrkctr.Plant,
  wrkctr.StandardWorkFormulaParamGroup,
  
  tc21.StandardWorkFormulaParam1,
  tc21.StandardWorkFormulaParam2,
  tc21.StandardWorkFormulaParam3,
  tc21.StandardWorkFormulaParam4,
  tc21.StandardWorkFormulaParam5,
  tc21.StandardWorkFormulaParam6,
  
  costctr1.CostCenterAllocation         as CostCenterAllocation1,
  costctr1.ControllingArea              as ControllingArea1,
  costctr1.CostCtrActivityType          as CostCtrActivityType1,
  costctr1.ActivityDescOriginType       as ActivityDescOriginType1,
  costctr1.CostCenterActivityAltvDescID as CostCenterActivityAltvDescID1,
  costctr1.ValidityStartDate            as ValidityStartDate1,
  costctr1.ValidityEndDate              as ValidityEndDate1,
  
  costctr2.CostCenterAllocation         as CostCenterAllocation2,
  costctr2.ControllingArea              as ControllingArea2,
  costctr2.CostCtrActivityType          as CostCtrActivityType2,
  costctr2.ActivityDescOriginType       as ActivityDescOriginType2,
  costctr2.CostCenterActivityAltvDescID as CostCenterActivityAltvDescID2,    
  costctr2.ValidityStartDate            as ValidityStartDate2,
  costctr2.ValidityEndDate              as ValidityEndDate2,
     
  costctr3.CostCenterAllocation         as CostCenterAllocation3,
  costctr3.ControllingArea              as ControllingArea3,
  costctr3.CostCtrActivityType          as CostCtrActivityType3,
  costctr3.ActivityDescOriginType       as ActivityDescOriginType3,
  costctr3.CostCenterActivityAltvDescID as CostCenterActivityAltvDescID3,
  costctr3.ValidityStartDate            as ValidityStartDate3,
  costctr3.ValidityEndDate              as ValidityEndDate3,    
    
  costctr4.CostCenterAllocation         as CostCenterAllocation4,
  costctr4.ControllingArea              as ControllingArea4,
  costctr4.CostCtrActivityType          as CostCtrActivityType4,
  costctr4.ActivityDescOriginType       as ActivityDescOriginType4,
  costctr4.CostCenterActivityAltvDescID as CostCenterActivityAltvDescID4,
  costctr4.ValidityStartDate            as ValidityStartDate4,
  costctr4.ValidityEndDate              as ValidityEndDate4,      
  
  costctr5.CostCenterAllocation         as CostCenterAllocation5,
  costctr5.ControllingArea              as ControllingArea5,
  costctr5.CostCtrActivityType          as CostCtrActivityType5,
  costctr5.ActivityDescOriginType       as ActivityDescOriginType5, 
  costctr5.CostCenterActivityAltvDescID as CostCenterActivityAltvDescID5,
  costctr5.ValidityStartDate            as ValidityStartDate5,
  costctr5.ValidityEndDate              as ValidityEndDate5,
  
  costctr6.CostCenterAllocation         as CostCenterAllocation6,
  costctr6.ControllingArea              as ControllingArea6,
  costctr6.CostCtrActivityType          as CostCtrActivityType6,
  costctr6.ActivityDescOriginType       as ActivityDescOriginType6,
  costctr6.CostCenterActivityAltvDescID as CostCenterActivityAltvDescID6, 
  costctr6.ValidityStartDate            as ValidityStartDate6,
  costctr6.ValidityEndDate              as ValidityEndDate6,   

  // Associations

  wrkctr._WorkCenter,
  wrkctr._WorkCenterType,
  wrkctr._WorkCenterCategory,
  wrkctr._Plant,
  wrkctr._StandardWorkFmlaParamGroup
  
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_STANDARDWORKFMLAPARAMGROUP",
"I_WORKCENTER",
"I_WORKCENTERCOSTCENTER"
],
"ASSOCIATED":
[
"I_PLANT",
"I_STANDARDWORKFMLAPARAMGROUP",
"I_WORKCENTERBYSEMANTICKEY",
"I_WORKCENTERCATEGORY",
"I_WORKCENTERTYPE"
],
"BASE":
[
"I_WORKCENTER"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/