I_WorkPermitCube

DDL: I_WORKPERMITCUBE SQL: IWRKPMTCUBE Type: view COMPOSITE

Work Permit - Cube

I_WorkPermitCube is a Composite CDS View (Cube) that provides data about "Work Permit - Cube" in SAP S/4HANA. It reads from 1 data source (P_WorkPermitCube) and exposes 29 fields with key field WorkPermit. It has 16 associations to related views.

Data Sources (1)

SourceAliasJoin Type
P_WorkPermitCube P_WorkPermitCube from

Associations (16)

CardinalityTargetAliasCondition
[1..1] I_WorkPermitType _WorkPermitType $projection.WorkPermitType = _WorkPermitType.WorkPermitType and $projection.MaintenancePlanningPlant = _WorkPermitType.MaintenancePlanningPlant
[0..1] I_Plant _PermitPlanningPlant $projection.MaintenancePlanningPlant = _PermitPlanningPlant.Plant
[1..1] I_MaintenancePlannerGroup _MaintenancePlannerGroup $projection.MaintenancePlannerGroup = _MaintenancePlannerGroup.MaintenancePlannerGroup and $projection.MaintenancePlanningPlant = _MaintenancePlannerGroup.MaintenancePlanningPlant
[0..1] I_WorkCenter _MainWorkCenter $projection.OperationWorkCenterInternalID = _MainWorkCenter.WorkCenterInternalID and $projection.ObjectTypeCode = _MainWorkCenter.WorkCenterTypeCode
[0..1] I_Equipment _Equipment $projection.Equipment = _Equipment.Equipment
[0..*] I_EquipmentText _EquipmentText $projection.Equipment = _EquipmentText.Equipment
[0..1] I_FunctionalLocation _FunctionalLocation $projection.FunctionalLocation = _FunctionalLocation.FunctionalLocation
[0..1] I_FunctionalLocationLabel _FunctionalLocationLabel $projection.FunctionalLocation = _FunctionalLocationLabel.FunctionalLocation
[0..*] I_FunctionalLocationText _FunctionalLocationText $projection.FunctionalLocation = _FunctionalLocationText.FunctionalLocation
[1..1] I_TechnicalObject _TechnicalObjectVH _TechnicalObjectVH.MaintenancePlanningPlant = $projection.MaintenancePlanningPlant and ( $projection.FunctionalLocation = _TechnicalObjectVH.TechnicalObject )
[1..1] I_TechnicalObject _TechnicalObjectEquipVH _TechnicalObjectEquipVH.MaintenancePlanningPlant = $projection.MaintenancePlanningPlant and ( $projection.Equipment = _TechnicalObjectEquipVH.TechnicalObject )
[1..1] I_WorkCenterText _Text $projection.OperationWorkCenterInternalID = _Text.WorkCenterInternalID and $projection.ObjectTypeCode = _Text.WorkCenterTypeCode and _Text.Language = $session.system_language
[1..1] I_WorkPermitTypeText _WorkPermitTypeText $projection.WorkPermitType = _WorkPermitTypeText.WorkPermitType and $projection.MaintenancePlanningPlant = _WorkPermitTypeText.MaintenancePlanningPlant and _WorkPermitTypeText.Language = $session.system_language
[1..1] I_WrkPmtProcessingStatusText _WrkPmtProcessingStatusText _WrkPmtProcessingStatusText.WorkPermitProcessingStatus = $projection.WorkPermitProcessingStatus and _WrkPmtProcessingStatusText.Language = $session.system_language and _WrkPmtProcessingStatusText.Name = 'PTWDWORKPERMITPROCESSINGSTATUS'
[1..1] I_WorkPermitIssueHistory _IssueHist _IssueHist.WorkPermitInternalID = $projection.WorkPermitInternalID and _IssueHist.WorkPermit = $projection.WorkPermit and _IssueHist.WorkPermitReturnedTo = ''
[0..*] I_TechObjIsEquipOrFuncnlLocT _TechObjIsEquipOrFuncnlLocT _TechObjIsEquipOrFuncnlLocT.TechObjIsEquipOrFuncnlLoc = $projection.TechObjIsEquipOrFuncnlLoc

Annotations (15)

NameValueLevelField
AbapCatalog.sqlViewName IWRKPMTCUBE view
ClientHandling.algorithm #SESSION_VARIABLE view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #MANDATORY view
AccessControl.personalData.blocking #NOT_REQUIRED view
EndUserText.label Work Permit - Cube view
Metadata.ignorePropagatedAnnotations true view
Metadata.allowExtensions true view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.sizeCategory #S view
ObjectModel.usageType.dataClass #MIXED view
VDM.viewType #COMPOSITE view
Analytics.dataCategory #CUBE view
Analytics.internalName #LOCAL view
ObjectModel.modelingPattern #ANALYTICAL_CUBE view

Fields (29)

KeyFieldSource TableSource FieldDescription
KEY WorkPermit WorkPermit Application
WorkPermitType WorkPermitType Work Permit Type
WorkPermitTypeDescription _WorkPermitTypeText WorkPermitTypeDescription Work Permit Usg Desc
MaintenancePlanningPlant MaintenancePlanningPlant Planning Plant
MaintenancePlanningPlantName _PermitPlanningPlant PlantName Plant Name
MaintenancePlannerGroup MaintenancePlannerGroup Planner Group
TechObjAuthorizationGroup TechObjAuthorizationGroup AuthorizGroup
FunctionalLocation FunctionalLocation Object ID
Equipment Equipment Equipment check
WorkCenter _MainWorkCenter WorkCenter Work Center
WorkCenterText _Text WorkCenterText Work Center Text
OperationWorkCenterInternalID OperationWorkCenterInternalID Object ID
ObjectTypeCode ObjectTypeCode Object Type
WrkPermitValidFrmDate WrkPermitValidFrmDate Valid from
WrkPermitValidToDate WrkPermitValidToDate Valid to
WorkPermitInternalID WorkPermitInternalID Object number
WorkPermitProcessingStatus WorkPermitProcessingStatus Processing State
MaintenancePlantendasMaintenancePlant
AssetLocationendasAssetLocation
LocationNameendasLocationName
MaintOrdPersonResponsible
PersonFullName
PlantSectionendasPlantSection
NumberOfOpenWorkPermits NumberOfOpenWorkPermits
_MaintenancePlannerGroup _MaintenancePlannerGroup
_PermitPlanningPlant _PermitPlanningPlant
_WorkPermitType _WorkPermitType
WorkPermitProcessingStatusText _WrkPmtProcessingStatusText WorkPermitProcessingStatusText Short Description
_TechObjIsEquipOrFuncnlLocT _TechObjIsEquipOrFuncnlLocT

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 I_WorkPermitCube.
-- 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.
-- SQL view name: IWRKPMTCUBE

CREATE VIEW I_WorkPermitCube AS
SELECT
  WorkPermit,
  WorkPermitType,
  _WorkPermitTypeText.WorkPermitTypeDescription AS WorkPermitTypeDescription,
  MaintenancePlanningPlant,
  _PermitPlanningPlant.PlantName AS MaintenancePlanningPlantName,
  MaintenancePlannerGroup,
  TechObjAuthorizationGroup,
  FunctionalLocation,
  Equipment,
  _MainWorkCenter.WorkCenter AS WorkCenter,
  _Text.WorkCenterText AS WorkCenterText,
  OperationWorkCenterInternalID,
  ObjectTypeCode,
  WrkPermitValidFrmDate,
  WrkPermitValidToDate,
  WorkPermitInternalID,
  WorkPermitProcessingStatus,
  case when _Equipment.Equipment <> '' then _TechnicalObjectEquipVH._LocationAccountAssignment.MaintenancePlant when _FunctionalLocation.FunctionalLocation <> '' then _TechnicalObjectVH._LocationAccountAssignment.MaintenancePlant end as MaintenancePlant AS MaintenancePlantendasMaintenancePlant,
  case when _Equipment.Equipment <> '' then _TechnicalObjectEquipVH._LocationAccountAssignment.AssetLocation when _FunctionalLocation.FunctionalLocation <> '' then _TechnicalObjectVH._LocationAccountAssignment.AssetLocation end as AssetLocation AS AssetLocationendasAssetLocation,
  case when _Equipment.Equipment <> '' then _TechnicalObjectEquipVH._LocationAccountAssignment._Location.LocationName when _FunctionalLocation.FunctionalLocation <> '' then _TechnicalObjectVH._LocationAccountAssignment._Location.LocationName end as LocationName AS LocationNameendasLocationName,
  cast( _IssueHist.WorkPermitIssuedTo as eams_person_responsible) AS MaintOrdPersonResponsible,
  _IssueHist._PersonWorkAgreement.PersonFullName AS PersonFullName,
  case when _Equipment.Equipment <> '' then _TechnicalObjectEquipVH._LocationAccountAssignment.PlantSection when _FunctionalLocation.FunctionalLocation <> '' then _TechnicalObjectVH._LocationAccountAssignment.PlantSection end as PlantSection AS PlantSectionendasPlantSection,
  NumberOfOpenWorkPermits,
  _WrkPmtProcessingStatusText.WorkPermitProcessingStatusText AS WorkPermitProcessingStatusText
FROM P_WorkPermitCube
LEFT OUTER JOIN I_WorkPermitType AS _WorkPermitType ON WorkPermitType = _WorkPermitType.WorkPermitType AND MaintenancePlanningPlant = _WorkPermitType.MaintenancePlanningPlant  -- association [1..1]
LEFT OUTER JOIN I_Plant AS _PermitPlanningPlant ON MaintenancePlanningPlant = _PermitPlanningPlant.Plant  -- association [0..1]
LEFT OUTER JOIN I_MaintenancePlannerGroup AS _MaintenancePlannerGroup ON MaintenancePlannerGroup = _MaintenancePlannerGroup.MaintenancePlannerGroup AND MaintenancePlanningPlant = _MaintenancePlannerGroup.MaintenancePlanningPlant  -- association [1..1]
LEFT OUTER JOIN I_WorkCenter AS _MainWorkCenter ON OperationWorkCenterInternalID = _MainWorkCenter.WorkCenterInternalID AND ObjectTypeCode = _MainWorkCenter.WorkCenterTypeCode  -- association [0..1]
LEFT OUTER JOIN I_Equipment AS _Equipment ON Equipment = _Equipment.Equipment  -- association [0..1]
LEFT OUTER JOIN I_EquipmentText AS _EquipmentText ON Equipment = _EquipmentText.Equipment  -- association [0..*]
LEFT OUTER JOIN I_FunctionalLocation AS _FunctionalLocation ON FunctionalLocation = _FunctionalLocation.FunctionalLocation  -- association [0..1]
LEFT OUTER JOIN I_FunctionalLocationLabel AS _FunctionalLocationLabel ON FunctionalLocation = _FunctionalLocationLabel.FunctionalLocation  -- association [0..1]
LEFT OUTER JOIN I_FunctionalLocationText AS _FunctionalLocationText ON FunctionalLocation = _FunctionalLocationText.FunctionalLocation  -- association [0..*]
LEFT OUTER JOIN I_TechnicalObject AS _TechnicalObjectVH ON _TechnicalObjectVH.MaintenancePlanningPlant = MaintenancePlanningPlant AND ( FunctionalLocation = _TechnicalObjectVH.TechnicalObject )  -- association [1..1]
LEFT OUTER JOIN I_TechnicalObject AS _TechnicalObjectEquipVH ON _TechnicalObjectEquipVH.MaintenancePlanningPlant = MaintenancePlanningPlant AND ( Equipment = _TechnicalObjectEquipVH.TechnicalObject )  -- association [1..1]
LEFT OUTER JOIN I_WorkCenterText AS _Text ON OperationWorkCenterInternalID = _Text.WorkCenterInternalID AND ObjectTypeCode = _Text.WorkCenterTypeCode AND _Text.Language = $session.system_language  -- association [1..1]
LEFT OUTER JOIN I_WorkPermitTypeText AS _WorkPermitTypeText ON WorkPermitType = _WorkPermitTypeText.WorkPermitType AND MaintenancePlanningPlant = _WorkPermitTypeText.MaintenancePlanningPlant AND _WorkPermitTypeText.Language = $session.system_language  -- association [1..1]
LEFT OUTER JOIN I_WrkPmtProcessingStatusText AS _WrkPmtProcessingStatusText ON _WrkPmtProcessingStatusText.WorkPermitProcessingStatus = WorkPermitProcessingStatus AND _WrkPmtProcessingStatusText.Language = $session.system_language AND _WrkPmtProcessingStatusText.Name = 'PTWDWORKPERMITPROCESSINGSTATUS'  -- association [1..1]
LEFT OUTER JOIN I_WorkPermitIssueHistory AS _IssueHist ON _IssueHist.WorkPermitInternalID = WorkPermitInternalID AND _IssueHist.WorkPermit = WorkPermit AND _IssueHist.WorkPermitReturnedTo = ''  -- association [1..1]
LEFT OUTER JOIN I_TechObjIsEquipOrFuncnlLocT AS _TechObjIsEquipOrFuncnlLocT ON _TechObjIsEquipOrFuncnlLocT.TechObjIsEquipOrFuncnlLoc = TechObjIsEquipOrFuncnlLoc  -- association [0..*]
;