I_MaintOrderOperAndSubOper

DDL: I_MAINTORDEROPERANDSUBOPER SQL: IMTORDOPSOPR Type: view BASIC Package: IWO1

Maintenance Order Operation and SubOper

I_MaintOrderOperAndSubOper (Basic)

Package: Explore, extend and adapt the SAP S/4HANA Cloud Public Edition with built-in and side-by-side extension capabilities.

Asset Management

I_MaintOrderOperAndSubOper is a Basic CDS View that provides data about "Maintenance Order Operation and SubOper" in SAP S/4HANA. It reads from 2 data sources (afko, afvc) and exposes 142 fields with key fields MaintenanceOrder, MaintenanceOrderOperation. It has 33 associations to related views. Part of development package IWO1.

SAP Help Documentation

CategoryCDS Views for Maintenance Management
Purpose
This CDS view is designed to provide a comprehensive overview of maintenance order operations and sub-operations. It consolidates data from various tables related to maintenance orders, operations, and sub-operations, allowing users to access detailed information about each aspect of a maintenance order. The view includes associations with additional data sources to enrich the information available, such as work centers, suppliers, equipment, and more. This CDS view provides the data to answer the following business questions: What are the details of each maintenance order operation and sub-operation, including descriptions, work centers, and responsible personnel? How are operations and sub-operations linked to specific maintenance orders and routing numbers? What are the planned and actual execution dates and times for maintenance operations? What are the quantities, units, and costs associated with each operation? Which suppliers and purchasing information are related to external processing operations? How are operations categorized in terms of control keys, system conditions, and process phases? What are the associations between operations and other entities like equipment, functional locations, and assembly materials? How is the work distributed across capacities and what are the confirmation values for operations? What are the financial aspects of operations, including cost elements, profit centers, and controlling areas? How are operations affected by MRP relevance and deletion indicators? 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 a role with the following restriction types set to read access: BEGRU_LFA1 (Authorization Group for Suppliers) KOSTL (Cost Center) IWERK (Maintenance Planning Plant) KTOKK (Supplier Account Group) SWERK (Maintenance Plant) AUFART_IWERK (Order Category/Maintenance Planning Plant) BEGRP (Technical Object Authorization Group) BEGRU_BUPA_GRP (Authorization Group for Business Partners) These restriction types are edited in the Maintain Business Roles app.

Structure
Important Fields Important fields in this view include the following: Field Name Description OPERATIONMILESTONEUSAGECODE Usage MAINTOPERATIONEXECSTAGECODE PRE MAIN POST MAINTORDOPERATIONISMRPRELEVANT Reservation Relevance/Generation of Purchase Requisition MAINTORDOPERATIONQUANTITYUNIT Unit of measure for activity MAINTORDEROPERATIONQUANTITY Operation Total Quantity MAINTORDOPERATIONOVERHEADCODE Overhead key MAINTCONTROLLINGOBJECTCLASS Object Class EMPLOYEESUITABILITY Suitability EMPLOYEEWAGEGROUP Wage Group EMPLOYEEWAGETYPE Wage type EXTPROCGOPERATIONHASSUBCONTRG Indicator: External Processing Operation with Subcontracting MAINTORDOPFRAMEWORKORDERITEM Item of framework order MAINTORDOPFRAMEWORKORDER Framework Order FLDLOGSDELIVHDRISHELDONSHORE Hold On-Shore FUNCTIONALAREA Functional Area TAXJURISDICTION Tax Jurisdiction COSTINGSHEET Costing Sheet PROFITCENTER Profit Center MAINTORDOPASSGDWBSELMNTINT WBS Element BUSINESSAREA Business Area MAINTORDOPERATIONEXECUTIONRATE Execution factor CONSTRAINTTIMEFORBSCFINISHTIME Basic finish time of the activity CONSTRAINTDATEFORBSCFINISHDATE Constraint for Finish of Activity (Basic) CONSTRAINTTIMEFORBSCSTARTTIME Constraint for activity start time (Basic) CONSTRAINTDATEFORBSCSTARTDATE Constraint for activity start (Basic) MAINTORDOPWORKDURATIONUNIT Unit for work MAINTORDERCONFCNTRVALUE Confirmation counter TASKLISTGROUPCOUNTER Group Counter TASKLISTGROUP Key for Task List Group TASKLISTTYPE Task List Type MAINTORDOPHASLEA

View on SAP Help Portal →

SAP API Hub

CategoryBasic
StateC1
Line of BusinessAsset Management
Application ComponentPM-WOC-MO-2CL
CapabilitiesData Source in SQL Select,Data Source for Defining CDS Entities,Association Target for Defining CDS Entities
Extensible (Key User)No
Extensible (Developer)No
Release State (Key User)Released
Release State (Developer)Released
PackageAsset Management for SAP S/4HANA Cloud Public Edition
Description<p>This CDS view is designed to provide a comprehensive overview of maintenance order operations and sub-operations. It consolidates data from various tables related to maintenance orders, operations, and sub-operations, allowing users to access detailed information about each aspect of a maintenance order. The view includes associations with additional data sources to enrich the information available, such as work centers, suppliers, equipment, and more.</p><p>This CDS view provides the data to answer the following business questions:</p><ul><li><p>What are the details of each maintenance order operation and sub-operation, including descriptions, work centers, and responsible personnel?</p></li> <li><p>How are operations and sub-operations linked to specific maintenance orders and routing numbers?</p></li> <li><p>What are the planned and actual execution dates and times for maintenance operations?</p></li> <li><p>What are the quantities, units, and costs associated with each operation?</p></li> <li><p>Which suppliers and purchasing information are related to external processing operations?</p></li> <li><p>How are operations categorized in terms of control keys, system conditions, and process phases?</p></li> <li><p>What are the associations between operations and other entities like equipment, functional locations, and assembly materials?</p></li> <li><p>How is the work distributed across capacities and what are the confirmation values for operations?</p></li> <li><p>What are the financial aspects of operations, including cost elements, profit centers, and controlling areas?</p></li> <li><p>How are operations affected by MRP relevance and deletion indicators?</p></li></ul><p>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.</p>

Documentation

Data Sources (2)

SourceAliasJoin Type
afko afko inner
afvc afvc from

Associations (33)

CardinalityTargetAliasCondition
[1..1] I_MaintOrdOpAdditionalData _MaintOrdOpAdditionalData $projection.MaintOrderRoutingNumber = _MaintOrdOpAdditionalData.MaintOrderRoutingNumber and $projection.MaintOrderOperationCounter = _MaintOrdOpAdditionalData.MaintenanceOrderRoutingNode
[1..1] I_MaintOrderOperPlanningValues _OperationPlanningValues $projection.MaintOrderRoutingNumber = _OperationPlanningValues.MaintOrderRoutingNumber and $projection.MaintOrderOperationCounter = _OperationPlanningValues.MaintOrderOperationCounter
[0..1] I_WorkCenter _WorkCenter _WorkCenter.WorkCenterInternalID = $projection.OperationWorkCenterInternalID and _WorkCenter.WorkCenterTypeCode = $projection.OperationWorkCenterTypeCode
[0..1] I_Plant _Plant _Plant.Plant = $projection.Plant
[0..1] I_OperationControlProfile _OperationControlKey _OperationControlKey.OperationControlProfile = $projection.OperationControlKey
[0..1] I_MaintenanceOrderBasic _MaintenanceOrder _MaintenanceOrder.MaintenanceOrder = $projection.MaintenanceOrder
[0..*] I_StatusObjectActiveStatus _StatusObjectActiveStatus _StatusObjectActiveStatus.StatusObject = $projection.MaintOrderOperationInternalID
[0..1] I_Language _Language $projection.Language = _Language.Language
[0..*] I_OrderProdnResourceTool _MaintOrderProdnRsceTool _MaintOrderProdnRsceTool.OrderInternalBillOfOperations = $projection.MaintOrderRoutingNumber and _MaintOrderProdnRsceTool.OrderIntBillOfOperationsItem = $projection.MaintOrderOperationCounter
[0..*] I_MaintenanceOrderComponent_2 _MaintOrderComponent _MaintOrderComponent.MaintOrderRoutingNumber = $projection.MaintOrderRoutingNumber and _MaintOrderComponent.MaintOrderOperationCounter = $projection.MaintOrderOperationCounter
[0..1] I_MaintOrderOperObjectListLink _MaintOrderOperObjectListLink $projection.MaintOrderOperationCounter = _MaintOrderOperObjectListLink.MaintOrderOperationCounter and $projection.MaintOrderRoutingNumber = _MaintOrderOperObjectListLink.MaintOrderRoutingNumber
[0..1] I_WorkforcePerson _PersonResponsible $projection.OperationPersonResponsible = _PersonResponsible.PersonExternalID
[0..1] I_Supplier _Supplier $projection.OperationSupplier = _Supplier.Supplier
[1..1] I_MaintOperationExecStageCode _MaintOperationExecStageCode $projection.MaintOperationExecStageCode = _MaintOperationExecStageCode.MaintOperationExecStageCode
[0..1] I_Currency _OpExternalProcessingCurrency $projection.OpExternalProcessingCurrency = _OpExternalProcessingCurrency.Currency
[0..1] I_StatusObject _StatusObject $projection.MaintOrderOperationInternalID = _StatusObject.StatusObject
[0..1] I_MaintOperationSystCondition _OperationSystemCondition $projection.OperationSystemCondition = _OperationSystemCondition.OperationSystemCondition
[0..1] I_OperationCalculationControl _OperationCalculationControl $projection.OperationCalculationControl = _OperationCalculationControl.OperationCalculationControl
[0..1] I_Material _Assembly $projection.Assembly = _Assembly.Material
[0..1] I_Indicator _OperationHasLongText $projection.OperationHasLongText = _OperationHasLongText.IndicatorValue
[0..1] I_Equipment _Equipment $projection.Equipment = _Equipment.Equipment
[0..1] I_FunctionalLocation _FunctionalLocation $projection.FunctionalLocation = _FunctionalLocation.FunctionalLocation
[0..1] I_MaintenanceOrderConfirmation _MaintenanceOrderConf $projection.MaintOrderConfirmation = _MaintenanceOrderConf.MaintOrderConf and $projection.MaintOrderConfCntrValue = _MaintenanceOrderConf.MaintOrderConfCntrValue
[0..*] I_CostCenterActivityTypeText _CostCenterActivityTypeText $projection.ControllingArea = _CostCenterActivityTypeText.ControllingArea and $projection.CostCtrActivityType = _CostCenterActivityTypeText.CostCtrActivityType
[0..1] I_PMContactCardEmployee _PMContactEmployee $projection.OperationPersonResponsible = _PMContactEmployee.PersonnelNumber
[0..1] I_PersonWorkAgreement_1 _PersonWorkAgreement $projection.OperationPersonResponsible = _PersonWorkAgreement.PersonWorkAgreement
[0..1] I_WorkAssignment _WorkAssignment $projection.OperationPersonResponsible = _WorkAssignment.WorkAssignment
[0..1] I_EAMProcessPhase _EAMProcessPhase $projection.MaintOrdOpProcessPhaseCode = _EAMProcessPhase.EAMProcessPhaseCode
[0..1] I_EAMProcessSubPhase _EAMProcessSubPhase $projection.MaintOrdOpProcessSubPhaseCode = _EAMProcessSubPhase.EAMProcessSubPhaseCode
[1..1] I_PurchasingOrganization _PurchasingOrganization $projection.PurchasingOrganization = _PurchasingOrganization.PurchasingOrganization
[0..1] I_PurchasingGroup _PurchasingGroup $projection.PurchasingGroup = _PurchasingGroup.PurchasingGroup
[0..1] I_PurReqnOrResvnGeneration _PurReqnOrResvnGeneration $projection.MaintOrdOperationIsMRPRelevant = _PurReqnOrResvnGeneration.PurReqnOrResvnGeneration
[0..1] I_MaintOrdOpDeliveryDateAdjmt _MaintOrdOpDeliveryDateAdjmt $projection.MaintOrdOpDelivDateAdjustment = _MaintOrdOpDeliveryDateAdjmt.MaintOrdOpDelivDateAdjustment

Annotations (11)

NameValueLevelField
AbapCatalog.sqlViewName IMTORDOPSOPR view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #CHECK view
EndUserText.label Maintenance Order Operation and SubOper view
ObjectModel.representativeKey MaintenanceOrderOperation view
VDM.viewType #BASIC view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.usageType.serviceQuality #B view
ObjectModel.usageType.sizeCategory #XL view
Metadata.ignorePropagatedAnnotations true view

Fields (142)

KeyFieldSource TableSource FieldDescription
KEY MaintenanceOrder afko aufnr SettlementOrder
MaintenanceOrderOperation
KEY MaintenanceOrderOperation
MaintOrderOperationForEdit Maintenance Order Operation
MaintOrderRoutingNumber afvc aufpl Routing Number of Operations in the Order
MaintOrderOperationCounter afvc aplzl General counter for order
SuperiorOperationInternalID afvc sumnr Node Number of the Superior Operation
MaintOrderOperationInternalID afvc objnr Val. Obj. No.
OperationControlKey afvc steus Control Key
OperationDescription afvc ltxa1 Operation Short Text
OperationStandardTextCode afvc ktsch Standard text key
NumberOfTimeTickets afvc loanz Number of Time Tickets
OperationPersonResponsible afvc pernr Personnel number
Plant afvc werks Receiving Plant
OperationWorkCenterInternalID afvc arbid Object ID of the resource
OperationWorkCenterTypeCode
NumberOfCapacities afvc anzzl Number of capacities required
MaintOrderConfirmation afvc rueck Completion confirmation number for the operation
Equipment afvc equnr Equipment Number
FunctionalLocation Functional Location
OperationPurgInfoRecdSearchTxt afvc sortl Sort Term for Non-Stock Info Records
OperationRequisitionerName afvc afnam Name of requisitioner/requester
OperationGoodsRecipientName afvc wempf Goods Recipient
OperationQuantity afvv bmsch Base Quantity
OperationQuantityUnit afvv meinh Unit of measure for activity
ActivityType afvc larnt Activity Type
OpExternalProcessingPrice afvc preis Valuation Price
OpExternalProcessingPriceUnit afvc peinh Unit of measure
OpExternalProcessingCurrency afvc waers Transaction Currency
OperationTrackingNumber afvc bednr Requirement Tracking Number
OperationPurchasingInfoRecord afvc infnr Purchasing Info Record Number
OperationUnloadingPointName afvc ablad Unloading Point
OpPurchaseOutlineAgreement Number of principal purchase agreement
OpPurchaseOutlineAgreementItem Item Number of Principal Purchase Agreement
OperationSupplier afvc lifnr Account Number of Supplier
Assembly afvc istru Assembly
OperationSystemCondition afvc anlzu System Condition
CostCtrActivityType afvc larnt Activity Type
ReqgCostCenterControllingArea afvc anfkokrs Controlling area of the requesting cost center
OperationCalculationControl afvc indet Key for calculation
OperationWorkPercent afvc prznt Time interval %
CapacityRequirement afvc bedid ID of the Capacity Requirements Record
PurchaseRequisition afvc banfn Purchase Requisition Number
PurchaseRequisitionItem afvc bnfpo Item Number of Purchase Requisition in Order
MaterialGroup afvc matkl Product Sold Group
CostElement afvc sakto Cost Element
PurchasingOrganization afvc ekorg Purchasing Organization
PurchasingGroup afvc ekgrp Purchasing Group for External Processing Activity
Language Language Key
OperationHasLongText Checkbox
EAMPlannedDeliveryDurnInDays afvv plifz Planned Delivery Time in Days
MaintOrderOperationDuration afvv dauno Normal Duration of Activity
MaintOrdOperationDurationUnit afvv daune Normal Duration/Unit
OpBscStartDateConstraintType afvv einsa Constraint on the basic start date for the activity
OpBscEndDateConstraintType afvv einse Constraint on the finish date of the activity
MaintOrdOperationWorkDuration afvv arbei Work involved in the activity
MaintOrdOpWorkDurationUnit afvv arbeh Unit for work
ConstraintDateForBscStartDate afvv ntanf Constraint for activity start (Basic)
ConstraintTimeForBscStartTime afvv ntanz Constraint for activity start time (Basic)
ConstraintDateForBscFinishDate afvv ntend Constraint for Finish of Activity (Basic)
ConstraintTimeForBscFinishTime afvv ntenz Basic finish time of the activity
MaintOrdOperationExecutionRate afvv aufkt Execution Factor
BusinessArea afvc gsber Business Area
MaintOrdOpAssgdWBSElmntInt WBS Element
ProfitCenter afvc prctr Profit Centers
CostingSheet afvc kalsm Search Proced.
TaxJurisdiction afvc txjcd Tax Jurisdiction
FunctionalArea afvc func_area Receiving Func. Area
FldLogsDelivHdrIsHeldOnShore afvc fldlogsdelivisheldonshore Hold On-Shore
MaintOrdOpFrameWorkOrder afvc fordn Framework Order
MaintOrdOpFrameWorkOrderItem afvc fordp Item of framework order
ExtProcgOperationHasSubcontrg afvc frdlb Indicator: External Processing Operation with Subcontracting
EmployeeWageType afvc loart Wage type
EmployeeWageGroup afvc logrp Wage Group
EmployeeSuitability afvc qualf Suitability
MaintControllingObjectClass Object Class
WrkCtrIntCapRqmtsDistr afvc vertl Distr.cap.reqmts (plant maint.,process order, network)
MaintOrdOperationOverheadCode afvc zschl Overhead key
MaintOrderOperationQuantity afvv mgvrg Operation Total Quantity
MaintOrdOperationQuantityUnit afvv meinh Unit of measure for activity
MaintOperationExecStageCode PRE MAIN POST
OperationMilestoneUsageCode afvc mlstn Usage
MaintOrderConfCntrValue afvc rmzhl Confirmation counter
ControllingArea aufk kokrs Controlling Area
IsMarkedForDeletion afvc loekz Deletion Flag
OpErlstSchedldExecStrtDte afvv fsavd Earliest scheduled start: Execution (date)
OpErlstSchedldExecStrtTme afvv fsavz Earliest scheduled start: Execution (time)
OpErlstSchedldExecEndDte afvv fsedd Earliest scheduled finish: Execution (date)
OpErlstSchedldExecEndTme afvv fsedz Earliest scheduled finish: Execution (time)
OpLtstSchedldExecStrtDte afvv ssavd Latest scheduled start: Execution (date)
OpLtstSchedldExecStrtTme afvv ssavz Latest scheduled start: Execution (time)
OpLtstSchedldExecEndDte afvv ssedd Latest scheduled finish: Execution (date)
OpLtstSchedldExecEndTme afvv ssedz Latest scheduled finish: Execution (time)
OpActualExecutionStartDate afvv isdd Actual Execution Start Date
OpActualExecutionStartTime afvv isdz Actual Execution Start Time
OpActualExecutionEndDate afvv iedd Actual Execution End Date
OpActualExecutionEndTime afvv iedz Actual Execution End Time
ActyConfFcstdEndDate afvv pedd Forecast finish date of operation from confirmation
ActyConfFcstdEndTime afvv pedz Forecast End Time of Operation from Confirmation
ActualWorkQuantity afvv ismnw Actual work
MaintOrdOpDelivDateAdjustment Align Purchase Requisition Delivery Date
MaintOrdOpProcessPhaseCode afvc maintordopprocessphasecode Process Phase
MaintOrdOpProcessSubPhaseCode afvc maintordopprocesssubphasecode Process Subphase
AllMaintOrdCompCmtdQtsAreKept afvc allmaintordcompcmtdqtsarekept Keep Committed Quantities of All Stock Components
MaintOrdOpHasNoRemainingWork afvc leknw Indicator: No Remaining Work Expected
MaintOrdOpHasLeanServices afvc maintordophasleanservices Indicator: operation is linked to a service
TaskListType afvc plnty Task List Type
TaskListGroup afvc plnnr Key for Task List Group
TaskListGroupCounter afvc plnal Referenced BOO Variant
_MaintOrdOpAdditionalData _MaintOrdOpAdditionalData
_OperationPlanningValues _OperationPlanningValues
_MaintenanceOrder _MaintenanceOrder
_OperationControlKey _OperationControlKey
_Plant _Plant
_WorkCenter _WorkCenter
_StatusObjectActiveStatus _StatusObjectActiveStatus
_Language _Language
_PersonResponsible _PersonResponsible
_Supplier _Supplier
_MaintOrderComponent _MaintOrderComponent
_MaintOrderOperObjectListLink _MaintOrderOperObjectListLink
_MaintOrderProdnRsceTool _MaintOrderProdnRsceTool
_MaintOperationExecStageCode _MaintOperationExecStageCode
_OpExternalProcessingCurrency _OpExternalProcessingCurrency
_StatusObject _StatusObject
_OperationSystemCondition _OperationSystemCondition
_OperationCalculationControl _OperationCalculationControl
_Assembly _Assembly
_OperationHasLongText _OperationHasLongText
_Equipment _Equipment
_FunctionalLocation _FunctionalLocation
_MaintenanceOrderConf _MaintenanceOrderConf
_CostCenterActivityTypeText _CostCenterActivityTypeText
_PMContactEmployee _PMContactEmployee
_PersonWorkAgreement _PersonWorkAgreement
_WorkAssignment _WorkAssignment
_EAMProcessPhase _EAMProcessPhase
_EAMProcessSubPhase _EAMProcessSubPhase
_PurchasingOrganization _PurchasingOrganization
_PurchasingGroup _PurchasingGroup
_PurReqnOrResvnGeneration _PurReqnOrResvnGeneration
_MaintOrdOpDeliveryDateAdjmt _MaintOrdOpDeliveryDateAdjmt

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_MaintOrderOperAndSubOper.
-- 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: IMTORDOPSOPR

CREATE VIEW I_MaintOrderOperAndSubOper AS
SELECT
  afko.aufnr AS MaintenanceOrder,
  coalesce( afvc_superior.vornr, afvc.vornr ) AS MaintenanceOrderOperation,
  cast( afvc.vornr as maintenanceorderoperation preserving type ) AS MaintOrderOperationForEdit,
  afvc.aufpl AS MaintOrderRoutingNumber,
  afvc.aplzl AS MaintOrderOperationCounter,
  afvc.sumnr AS SuperiorOperationInternalID,
  afvc.objnr AS MaintOrderOperationInternalID,
  afvc.steus AS OperationControlKey,
  afvc.ltxa1 AS OperationDescription,
  afvc.ktsch AS OperationStandardTextCode,
  afvc.loanz AS NumberOfTimeTickets,
  afvc.pernr AS OperationPersonResponsible,
  afvc.werks AS Plant,
  afvc.arbid AS OperationWorkCenterInternalID,
  'A' AS OperationWorkCenterTypeCode,
  afvc.anzzl AS NumberOfCapacities,
  afvc.rueck AS MaintOrderConfirmation,
  afvc.equnr AS Equipment,
  cast ( afvc.tplnr as vdm_eam_tplnr ) AS FunctionalLocation,
  afvc.sortl AS OperationPurgInfoRecdSearchTxt,
  afvc.afnam AS OperationRequisitionerName,
  afvc.wempf AS OperationGoodsRecipientName,
  afvv.bmsch AS OperationQuantity,
  afvv.meinh AS OperationQuantityUnit,
  afvc.larnt AS ActivityType,
  afvc.preis AS OpExternalProcessingPrice,
  afvc.peinh AS OpExternalProcessingPriceUnit,
  afvc.waers AS OpExternalProcessingCurrency,
  afvc.bednr AS OperationTrackingNumber,
  afvc.infnr AS OperationPurchasingInfoRecord,
  afvc.ablad AS OperationUnloadingPointName,
  cast (afvc.ebeln as konnr) AS OpPurchaseOutlineAgreement,
  cast (afvc.ebelp as ktpnr) AS OpPurchaseOutlineAgreementItem,
  afvc.lifnr AS OperationSupplier,
  afvc.istru AS Assembly,
  afvc.anlzu AS OperationSystemCondition,
  afvc.larnt AS CostCtrActivityType,
  afvc.anfkokrs AS ReqgCostCenterControllingArea,
  afvc.indet AS OperationCalculationControl,
  afvc.prznt AS OperationWorkPercent,
  afvc.bedid AS CapacityRequirement,
  afvc.banfn AS PurchaseRequisition,
  afvc.bnfpo AS PurchaseRequisitionItem,
  afvc.matkl AS MaterialGroup,
  afvc.sakto AS CostElement,
  afvc.ekorg AS PurchasingOrganization,
  afvc.ekgrp AS PurchasingGroup,
  cast(afvc.txtsp as spras preserving type) AS Language,
  cast(case when afvc.txtsp = '' then '' else 'X' end as xfeld) AS OperationHasLongText,
  afvv.plifz AS EAMPlannedDeliveryDurnInDays,
  afvv.dauno AS MaintOrderOperationDuration,
  afvv.daune AS MaintOrdOperationDurationUnit,
  afvv.einsa AS OpBscStartDateConstraintType,
  afvv.einse AS OpBscEndDateConstraintType,
  afvv.arbei AS MaintOrdOperationWorkDuration,
  afvv.arbeh AS MaintOrdOpWorkDurationUnit,
  afvv.ntanf AS ConstraintDateForBscStartDate,
  afvv.ntanz AS ConstraintTimeForBscStartTime,
  afvv.ntend AS ConstraintDateForBscFinishDate,
  afvv.ntenz AS ConstraintTimeForBscFinishTime,
  afvv.aufkt AS MaintOrdOperationExecutionRate,
  afvc.gsber AS BusinessArea,
  cast( afvc.projn as ps_s4_pspnr preserving type ) AS MaintOrdOpAssgdWBSElmntInt,
  afvc.prctr AS ProfitCenter,
  afvc.kalsm AS CostingSheet,
  afvc.txjcd AS TaxJurisdiction,
  afvc.func_area AS FunctionalArea,
  afvc.fldlogsdelivisheldonshore AS FldLogsDelivHdrIsHeldOnShore,
  afvc.fordn AS MaintOrdOpFrameWorkOrder,
  afvc.fordp AS MaintOrdOpFrameWorkOrderItem,
  afvc.frdlb AS ExtProcgOperationHasSubcontrg,
  afvc.loart AS EmployeeWageType,
  afvc.logrp AS EmployeeWageGroup,
  afvc.qualf AS EmployeeSuitability,
  cast( afvc.scope as ps_s4_scope_cv preserving type ) AS MaintControllingObjectClass,
  afvc.vertl AS WrkCtrIntCapRqmtsDistr,
  afvc.zschl AS MaintOrdOperationOverheadCode,
  afvv.mgvrg AS MaintOrderOperationQuantity,
  afvv.meinh AS MaintOrdOperationQuantityUnit,
  cast( afvc.maintopexecutionphasecode as eam_premainpost_cds preserving type ) AS MaintOperationExecStageCode,
  afvc.mlstn AS OperationMilestoneUsageCode,
  afvc.rmzhl AS MaintOrderConfCntrValue,
  aufk.kokrs AS ControllingArea,
  afvc.loekz AS IsMarkedForDeletion,
  afvv.fsavd AS OpErlstSchedldExecStrtDte,
  afvv.fsavz AS OpErlstSchedldExecStrtTme,
  afvv.fsedd AS OpErlstSchedldExecEndDte,
  afvv.fsedz AS OpErlstSchedldExecEndTme,
  afvv.ssavd AS OpLtstSchedldExecStrtDte,
  afvv.ssavz AS OpLtstSchedldExecStrtTme,
  afvv.ssedd AS OpLtstSchedldExecEndDte,
  afvv.ssedz AS OpLtstSchedldExecEndTme,
  afvv.isdd AS OpActualExecutionStartDate,
  afvv.isdz AS OpActualExecutionStartTime,
  afvv.iedd AS OpActualExecutionEndDate,
  afvv.iedz AS OpActualExecutionEndTime,
  afvv.pedd AS ActyConfFcstdEndDate,
  afvv.pedz AS ActyConfFcstdEndTime,
  afvv.ismnw AS ActualWorkQuantity,
  cast(afvc.sched_end as cc4_delvry_date_adj_oper preserving type) AS MaintOrdOpDelivDateAdjustment,
  afvc.maintordopprocessphasecode AS MaintOrdOpProcessPhaseCode,
  afvc.maintordopprocesssubphasecode AS MaintOrdOpProcessSubPhaseCode,
  afvc.allmaintordcompcmtdqtsarekept AS AllMaintOrdCompCmtdQtsAreKept,
  afvc.leknw AS MaintOrdOpHasNoRemainingWork,
  afvc.maintordophasleanservices AS MaintOrdOpHasLeanServices,
  afvc.plnty AS TaskListType,
  afvc.plnnr AS TaskListGroup,
  afvc.plnal AS TaskListGroupCounter
FROM afvc
INNER JOIN afko ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_MaintOrdOpAdditionalData AS _MaintOrdOpAdditionalData ON MaintOrderRoutingNumber = _MaintOrdOpAdditionalData.MaintOrderRoutingNumber AND MaintOrderOperationCounter = _MaintOrdOpAdditionalData.MaintenanceOrderRoutingNode  -- association [1..1]
LEFT OUTER JOIN I_MaintOrderOperPlanningValues AS _OperationPlanningValues ON MaintOrderRoutingNumber = _OperationPlanningValues.MaintOrderRoutingNumber AND MaintOrderOperationCounter = _OperationPlanningValues.MaintOrderOperationCounter  -- association [1..1]
LEFT OUTER JOIN I_WorkCenter AS _WorkCenter ON _WorkCenter.WorkCenterInternalID = OperationWorkCenterInternalID AND _WorkCenter.WorkCenterTypeCode = OperationWorkCenterTypeCode  -- association [0..1]
LEFT OUTER JOIN I_Plant AS _Plant ON _Plant.Plant = Plant  -- association [0..1]
LEFT OUTER JOIN I_OperationControlProfile AS _OperationControlKey ON _OperationControlKey.OperationControlProfile = OperationControlKey  -- association [0..1]
LEFT OUTER JOIN I_MaintenanceOrderBasic AS _MaintenanceOrder ON _MaintenanceOrder.MaintenanceOrder = MaintenanceOrder  -- association [0..1]
LEFT OUTER JOIN I_StatusObjectActiveStatus AS _StatusObjectActiveStatus ON _StatusObjectActiveStatus.StatusObject = MaintOrderOperationInternalID  -- association [0..*]
LEFT OUTER JOIN I_Language AS _Language ON Language = _Language.Language  -- association [0..1]
LEFT OUTER JOIN I_OrderProdnResourceTool AS _MaintOrderProdnRsceTool ON _MaintOrderProdnRsceTool.OrderInternalBillOfOperations = MaintOrderRoutingNumber AND _MaintOrderProdnRsceTool.OrderIntBillOfOperationsItem = MaintOrderOperationCounter  -- association [0..*]
LEFT OUTER JOIN I_MaintenanceOrderComponent_2 AS _MaintOrderComponent ON _MaintOrderComponent.MaintOrderRoutingNumber = MaintOrderRoutingNumber AND _MaintOrderComponent.MaintOrderOperationCounter = MaintOrderOperationCounter  -- association [0..*]
LEFT OUTER JOIN I_MaintOrderOperObjectListLink AS _MaintOrderOperObjectListLink ON MaintOrderOperationCounter = _MaintOrderOperObjectListLink.MaintOrderOperationCounter AND MaintOrderRoutingNumber = _MaintOrderOperObjectListLink.MaintOrderRoutingNumber  -- association [0..1]
LEFT OUTER JOIN I_WorkforcePerson AS _PersonResponsible ON OperationPersonResponsible = _PersonResponsible.PersonExternalID  -- association [0..1]
LEFT OUTER JOIN I_Supplier AS _Supplier ON OperationSupplier = _Supplier.Supplier  -- association [0..1]
LEFT OUTER JOIN I_MaintOperationExecStageCode AS _MaintOperationExecStageCode ON MaintOperationExecStageCode = _MaintOperationExecStageCode.MaintOperationExecStageCode  -- association [1..1]
LEFT OUTER JOIN I_Currency AS _OpExternalProcessingCurrency ON OpExternalProcessingCurrency = _OpExternalProcessingCurrency.Currency  -- association [0..1]
LEFT OUTER JOIN I_StatusObject AS _StatusObject ON MaintOrderOperationInternalID = _StatusObject.StatusObject  -- association [0..1]
LEFT OUTER JOIN I_MaintOperationSystCondition AS _OperationSystemCondition ON OperationSystemCondition = _OperationSystemCondition.OperationSystemCondition  -- association [0..1]
LEFT OUTER JOIN I_OperationCalculationControl AS _OperationCalculationControl ON OperationCalculationControl = _OperationCalculationControl.OperationCalculationControl  -- association [0..1]
LEFT OUTER JOIN I_Material AS _Assembly ON Assembly = _Assembly.Material  -- association [0..1]
LEFT OUTER JOIN I_Indicator AS _OperationHasLongText ON OperationHasLongText = _OperationHasLongText.IndicatorValue  -- association [0..1]
LEFT OUTER JOIN I_Equipment AS _Equipment ON Equipment = _Equipment.Equipment  -- association [0..1]
LEFT OUTER JOIN I_FunctionalLocation AS _FunctionalLocation ON FunctionalLocation = _FunctionalLocation.FunctionalLocation  -- association [0..1]
LEFT OUTER JOIN I_MaintenanceOrderConfirmation AS _MaintenanceOrderConf ON MaintOrderConfirmation = _MaintenanceOrderConf.MaintOrderConf AND MaintOrderConfCntrValue = _MaintenanceOrderConf.MaintOrderConfCntrValue  -- association [0..1]
LEFT OUTER JOIN I_CostCenterActivityTypeText AS _CostCenterActivityTypeText ON ControllingArea = _CostCenterActivityTypeText.ControllingArea AND CostCtrActivityType = _CostCenterActivityTypeText.CostCtrActivityType  -- association [0..*]
LEFT OUTER JOIN I_PMContactCardEmployee AS _PMContactEmployee ON OperationPersonResponsible = _PMContactEmployee.PersonnelNumber  -- association [0..1]
LEFT OUTER JOIN I_PersonWorkAgreement_1 AS _PersonWorkAgreement ON OperationPersonResponsible = _PersonWorkAgreement.PersonWorkAgreement  -- association [0..1]
LEFT OUTER JOIN I_WorkAssignment AS _WorkAssignment ON OperationPersonResponsible = _WorkAssignment.WorkAssignment  -- association [0..1]
LEFT OUTER JOIN I_EAMProcessPhase AS _EAMProcessPhase ON MaintOrdOpProcessPhaseCode = _EAMProcessPhase.EAMProcessPhaseCode  -- association [0..1]
LEFT OUTER JOIN I_EAMProcessSubPhase AS _EAMProcessSubPhase ON MaintOrdOpProcessSubPhaseCode = _EAMProcessSubPhase.EAMProcessSubPhaseCode  -- association [0..1]
LEFT OUTER JOIN I_PurchasingOrganization AS _PurchasingOrganization ON PurchasingOrganization = _PurchasingOrganization.PurchasingOrganization  -- association [1..1]
LEFT OUTER JOIN I_PurchasingGroup AS _PurchasingGroup ON PurchasingGroup = _PurchasingGroup.PurchasingGroup  -- association [0..1]
LEFT OUTER JOIN I_PurReqnOrResvnGeneration AS _PurReqnOrResvnGeneration ON MaintOrdOperationIsMRPRelevant = _PurReqnOrResvnGeneration.PurReqnOrResvnGeneration  -- association [0..1]
LEFT OUTER JOIN I_MaintOrdOpDeliveryDateAdjmt AS _MaintOrdOpDeliveryDateAdjmt ON MaintOrdOpDelivDateAdjustment = _MaintOrdOpDeliveryDateAdjmt.MaintOrdOpDelivDateAdjustment  -- association [0..1]
;