C_MaintOrdCompPurReqItem

DDL: C_MAINTORDCOMPPURREQITEM SQL: CMTORDPURREQI Type: view CONSUMPTION

Purchase Requisitions for Plant Maintenance

C_MaintOrdCompPurReqItem is a Consumption CDS View that provides data about "Purchase Requisitions for Plant Maintenance" in SAP S/4HANA. It reads from 1 data source (I_MaintOrdCompPurRequisitionC) and exposes 63 fields with key fields PurchaseRequisition, PurchaseRequisitionItem. It has 16 associations to related views.

Data Sources (1)

SourceAliasJoin Type
I_MaintOrdCompPurRequisitionC I_MaintOrdCompPurRequisitionC from

Associations (16)

CardinalityTargetAliasCondition
[0..1] I_Material _Material _Material.Material = $projection.Material --
[0..1] I_MaintOrderTP _MaintenanceOrder _MaintenanceOrder.MaintenanceOrder = $projection.MaintenanceOrder
[0..1] I_MaintenanceOrder _MaintenanceOrderVH _MaintenanceOrderVH.MaintenanceOrder = $projection.MaintenanceOrder
[0..1] C_PMWorkCenterVH _PMWorkCenterVH _PMWorkCenterVH.WorkCenter = $projection.MainWorkCenter and _PMWorkCenterVH.Plant = $projection.MainWorkCenterPlant
[0..1] C_MaintenancePlannerGroupVH _MaintenancePlannerGroupVH _MaintenancePlannerGroupVH.MaintenancePlannerGroup = $projection.MaintenancePlannerGroup and _MaintenancePlannerGroupVH.MaintenancePlanningPlant = $projection.MaintenancePlanningPlant
[0..1] C_PurchaseDocumentStatusVH _PurReqStatusVH _PurReqStatusVH.PurReqnReleaseStatus = $projection.PurReqnReleaseStatus and _PurReqStatusVH.Language = $session.system_language
[0..1] C_PMNotificationPriority _MaintenancePriorityVH _MaintenancePriorityVH.MaintPriorityType = $projection.MaintPriorityType and _MaintenancePriorityVH.MaintPriority = $projection.MaintPriority
[0..1] I_GenericPriority _GenericPriority _GenericPriority.GenericPriorityType = $projection.MaintPriorityType and _GenericPriority.PriorityCode = $projection.MaintPriority
[0..1] I_GenericPriorityText _GenericPriorityText _GenericPriorityText.GenericPriorityType = $projection.MaintPriorityType and _GenericPriorityText.PriorityCode = $projection.MaintPriority and _GenericPriorityText.Language = $session.system_language
[0..1] I_SuplrContactCard _SupplierContactCard _SupplierContactCard.ContactCardID = $projection.Supplier
[0..1] C_PurchasingGroupValueHelp _PurchaseGroupVH _PurchaseGroupVH.PurchasingGroup = $projection.PurchasingGroup
[0..1] I_Supplier _Supplier $projection.Supplier = _Supplier.Supplier
[0..1] I_Supplier _PreferredSupplier $projection.PreferredSupplier = _PreferredSupplier.Supplier
[0..1] I_MaintPlanningBucketVH _PlanningBucket $projection.MaintPlanningBucketUUID = $projection.MaintPlanningBucketUUID
[0..*] I_MaintProcurementMilestoneTxt _ProcurementMilestoneText $projection.MaintProcurementMilestone = _ProcurementMilestoneText.MaintProcurementMilestone
[0..1] I_Plant _MaintenancePlanningPlant $projection.MaintenancePlanningPlant = _MaintenancePlanningPlant.Plant

Annotations (15)

NameValueLevelField
AbapCatalog.sqlViewName CMTORDPURREQI view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #CHECK view
VDM.viewType #CONSUMPTION view
AccessControl.personalData.blocking #BLOCKED_DATA_EXCLUDED view
ClientHandling.algorithm #SESSION_VARIABLE view
EndUserText.label Purchase Requisitions for Plant Maintenance view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.draftEnabled false view
ObjectModel.createEnabled false view
ObjectModel.updateEnabled false view
ObjectModel.deleteEnabled false view
Metadata.allowExtensions true view

Fields (63)

KeyFieldSource TableSource FieldDescription
KEY PurchaseRequisition PurchaseRequisition Purchase Requisition
KEY PurchaseRequisitionItem PurchaseRequisitionItem Purchase Requisition Item
MaintenanceOrder MaintenanceOrder Maintenance Order
MaintenanceOrderDesc MaintenanceOrderDesc Description
MaintenanceOrderType MaintenanceOrderType Order Type
MaintOrderRoutingNumber MaintOrderRoutingNumber Plan No.f.Oper.
MaintenanceOrderOperation MaintenanceOrderOperation Maintenance Order Operation
OperationDescription OperationDescription Operation Description
MaintOrderOperationCounter MaintOrderOperationCounter Counter
MaintenanceOrderSubOperation
Reservation Reservation Reservation
ReservationItem ReservationItem Reservation Item Number
ReferenceDate ReferenceDate Reference Date
MaintOrdBasicStartDate MaintOrdBasicStartDate Bas. Start Date
OpErlstSchedldExecStrtDte OpErlstSchedldExecStrtDte Earliest Start Date
RequirementDate RequirementDate Requirements Date
MaintPriority MaintPriority Priority
MaintPriorityType MaintPriorityType PriorityType
MaintPriorityColorCode _GenericPriority GenericPriorityColorCode
MaintPriorityDesc _GenericPriorityText GenericPriorityDesc
MaintenanceRevision MaintenanceRevision Revision
MaintenancePlannerGroup MaintenancePlannerGroup Planner Group
MaintenancePlanningPlant MaintenancePlanningPlant Planning Plant
MaintenancePlant MaintenancePlant Plant
MainWorkCenter MainWorkCenter Main Work Center
MainWorkCenterPlant MainWorkCenterPlant Plant for Work Center
WorkCenterTypeCode _MaintenanceOrder WorkCenterTypeCode Object Type
PurchaseOrder PurchaseOrder Purchasing Document
PurchaseOrderItem Purchasing Document Item
Material Material Vehicle Model
PurchasingGroup PurchasingGroup Purchasing Group
MaterialName PurchaseRequisitionItemText Short Text
MaterialThumbnailURL
PurReqnReleaseStatus PurReqnReleaseStatus Proc.state
RequestedQuantity RequestedQuantity Quantity Requested
BaseUnit BaseUnit Unit of Measure
PurchaseRequisitionPrice PurchaseRequisitionPrice Valuation Price
PurReqnItemCurrency PurReqnItemCurrency Currency
Supplier Supplier Supplier
SupplierName _Supplier SupplierName Supplier Name
PreferredSupplier PreferredSupplier Preferred Supplier
PreferredSupplierName _PreferredSupplier SupplierName Supplier Name
MaintOrdProcmtMlstnDateTime Milestone Date&Time
MaintPlanningBucketUUID
PlantSection PlantSection Plant Section
WorkCenterInternalID WorkCenterInternalID Work Center
Equipment Equipment Equipment check
FunctionalLocation FunctionalLocation Object ID
MaintObjectLocAcctAssgmtNmbr MaintObjectLocAcctAssgmtNmbr Loc/AccAssmt
OperationIsProcessedExternally OperationIsProcessedExternally
_MaintenancePlanningPlant _MaintenancePlanningPlant
_MaintenancePriorityVH _MaintenancePriorityVH
_PurchaseRequisitionItem _PurchaseRequisitionItem
_PurchaseGroupVH _PurchaseGroupVH
_Supplier _Supplier
_PreferredSupplier _PreferredSupplier
_PMWorkCenterVH _PMWorkCenterVH
_MaintenancePlannerGroupVH _MaintenancePlannerGroupVH
_PurReqStatusVH _PurReqStatusVH
_SupplierContactCard _SupplierContactCard
_PlanningBucket _PlanningBucket
_FuncnlLocationLabel _FuncnlLocationLabel
_ProcurementMilestoneText _ProcurementMilestoneText

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_MaintOrdCompPurReqItem.
-- 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: CMTORDPURREQI

CREATE VIEW C_MaintOrdCompPurReqItem AS
SELECT
  PurchaseRequisition,
  PurchaseRequisitionItem,
  MaintenanceOrder,
  MaintenanceOrderDesc,
  MaintenanceOrderType,
  MaintOrderRoutingNumber,
  MaintenanceOrderOperation,
  OperationDescription,
  MaintOrderOperationCounter,
  cast( ' ' as abap.char(4) ) AS MaintenanceOrderSubOperation,
  Reservation,
  ReservationItem,
  ReferenceDate,
  MaintOrdBasicStartDate,
  OpErlstSchedldExecStrtDte,
  RequirementDate,
  MaintPriority,
  MaintPriorityType,
  _GenericPriority.GenericPriorityColorCode AS MaintPriorityColorCode,
  _GenericPriorityText.GenericPriorityDesc AS MaintPriorityDesc,
  MaintenanceRevision,
  MaintenancePlannerGroup,
  MaintenancePlanningPlant,
  MaintenancePlant,
  MainWorkCenter,
  MainWorkCenterPlant,
  _MaintenanceOrder.WorkCenterTypeCode AS WorkCenterTypeCode,
  PurchaseOrder,
  cast( PurchaseOrderItem as vdm_purchaseorderitem preserving type ) AS PurchaseOrderItem,
  Material,
  PurchasingGroup,
  PurchaseRequisitionItemText AS MaterialName,
  concat( '/sap/opu/odata/sap/EAM_ORDER_MONITOR/' , concat( concat( 'MaterialThumbnail(''', _PurchaseRequisitionItem.Material ), ''')/$value') ) AS MaterialThumbnailURL,
  PurReqnReleaseStatus,
  RequestedQuantity,
  BaseUnit,
  PurchaseRequisitionPrice,
  PurReqnItemCurrency,
  Supplier,
  _Supplier.SupplierName AS SupplierName,
  PreferredSupplier,
  _PreferredSupplier.SupplierName AS PreferredSupplierName,
  cast( MaintOrdProcmtMlstnDateTime as maintordprocmtactivityduedate preserving type ) AS MaintOrdProcmtMlstnDateTime,
  cast( hextobin('00000000000000000000000000000000') as maintplanningbucketuuid ) AS MaintPlanningBucketUUID,
  PlantSection,
  WorkCenterInternalID,
  Equipment,
  FunctionalLocation,
  MaintObjectLocAcctAssgmtNmbr,
  OperationIsProcessedExternally
FROM I_MaintOrdCompPurRequisitionC
LEFT OUTER JOIN I_Material AS _Material ON _Material.Material = Material  -- association [0..1]
LEFT OUTER JOIN I_MaintOrderTP AS _MaintenanceOrder ON _MaintenanceOrder.MaintenanceOrder = MaintenanceOrder  -- association [0..1]
LEFT OUTER JOIN I_MaintenanceOrder AS _MaintenanceOrderVH ON _MaintenanceOrderVH.MaintenanceOrder = MaintenanceOrder  -- association [0..1]
LEFT OUTER JOIN C_PMWorkCenterVH AS _PMWorkCenterVH ON _PMWorkCenterVH.WorkCenter = MainWorkCenter AND _PMWorkCenterVH.Plant = MainWorkCenterPlant  -- association [0..1]
LEFT OUTER JOIN C_MaintenancePlannerGroupVH AS _MaintenancePlannerGroupVH ON _MaintenancePlannerGroupVH.MaintenancePlannerGroup = MaintenancePlannerGroup AND _MaintenancePlannerGroupVH.MaintenancePlanningPlant = MaintenancePlanningPlant  -- association [0..1]
LEFT OUTER JOIN C_PurchaseDocumentStatusVH AS _PurReqStatusVH ON _PurReqStatusVH.PurReqnReleaseStatus = PurReqnReleaseStatus AND _PurReqStatusVH.Language = $session.system_language  -- association [0..1]
LEFT OUTER JOIN C_PMNotificationPriority AS _MaintenancePriorityVH ON _MaintenancePriorityVH.MaintPriorityType = MaintPriorityType AND _MaintenancePriorityVH.MaintPriority = MaintPriority  -- association [0..1]
LEFT OUTER JOIN I_GenericPriority AS _GenericPriority ON _GenericPriority.GenericPriorityType = MaintPriorityType AND _GenericPriority.PriorityCode = MaintPriority  -- association [0..1]
LEFT OUTER JOIN I_GenericPriorityText AS _GenericPriorityText ON _GenericPriorityText.GenericPriorityType = MaintPriorityType AND _GenericPriorityText.PriorityCode = MaintPriority AND _GenericPriorityText.Language = $session.system_language  -- association [0..1]
LEFT OUTER JOIN I_SuplrContactCard AS _SupplierContactCard ON _SupplierContactCard.ContactCardID = Supplier  -- association [0..1]
LEFT OUTER JOIN C_PurchasingGroupValueHelp AS _PurchaseGroupVH ON _PurchaseGroupVH.PurchasingGroup = PurchasingGroup  -- association [0..1]
LEFT OUTER JOIN I_Supplier AS _Supplier ON Supplier = _Supplier.Supplier  -- association [0..1]
LEFT OUTER JOIN I_Supplier AS _PreferredSupplier ON PreferredSupplier = _PreferredSupplier.Supplier  -- association [0..1]
LEFT OUTER JOIN I_MaintPlanningBucketVH AS _PlanningBucket ON MaintPlanningBucketUUID = MaintPlanningBucketUUID  -- association [0..1]
LEFT OUTER JOIN I_MaintProcurementMilestoneTxt AS _ProcurementMilestoneText ON MaintProcurementMilestone = _ProcurementMilestoneText.MaintProcurementMilestone  -- association [0..*]
LEFT OUTER JOIN I_Plant AS _MaintenancePlanningPlant ON MaintenancePlanningPlant = _MaintenancePlanningPlant.Plant  -- association [0..1]
;