C_MRPMaintenanceOrderCard

DDL: C_MRPMAINTENANCEORDERCARD Type: view_entity CONSUMPTION Package: ODATA_PP_MRP

Maintenance Order Details

C_MRPMaintenanceOrderCard is a Consumption CDS View that provides data about "Maintenance Order Details" in SAP S/4HANA. It reads from 1 data source (C_MRPMaintenanceOrderComponent) and exposes 45 fields with key fields Reservation, ReservationItem. It has 6 associations to related views. It is exposed through 5 OData services (ASQL_F0246A, ASQL_F0263A, ASQL_F7681, ...). Part of development package ODATA_PP_MRP.

Data Sources (1)

SourceAliasJoin Type
C_MRPMaintenanceOrderComponent C_MRPMaintenanceOrderComponent from

Parameters (1)

NameTypeDefault
P_SourceMRPElementItem delps

Associations (6)

CardinalityTargetAliasCondition
[0..1] I_Material _Material $projection.Material = _Material.Material
[0..1] I_MaintenanceRevision _MaintenanceRevision _MaintenanceRevision.MaintenanceRevision = $projection.MaintenanceRevision and _MaintenanceRevision.MaintenancePlanningPlant = $projection.MaintenancePlanningPlant
[0..1] I_Plant _MaintenancePlanningPlant $projection.MaintenancePlanningPlant = _MaintenancePlanningPlant.Plant
[0..1] I_Supplier _Supplier _Supplier.Supplier = $projection.Supplier
[0..1] I_MaintenanceNotification _MaintenanceNotification $projection.MaintenanceNotification = _MaintenanceNotification.MaintenanceNotification
[0..1] I_MRPElementCategoryText _MRPElementCategoryText _MRPElementCategoryText.MRPElementCategory = 'IH' and _MRPElementCategoryText.Language = $session.system_language

Annotations (6)

NameValueLevelField
AccessControl.authorizationCheck #MANDATORY view
EndUserText.label Maintenance Order Details view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #MIXED view
VDM.viewType #CONSUMPTION view

OData Services (5)

ServiceBindingVersionContractRelease
ASQL_F0246A ASQL_F0246A C2 NOT_RELEASED
ASQL_F0263A ASQL_F0263A C2 NOT_RELEASED
ASQL_F7681 ASQL_F7681 C2 NOT_RELEASED
UI_MRPREQUIREMENT UI_MRPREQUIREMENT V4 C1 NOT_RELEASED
UI_MULTILEVELORDERREPORT UI_MULTILEVELORDERREPORT V4 C1 NOT_RELEASED

Fields (45)

KeyFieldSource TableSource FieldDescription
KEY Reservation C_MRPMaintenanceOrderComponent Reservation Reservation
KEY ReservationItem C_MRPMaintenanceOrderComponent ReservationItem Reservation Item
RecordType C_MRPMaintenanceOrderComponent RecordType Reservation Record Type
MaintenancePlannerGroup C_MRPMaintenanceOrderComponent MaintenancePlannerGroup Planner Group
MaintenancePlannerGroupName C_MRPMaintenanceOrderComponent MaintenancePlannerGroupName Planner Group Name
MaintenanceWorkCenter C_MRPMaintenanceOrderComponent MaintenanceWorkCenter Work Center
MaintenanceWorkCenterText C_MRPMaintenanceOrderComponent MaintenanceWorkCenterText
RequirementDate C_MRPMaintenanceOrderComponent RequirementDate Requirement Date
BaseUnit C_MRPMaintenanceOrderComponent BaseUnit Unit of Measure
Material C_MRPMaintenanceOrderComponent Material Vehicle Model
OrderedQuantity C_MRPMaintenanceOrderComponent OrderedQuantity Quantity
WithdrawnQuantity C_MRPMaintenanceOrderComponent WithdrawnQuantity Withdrawn Quantity
OpenQuantity C_MRPMaintenanceOrderComponent OpenQuantity PBE Entry Open Qty
MaintenanceOrder C_MRPMaintenanceOrderComponent MaintenanceOrder Order
OrderType C_MRPMaintenanceOrderComponent OrderType Order Type
OrderTypeName C_MRPMaintenanceOrderComponent OrderTypeName
OrderStatusText C_MRPMaintenanceOrderComponent OrderStatusText
MaintOrdBasicStartDate C_MRPMaintenanceOrderComponent MaintOrdBasicStartDate Bas. Start Date
MaintOrdBasicEndDate C_MRPMaintenanceOrderComponent MaintOrdBasicEndDate Basic fin. date
MaintenancePlanningPlant C_MRPMaintenanceOrderComponent MaintenancePlanningPlant Planning Plant
PlantName _MaintenancePlanningPlant PlantName Plant Name
MaintenanceActivityType C_MRPMaintenanceOrderComponent ActivityType Activity Type
MaintenanceActivityTypeName C_MRPMaintenanceOrderComponent MaintenanceActivityTypeName
MaintenanceNotification C_MRPMaintenanceOrderComponent MaintenanceNotification Notification
NotificationText _MaintenanceNotification NotificationText Description
MaintenanceRevision C_MRPMaintenanceOrderComponent MaintenanceRevision Revision
MaintenanceRevisionDesc _MaintenanceRevision MaintenanceRevisionDesc
PriorityCode C_MRPMaintenanceOrderComponent PriorityCode Priority
UICT_PlannerGroup
UICT_WorkCenter
UICT_RequirementDate
UICT_OrderQuantity
UICT_WithdrawnQuantity
UICT_OpenQuantity
UICT_OrderType
UICT_OrderStatus
UICT_BasicStartDate
UICT_MaintOrdBasicEndDate
UICT_MaintenancePlanningPlant
UICT_MaintenanceNotification
UICT_MaintenanceRevision
UICT_MaintenanceActivityType
UICT_PriorityCode
MRPAffectedOrder
Supplier _Reservation Supplier Supplier

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 C_MRPMaintenanceOrderCard.
-- 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.
-- Parameters: P_SourceMRPElementItem : delps

CREATE VIEW C_MRPMaintenanceOrderCard AS
SELECT
  C_MRPMaintenanceOrderComponent.Reservation AS Reservation,
  C_MRPMaintenanceOrderComponent.ReservationItem AS ReservationItem,
  C_MRPMaintenanceOrderComponent.RecordType AS RecordType,
  C_MRPMaintenanceOrderComponent.MaintenancePlannerGroup AS MaintenancePlannerGroup,
  C_MRPMaintenanceOrderComponent.MaintenancePlannerGroupName AS MaintenancePlannerGroupName,
  C_MRPMaintenanceOrderComponent.MaintenanceWorkCenter AS MaintenanceWorkCenter,
  C_MRPMaintenanceOrderComponent.MaintenanceWorkCenterText AS MaintenanceWorkCenterText,
  C_MRPMaintenanceOrderComponent.RequirementDate AS RequirementDate,
  C_MRPMaintenanceOrderComponent.BaseUnit AS BaseUnit,
  C_MRPMaintenanceOrderComponent.Material AS Material,
  C_MRPMaintenanceOrderComponent.OrderedQuantity AS OrderedQuantity,
  C_MRPMaintenanceOrderComponent.WithdrawnQuantity AS WithdrawnQuantity,
  C_MRPMaintenanceOrderComponent.OpenQuantity AS OpenQuantity,
  C_MRPMaintenanceOrderComponent.MaintenanceOrder AS MaintenanceOrder,
  C_MRPMaintenanceOrderComponent.OrderType AS OrderType,
  C_MRPMaintenanceOrderComponent.OrderTypeName AS OrderTypeName,
  C_MRPMaintenanceOrderComponent.OrderStatusText AS OrderStatusText,
  C_MRPMaintenanceOrderComponent.MaintOrdBasicStartDate AS MaintOrdBasicStartDate,
  C_MRPMaintenanceOrderComponent.MaintOrdBasicEndDate AS MaintOrdBasicEndDate,
  C_MRPMaintenanceOrderComponent.MaintenancePlanningPlant AS MaintenancePlanningPlant,
  _MaintenancePlanningPlant.PlantName AS PlantName,
  C_MRPMaintenanceOrderComponent.ActivityType AS MaintenanceActivityType,
  C_MRPMaintenanceOrderComponent.MaintenanceActivityTypeName AS MaintenanceActivityTypeName,
  C_MRPMaintenanceOrderComponent.MaintenanceNotification AS MaintenanceNotification,
  _MaintenanceNotification.NotificationText AS NotificationText,
  C_MRPMaintenanceOrderComponent.MaintenanceRevision AS MaintenanceRevision,
  _MaintenanceRevision.MaintenanceRevisionDesc AS MaintenanceRevisionDesc,
  C_MRPMaintenanceOrderComponent.PriorityCode AS PriorityCode,
  cast ( case when maintenanceplannergroup is initial then 'X' else '' end as boolean preserving type ) AS UICT_PlannerGroup,
  cast ( case when maintenanceworkcenter is initial then 'X' else '' end as boolean preserving type ) AS UICT_WorkCenter,
  cast ( case when requirementdate is initial then 'X' else '' end as boolean preserving type ) AS UICT_RequirementDate,
  cast ( case when orderedquantity is initial then 'X' else '' end as boolean preserving type ) AS UICT_OrderQuantity,
  cast ( case when withdrawnquantity is initial then 'X' else '' end as boolean preserving type ) AS UICT_WithdrawnQuantity,
  cast ( case when openquantity is initial then 'X' else '' end as boolean preserving type ) AS UICT_OpenQuantity,
  cast ( case when ordertype is initial then 'X' else '' end as boolean preserving type ) AS UICT_OrderType,
  cast ( case when orderstatustext is initial then 'X' else '' end as boolean preserving type ) AS UICT_OrderStatus,
  cast ( case when maintordbasicstartdate is initial then 'X' else '' end as boolean preserving type ) AS UICT_BasicStartDate,
  cast ( case when maintordbasicenddate is initial then 'X' else '' end as boolean preserving type ) AS UICT_MaintOrdBasicEndDate,
  cast ( case when maintenanceplanningplant is initial then 'X' else '' end as boolean preserving type ) AS UICT_MaintenancePlanningPlant,
  cast ( case when maintenancenotification is initial then 'X' else '' end as boolean preserving type ) AS UICT_MaintenanceNotification,
  cast ( case when maintenancerevision is initial then 'X' else '' end as boolean preserving type ) AS UICT_MaintenanceRevision,
  cast ( case when MaintenanceActivityType is initial then 'X' else '' end as boolean preserving type ) AS UICT_MaintenanceActivityType,
  cast ( case when prioritycode is initial then 'X' else '' end as boolean preserving type ) AS UICT_PriorityCode,
  cast( concat( _MRPElementCategoryText.MRPElementCategoryShortName, concat( '-', ltrim ( maintenanceorder, '0' ) ) ) as char30 ) AS MRPAffectedOrder,
  _Reservation.Supplier AS Supplier
FROM C_MRPMaintenanceOrderComponent
LEFT OUTER JOIN I_Material AS _Material ON Material = _Material.Material  -- association [0..1]
LEFT OUTER JOIN I_MaintenanceRevision AS _MaintenanceRevision ON _MaintenanceRevision.MaintenanceRevision = MaintenanceRevision AND _MaintenanceRevision.MaintenancePlanningPlant = MaintenancePlanningPlant  -- association [0..1]
LEFT OUTER JOIN I_Plant AS _MaintenancePlanningPlant ON MaintenancePlanningPlant = _MaintenancePlanningPlant.Plant  -- association [0..1]
LEFT OUTER JOIN I_Supplier AS _Supplier ON _Supplier.Supplier = Supplier  -- association [0..1]
LEFT OUTER JOIN I_MaintenanceNotification AS _MaintenanceNotification ON MaintenanceNotification = _MaintenanceNotification.MaintenanceNotification  -- association [0..1]
LEFT OUTER JOIN I_MRPElementCategoryText AS _MRPElementCategoryText ON _MRPElementCategoryText.MRPElementCategory = 'IH' AND _MRPElementCategoryText.Language = $session.system_language  -- association [0..1]
;