I_MaintenanceRevision

DDL: I_MAINTENANCEREVISION SQL: IMAINTREVISION Type: view BASIC Package: IWO1

Maintenance Revision

I_MaintenanceRevision is a Basic CDS View (Dimension) that provides data about "Maintenance Revision" in SAP S/4HANA. It reads from 1 data source (t352r) and exposes 20 fields with key fields MaintenancePlanningPlant, MaintenanceRevision. It has 7 associations to related views. Part of development package IWO1.

SAP Help Documentation

CategoryCDS Views for Maintenance Management
Purpose
This CDS view helps you retrieve the maintenance revisions for a maintenance order. This CDS view provides the data to answer the following business questions: Which are the maintenance revisions for the maintenance order? To help you decide which CDS view to use for your purposes, SAP has introduced the annotation ObjectModel.supportedCapabilities that indicates the most appropriate use cases for each CDS view. To find out what use cases are best supported by this CDS view, access the entry of the CDS view in the View Browser app and find the values for this annotation under the Annotation tab. For more information, see Supported Capabilities for CDS Views .

Prerequisites
Authorizations Users who want to use this CDS view must have the following authorization objects assigned: I_IWERK (PM: Maintenance Planning Plant)

Structure
Important Fields Important fields in this view include the following: Field Name Description MaintenancePlanningPlant Planning Plant MaintenanceRevision Revision RevisionIsCompleted Is Completed IsExternalNumberRange External

View on SAP Help Portal →

Data Sources (1)

SourceAliasJoin Type
t352r t352r from

Associations (7)

CardinalityTargetAliasCondition
[0..1] I_Plant _MaintenancePlanningPlant $projection.MaintenancePlanningPlant = _MaintenancePlanningPlant.Plant
[0..1] I_User _CreatedByUser $projection.CreatedByUser = _CreatedByUser.UserID
[0..1] I_User _LastChangedByUser $projection.LastChangedByUser = _LastChangedByUser.UserID
[0..1] I_Indicator _IsCompleted _IsCompleted.IndicatorValue = $projection.RevisionIsCompleted
[0..1] I_MaintenancePlanPlant _MaintenancePlanPlant $projection.MaintenancePlanningPlant = _MaintenancePlanPlant.MaintenancePlanningPlant
[0..1] nriv _NumberRangeIntervals _NumberRangeIntervals.nrrangenr = '01' and _NumberRangeIntervals.object = 'WPS_REV' and _NumberRangeIntervals.subobject = $projection.MaintenancePlanningPlant
[0..1] diwps_revty_t _RevisionType $projection.MaintenanceEventType = _RevisionType.revty

Annotations (11)

NameValueLevelField
AbapCatalog.compiler.compareFilter true view
AbapCatalog.sqlViewName IMAINTREVISION view
AccessControl.authorizationCheck #CHECK view
Analytics.dataCategory #DIMENSION view
ClientHandling.algorithm #SESSION_VARIABLE view
EndUserText.label Maintenance Revision view
ObjectModel.representativeKey MaintenanceRevision view
ObjectModel.usageType.dataClass #CUSTOMIZING view
ObjectModel.usageType.serviceQuality #A view
ObjectModel.usageType.sizeCategory #S view
VDM.viewType #BASIC view

Fields (20)

KeyFieldSource TableSource FieldDescription
KEY MaintenancePlanningPlant t352r iwerk Planning Plant
KEY MaintenanceRevision t352r revnr Revision
MaintenanceRevisionDesc t352r revtx RevDescription
MaintenanceEventType t352r revty Revision Type
RevisionStartDate
RevisionStartTime
RevisionEndDate
RevisionEndTime
RevisionIsCompleted Is Completed
CreationDate t352r erdat Entered On
CreatedByUser t352r ernam User Name
LastChangeDate t352r aedat Obsolete
LastChangedByUser t352r aenam User Name
IsExternalNumberRange _NumberRangeIntervals externind External NR
MaintenanceEventTypeCategory _RevisionType wps_control WPS Control
_MaintenancePlanningPlant _MaintenancePlanningPlant
_CreatedByUser _CreatedByUser
_LastChangedByUser _LastChangedByUser
_IsCompleted _IsCompleted
_MaintenancePlanPlant _MaintenancePlanPlant

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_MaintenanceRevision.
-- 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: IMAINTREVISION

CREATE VIEW I_MaintenanceRevision AS
SELECT
  t352r.iwerk AS MaintenancePlanningPlant,
  t352r.revnr AS MaintenanceRevision,
  t352r.revtx AS MaintenanceRevisionDesc,
  t352r.revty AS MaintenanceEventType,
  cast( t352r.revbd as eam_revision_start_date preserving type ) AS RevisionStartDate,
  cast( case when t352r.revbz = '' then '000000' else t352r.revbz end as eam_revision_start_time preserving type ) AS RevisionStartTime,
  cast( t352r.reved as eam_revision_end_date preserving type ) AS RevisionEndDate,
  cast( case when t352r.revez = '' then '000000' else t352r.revez end as eam_revision_end_time preserving type ) AS RevisionEndTime,
  cast( t352r.revab as xfeld ) AS RevisionIsCompleted,
  t352r.erdat AS CreationDate,
  t352r.ernam AS CreatedByUser,
  t352r.aedat AS LastChangeDate,
  t352r.aenam AS LastChangedByUser,
  _NumberRangeIntervals.externind AS IsExternalNumberRange,
  _RevisionType.wps_control AS MaintenanceEventTypeCategory
FROM t352r
LEFT OUTER JOIN I_Plant AS _MaintenancePlanningPlant ON MaintenancePlanningPlant = _MaintenancePlanningPlant.Plant  -- association [0..1]
LEFT OUTER JOIN I_User AS _CreatedByUser ON CreatedByUser = _CreatedByUser.UserID  -- association [0..1]
LEFT OUTER JOIN I_User AS _LastChangedByUser ON LastChangedByUser = _LastChangedByUser.UserID  -- association [0..1]
LEFT OUTER JOIN I_Indicator AS _IsCompleted ON _IsCompleted.IndicatorValue = RevisionIsCompleted  -- association [0..1]
LEFT OUTER JOIN I_MaintenancePlanPlant AS _MaintenancePlanPlant ON MaintenancePlanningPlant = _MaintenancePlanPlant.MaintenancePlanningPlant  -- association [0..1]
LEFT OUTER JOIN nriv AS _NumberRangeIntervals ON _NumberRangeIntervals.nrrangenr = '01' AND _NumberRangeIntervals.object = 'WPS_REV' AND _NumberRangeIntervals.subobject = MaintenancePlanningPlant  -- association [0..1]
LEFT OUTER JOIN diwps_revty_t AS _RevisionType ON MaintenanceEventType = _RevisionType.revty  -- association [0..1]
;