I_WorkPermitTemplate

DDL: I_WORKPERMITTEMPLATE SQL: IWRKPMTTEMPLATE Type: view COMPOSITE Package: VDM_EAM_WCM_PERMIT_TO_WORK

Work Permit Template

I_WorkPermitTemplate is a Composite CDS View that provides data about "Work Permit Template" in SAP S/4HANA. It reads from 1 data source (I_WorkPermitBasic) and exposes 58 fields with key field WorkPermit. It has 10 associations to related views. It is exposed through 2 OData services (UI_WORKPERMIT, UI_WORKPERMITTEMPLATE). It is used in 2 Fiori applications: Manage Work Permit Templates, Manage Work Permits. Part of development package VDM_EAM_WCM_PERMIT_TO_WORK.

Data Sources (1)

SourceAliasJoin Type
I_WorkPermitBasic _PermitBasic from

Associations (10)

CardinalityTargetAliasCondition
[1..1] I_WorkPermitTemplateType _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
[1..1] I_PermitToWorkProfile _PermitToWorkProfile $projection.MaintenancePlanningPlant = _PermitToWorkProfile.MaintenancePlanningPlant
[0..1] I_User _CreatedByUser _CreatedByUser.UserID = $projection.CreatedByUser
[0..1] I_User _LastChangedByUser _LastChangedByUser.UserID = $projection.LastChangedByUser
[1..1] I_WrkPmtProcessingStatusText _WrkPmtProcessingStatusText _WrkPmtProcessingStatusText.WorkPermitProcessingStatus = $projection.WorkPermitProcessingStatus and _WrkPmtProcessingStatusText.Language = $session.system_language and _WrkPmtProcessingStatusText.Name = 'PTWDWORKPERMITPROCESSINGSTATUS'
[0..1] I_WorkPermitStatus _WorkPermitStatus _WorkPermitStatus.WorkPermit = $projection.WorkPermit and _WorkPermitStatus.WorkPermitInternalID = $projection.WorkPermitInternalID and _WorkPermitStatus.StatusCode = 'I0175'
[0..1] I_Plant _WorkCenterPlant $projection.WorkCenterPlant = _WorkCenterPlant.Plant

Annotations (12)

NameValueLevelField
AbapCatalog.sqlViewName IWRKPMTTEMPLATE view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #MANDATORY view
EndUserText.label Work Permit Template view
VDM.viewType #COMPOSITE view
VDM.lifecycle.contract.type #PUBLIC_LOCAL_API view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.representativeKey WorkPermit view

OData Services (2)

ServiceBindingVersionContractRelease
UI_WORKPERMIT UI_WORKPERMIT V2 C1 NOT_RELEASED
UI_WORKPERMITTEMPLATE UI_WORKPERMITTEMPLATE V2 C1 NOT_RELEASED

Fiori Apps (2)

App IDApp NameTypeDescription
F4692 Manage Work Permit Templates Transactional Work permit template provides a predesigned structure that can be used to create work permits of consistent format. This can help you streamline the process when Permits for similar work are required to be created periodically. You can use this app to maintain the re-use library of templates to use them for creating actual work permits.
F6579 Manage Work Permits Transactional Work Permit is initiated during the planning of a maintenance activity and typically created from a predesigned template, together with the work order associated with the maintenance task. You can use this to search and maintain Work Permits.

Manage Work Permit Templates

Business Role: Industrial Hygienist

The Manage Work Permit Templates app allows to create work permit templates as predesigned models for creating work permits. The templates can be used as they are, or easily modified while work permits are created. Usage of work permit templates can help to streamline the work permit creation process when identical work permits are generated often. The app can perform the following operations:Allows to create, process, and manage work permit templatesProvides the ability to assign multiple functional locations, equipment, partners, and attachmentsAllows the configuration of the nature of work, personal protective equipment, and safety precautionsOffers easy data validation and a simplified approval process that adheres to a four-eyes principleProvides the ability to view the records of data transfers using application logs

Manage Work Permits

Business Role: Maintenance Planner

The Manage Work Permits app allows you to create, manage, and monitor work permits and gain valuable insights about the progress of your maintenance operations. Using the app, new work permits can be created with reference to an existing maintenance order, a predesigned work permit template, or independently. It provides the following capabilities:Allows to create and process new work permit using the optimized work permit management solutionProvides the ability to assign multiple functional locations, equipment, maintenance orders, partners, and attachments to enhance work permit with details related to the work activityAllows the configuration of the nature of work, personal protective equipment, and safety precautions to enhance work permit with safety protocols.Offers easy data validation and a simplified approval process that adheres to a four-eyes principleSupports the printing of work permit in the output form maintained by the userProvides the ability to extend the validity even after the creation of work permitSupports all operations relevant to work permit management such as approval, print, issue, return, close, deactivate, cancel, and mark for deletion.Provides the ability to view the records of data transfers using application logs

Fields (58)

KeyFieldSource TableSource FieldDescription
KEY WorkPermit I_WorkPermitBasic WorkPermit
WorkPermitInternalID I_WorkPermitBasic WorkPermitInternalID
WrkPmtMgmtObjSubType I_WorkPermitBasic WrkPmtMgmtObjSubType
WorkPermitType I_WorkPermitBasic WorkPermitType
WrkPermitDesc I_WorkPermitBasic WrkPermitDesc
WorkPermitHasLongText I_WorkPermitBasic WorkPermitHasLongText
WorkPermitTmplID I_WorkPermitBasic WorkPermitTmplID
WrkPermitIsDeleted I_WorkPermitBasic WrkPermitIsDeleted
MaintenancePlannerGroup I_WorkPermitBasic MaintenancePlannerGroup
MaintenancePlanningPlant I_WorkPermitBasic MaintenancePlanningPlant
ObjectTypeCode I_WorkPermitBasic ObjectTypeCode
OperationWorkCenterInternalID I_WorkPermitBasic OperationWorkCenterInternalID
TechObjAuthorizationGroup I_WorkPermitBasic TechObjAuthorizationGroup
WrkPermitValidFrmDate I_WorkPermitBasic WrkPermitValidFrmDate
WrkPermitValidFrmTime I_WorkPermitBasic WrkPermitValidFrmTime
WrkPermitValidToDate I_WorkPermitBasic WrkPermitValidToDate
CurrentDate
CurrentDateTime
WrkPermitValidToTime I_WorkPermitBasic WrkPermitValidToTime
WrkPmtMgmtPriority I_WorkPermitBasic WrkPmtMgmtPriority
FunctionalLocation I_WorkPermitBasic FunctionalLocation
Equipment I_WorkPermitBasic Equipment
WrkPermitHasObjectList I_WorkPermitBasic WrkPermitHasObjectList
CreatedByUserName _CreatedByUser UserDescription
UserDescription _LastChangedByUser UserDescription
CreatedByUser I_WorkPermitBasic CreatedByUser
CreationDate I_WorkPermitBasic CreationDate
CreationTime I_WorkPermitBasic CreationTime
CreationDateTime I_WorkPermitBasic CreationDateTime
LastChangedByUser I_WorkPermitBasic LastChangedByUser
LastChangeDate I_WorkPermitBasic LastChangeDate
LastChangeTime I_WorkPermitBasic LastChangeTime
LastChangeDateTime I_WorkPermitBasic LastChangeDateTime
ValidFromDateTime I_WorkPermitBasic ValidFromDateTime
ValidToDateTime I_WorkPermitBasic ValidToDateTime
WrkPermitIsLinkdToDoc I_WorkPermitBasic WrkPermitIsLinkdToDoc
StatusProfile I_WorkPermitBasic StatusProfile
WrkPermitHasMaintRemark I_WorkPermitBasic WrkPermitHasMaintRemark
WrkPermitHasOpRemark I_WorkPermitBasic WrkPermitHasOpRemark
WorkPermitOperationLongTextKey I_WorkPermitBasic WorkPermitOperationLongTextKey
WrkPmtMaintenanceLongTextKey I_WorkPermitBasic WrkPmtMaintenanceLongTextKey
LongTextKey I_WorkPermitBasic LongTextKey
WorkCenter _MainWorkCenter WorkCenter
WorkCenterText
WorkCenterPlant _MainWorkCenter Plant
_MaintenancePlannerGroup _MaintenancePlannerGroup
_PermitPlanningPlant _PermitPlanningPlant
_PermitToWorkProfile _PermitToWorkProfile
_MainWorkCenter _MainWorkCenter
_WorkPermitType _WorkPermitType
_LastChangedByUser _LastChangedByUser
_CreatedByUser _CreatedByUser
WrkPmtCnctntdActvSystStsTxt
WrkPmtChgStsActnEnbldVal
WorkPermitProcessingStatus I_WorkPermitBasic WorkPermitProcessingStatus
WorkPermitProcessingStatusText _WrkPmtProcessingStatusText WorkPermitProcessingStatusText
_WrkPmtProcessingStatusText _WrkPmtProcessingStatusText
_WorkCenterPlant _WorkCenterPlant
@AbapCatalog.sqlViewName: 'IWRKPMTTEMPLATE'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #MANDATORY
@EndUserText.label: 'Work Permit Template'
@VDM.viewType: #COMPOSITE
@VDM.lifecycle.contract.type: #PUBLIC_LOCAL_API
@ObjectModel.usageType: { serviceQuality: #C, sizeCategory:#L , dataClass:#TRANSACTIONAL }
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.representativeKey: 'WorkPermit'
@ObjectModel.semanticKey: ['WorkPermit']
define view I_WorkPermitTemplate
  as select from I_WorkPermitBasic as _PermitBasic

  association [1..1] to I_WorkPermitTemplateType     as _WorkPermitType             on  $projection.WorkPermitType           = _WorkPermitType.WorkPermitType
                                                                                    and $projection.MaintenancePlanningPlant = _WorkPermitType.MaintenancePlanningPlant
  association [0..1] to I_Plant                      as _PermitPlanningPlant        on  $projection.MaintenancePlanningPlant = _PermitPlanningPlant.Plant
  association [1..1] to I_MaintenancePlannerGroup    as _MaintenancePlannerGroup    on  $projection.MaintenancePlannerGroup  = _MaintenancePlannerGroup.MaintenancePlannerGroup
                                                                                    and $projection.MaintenancePlanningPlant = _MaintenancePlannerGroup.MaintenancePlanningPlant
  association [0..1] to I_WorkCenter                 as _MainWorkCenter             on  $projection.OperationWorkCenterInternalID = _MainWorkCenter.WorkCenterInternalID
                                                                                    and $projection.ObjectTypeCode                = _MainWorkCenter.WorkCenterTypeCode
  association [1..1] to I_PermitToWorkProfile        as _PermitToWorkProfile        on  $projection.MaintenancePlanningPlant = _PermitToWorkProfile.MaintenancePlanningPlant
  association [0..1] to I_User                       as _CreatedByUser              on  _CreatedByUser.UserID = $projection.CreatedByUser
  association [0..1] to I_User                       as _LastChangedByUser          on  _LastChangedByUser.UserID = $projection.LastChangedByUser
  association [1..1] to I_WrkPmtProcessingStatusText as _WrkPmtProcessingStatusText on  _WrkPmtProcessingStatusText.WorkPermitProcessingStatus = $projection.WorkPermitProcessingStatus
                                                                                    and _WrkPmtProcessingStatusText.Language                   = $session.system_language
                                                                                    and _WrkPmtProcessingStatusText.Name                       = 'PTWDWORKPERMITPROCESSINGSTATUS'
  association [0..1] to I_WorkPermitStatus           as _WorkPermitStatus           on  _WorkPermitStatus.WorkPermit           = $projection.WorkPermit
                                                                                    and _WorkPermitStatus.WorkPermitInternalID = $projection.WorkPermitInternalID
                                                                                    and _WorkPermitStatus.StatusCode           = 'I0175'
  association [0..1] to I_Plant                      as _WorkCenterPlant            on  $projection.WorkCenterPlant = _WorkCenterPlant.Plant
{
  key _PermitBasic.WorkPermit,
      _PermitBasic.WorkPermitInternalID,
      _PermitBasic.WrkPmtMgmtObjSubType,
      @ObjectModel.foreignKey.association: '_WorkPermitType'
      _PermitBasic.WorkPermitType,
      @Semantics.text :true
      _PermitBasic.WrkPermitDesc,
      _PermitBasic.WorkPermitHasLongText,
      _PermitBasic.WorkPermitTmplID,
      _PermitBasic.WrkPermitIsDeleted,
      _PermitBasic.MaintenancePlannerGroup,
      _PermitBasic.MaintenancePlanningPlant,
      _PermitBasic.ObjectTypeCode,
      _PermitBasic.OperationWorkCenterInternalID,
      _PermitBasic.TechObjAuthorizationGroup,
      _PermitBasic.WrkPermitValidFrmDate,
      _PermitBasic.WrkPermitValidFrmTime,
      _PermitBasic.WrkPermitValidToDate,
      $session. system_date                              as CurrentDate,
      cast ( tstmp_current_utctimestamp() as tzntstmps ) as CurrentDateTime,
      _PermitBasic.WrkPermitValidToTime,
      _PermitBasic.WrkPmtMgmtPriority,
      _PermitBasic.FunctionalLocation,
      _PermitBasic.Equipment,
      _PermitBasic.WrkPermitHasObjectList,
      _CreatedByUser.UserDescription                     as CreatedByUserName,
      _LastChangedByUser.UserDescription,
      @Semantics.user.createdBy: true
      _PermitBasic.CreatedByUser,
      _PermitBasic.CreationDate,
      _PermitBasic.CreationTime,
      @Semantics.systemDateTime.createdAt: true
      _PermitBasic.CreationDateTime,
      @Semantics.user.lastChangedBy: true
      _PermitBasic.LastChangedByUser,
      _PermitBasic.LastChangeDate,
      _PermitBasic.LastChangeTime,
      @Semantics.systemDateTime.lastChangedAt: true
      _PermitBasic.LastChangeDateTime,
      _PermitBasic.ValidFromDateTime,
      _PermitBasic.ValidToDateTime,
      _PermitBasic.WrkPermitIsLinkdToDoc,
      _PermitBasic.StatusProfile,
      _PermitBasic.WrkPermitHasMaintRemark,
      _PermitBasic.WrkPermitHasOpRemark,
      _PermitBasic.WorkPermitOperationLongTextKey,
      _PermitBasic.WrkPmtMaintenanceLongTextKey,
      _PermitBasic.LongTextKey,
      cast (case
       when _WorkPermitStatus.StatusCode is not initial
       then 'X'
       else '' end as  xfeld )                           as IsApproved,
      _MainWorkCenter.WorkCenter,
      _MainWorkCenter._Text[1: Language = $session.system_language ].WorkCenterText,
      _MainWorkCenter.Plant                              as WorkCenterPlant,
      _MaintenancePlannerGroup,
      _PermitPlanningPlant,
      _PermitToWorkProfile,
      _MainWorkCenter,
      _WorkPermitType,
      _LastChangedByUser,
      _CreatedByUser,
      cast ('' as vdm_j_system_status_concat_t)          as WrkPmtCnctntdActvSystStsTxt,
      cast( '' as abap.char( 1333 ) )                    as WrkPmtChgStsActnEnbldVal,
      _PermitBasic.WorkPermitProcessingStatus,
      _WrkPmtProcessingStatusText.WorkPermitProcessingStatusText,
      _WrkPmtProcessingStatusText,
      _WorkCenterPlant
}
where
  (
    WrkPmtMgmtObjSubType = 'M'
  );