Advertisement
Guest User

Untitled

a guest
Dec 13th, 2018
317
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
ABAP 6.53 KB | None | 0 0
  1. @AbapCatalog.sqlViewName: 'CMAINTORDOPERTP'
  2. @VDM.viewType: #CONSUMPTION
  3. @AccessControl.authorizationCheck: #CHECK
  4. @EndUserText.label: 'Maintenance Order Operation with Draft'
  5.  
  6. @ClientHandling.algorithm: #SESSION_VARIABLE
  7. @ObjectModel.usageType.dataClass: #TRANSACTIONAL
  8. @ObjectModel.usageType.serviceQuality: #D
  9. @ObjectModel.usageType.sizeCategory: #XL
  10.  
  11. @ObjectModel: {
  12.   representativeKey : 'MaintenanceOrderOperation',
  13.   semanticKey: ['MaintenanceOrderOperation', 'MaintenanceOrder'],
  14.   createEnabled: true,
  15.   updateEnabled: true,
  16.   deleteEnabled: true,
  17.   transactionalProcessingDelegated: true
  18. }
  19.  
  20. @AccessControl.personalData.blocking: #('TRANSACTIONAL_DATA')
  21.  
  22. @UI: {
  23.     headerInfo: {
  24.       description: {
  25.           value: 'OperationDescription',
  26.           type: #STANDARD
  27.       },
  28.       title: {
  29.           value: 'MaintenanceOrderOperation',
  30.           type: #STANDARD
  31.       },
  32.       typeName: 'Maintenance Order Operation',
  33.       typeNamePlural: 'Maintenance Order Operations'
  34.     }
  35. }
  36.  
  37. define view C_MaintOrderOperationTP
  38.   as select from I_MaintOrderOperationTP as I_MaintOrderOperationTP
  39.   association [0..1] to C_PMWorkCenterVH        as _WorkCenterVH             on  $projection.OperationWorkCenter = _WorkCenterVH.WorkCenter
  40.                                                                              and $projection.Plant               = _WorkCenterVH.Plant
  41.   association [1..1] to C_MaintOrderTP          as _MaintOrderTP             on  $projection.MaintenanceOrder = _MaintOrderTP.MaintenanceOrder
  42.   association [0..*] to C_MaintOrderComponentTP as _MaintOrderComponentTP    on  $projection.MaintenanceOrder          = _MaintOrderComponentTP.MaintenanceOrder
  43.                                                                              and $projection.MaintenanceOrderOperation = _MaintOrderComponentTP.MaintenanceOrderOperation
  44.   association [0..1] to I_PMTimeUnitVH          as _PlannedWorkUnitOfMeasure on  $projection.OperationPlannedWorkUnit = _PlannedWorkUnitOfMeasure.UnitOfMeasure
  45.   association [0..1] to I_PMContactCardEmployee as _PersonResponsible        on  $projection.OperationPersonResponsible = _PersonResponsible.PersonnelNumber
  46.   association [0..*] to I_WorkCenterText        as _WorkCenterText           on  _WorkCenterText.WorkCenterInternalID = $projection.OperationWorkCenterInternalID
  47.                                                                              and _WorkCenterText.WorkCenterTypeCode   = 'A'
  48. {
  49.         @ObjectModel.foreignKey.association: '_MaintOrderTP'
  50.   key   I_MaintOrderOperationTP.MaintenanceOrder,
  51.         @ObjectModel.text.element:  [ 'OperationDescription' ]
  52.         @UI: {
  53.           fieldGroup: { qualifier:'MalfunctionReportWorkItem', position:10, label: 'Work Item', importance: #HIGH, type: #WITH_NAVIGATION_PATH },
  54.           lineItem: { position: 10, importance: #HIGH}
  55.         }
  56.         @EndUserText.label: 'Work Item'
  57.   key   I_MaintOrderOperationTP.MaintenanceOrderOperation,
  58.         @UI.hidden: true
  59.         I_MaintOrderOperationTP.MaintOrderOperationForEdit,
  60.  
  61.         I_MaintOrderOperationTP.TechnicalObject,
  62.         I_MaintOrderOperationTP.TechObjIsEquipOrFuncnlLoc,
  63.         @UI.hidden: true
  64.         I_MaintOrderOperationTP.MaintOrderRoutingNumber,
  65.         @UI.hidden: true
  66.         I_MaintOrderOperationTP.MaintOrderOperationCounter,
  67.         I_MaintOrderOperationTP.OperationControlKey,
  68.  
  69.         @EndUserText.label: 'Description'
  70.         I_MaintOrderOperationTP.OperationDescription,
  71.        
  72.         I_MaintOrderOperationTP.Equipment,
  73.         I_MaintOrderOperationTP.FunctionalLocation,
  74.         I_MaintOrderOperationTP.Plant,
  75.         @UI.hidden: true
  76.         I_MaintOrderOperationTP.OperationWorkCenterInternalID,
  77.  
  78.         @UI.lineItem: [ { position: 20 } ]
  79.         @Consumption.valueHelp: '_WorkCenterVH'
  80.         @ObjectModel.text.association: '_WorkCenterText'
  81.         I_MaintOrderOperationTP.OperationWorkCenter,
  82.         @Consumption.hidden: true
  83.         I_MaintOrderOperationTP.OperationWorkCenterTypeCode,
  84.  
  85.         @UI.lineItem: [ { position: 30 } ]
  86.         @EndUserText.label: 'Assigned To'
  87.         @UI.textArrangement: #TEXT_ONLY
  88.         @ObjectModel.foreignKey.association: '_PersonResponsible' -- may have to remove this when trying to use In parameter for workcenter
  89.         cast( I_MaintOrderOperationTP.OperationPersonResponsible as eams_person_responsible ) as OperationPersonResponsible,
  90.  
  91.         @ObjectModel.virtualElement
  92.         @ObjectModel.readOnly: true
  93.         @ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EAM_MALFUNC_PERSRESP_EXIT'
  94.         @UI.hidden: true
  95.         cast( '' as xfeld )                                                                   as UserIsPersonResponsible,
  96.  
  97.         @UI.lineItem: [ { position: 40, importance: #LOW } ]
  98.         @Semantics.quantity.unitOfMeasure: 'OperationPlannedWorkUnit'
  99.         @EndUserText.label: 'Planned Effort'
  100.         I_MaintOrderOperationTP.OperationPlannedWork,
  101.         @ObjectModel.foreignKey.association: '_PlannedWorkUnitOfMeasure'
  102.         @Consumption.valueHelp: '_PlannedWorkUnitOfMeasure'
  103.         I_MaintOrderOperationTP.OperationPlannedWorkUnit,
  104.         @UI.hidden: true
  105.         I_MaintOrderOperationTP.MaintOrderOperationInternalID,
  106.         @UI.lineItem: [ { position: 50 } ]
  107.         @Semantics.quantity.unitOfMeasure: 'OperationPlannedWorkUnit'
  108.         @EndUserText.label: 'Actual Effort'
  109.         I_MaintOrderOperationTP.ConfirmationTotalQuantity,
  110.  
  111.         @UI.hidden: true
  112.         I_MaintOrderOperationTP.EAMOverallObjectStatusProfile,
  113.         @UI.lineItem: [ { position: 70 } ]
  114.         @UI.textArrangement: #TEXT_ONLY
  115.         I_MaintOrderOperationTP.EAMOverallObjectStatus,
  116.  
  117.         @UI.lineItem: [ { position: 60 } ]
  118.         @ObjectModel.readOnly: true
  119.         I_MaintOrderOperationTP.IsFinallyConfirmed,
  120.  
  121.         @Consumption.hidden: true
  122.         OperationSupplier,
  123.         @Consumption.hidden: true
  124.         _Supplier,
  125.  
  126.  
  127.         /* Associations */
  128.         @ObjectModel.association.type: [ #TO_COMPOSITION_CHILD ]
  129.         _MaintOrderComponentTP,
  130.         @ObjectModel.association.type: [ #TO_COMPOSITION_PARENT, #TO_COMPOSITION_ROOT ]
  131.         _MaintOrderTP,
  132.         I_MaintOrderOperationTP._TechnicalObject,
  133.         I_MaintOrderOperationTP._TechObjIsEquipOrFuncnlLoc,
  134.         _PlannedWorkUnitOfMeasure,
  135.         I_MaintOrderOperationTP._WorkCenter,
  136.         _WorkCenterText,
  137.         _WorkCenterVH,
  138.         _PersonResponsible,
  139.         I_MaintOrderOperationTP._StatusObjectActiveStatus,
  140.         I_MaintOrderOperationTP._OverallStatus
  141. }
  142. where
  143.   I_MaintOrderOperationTP.IsDeleted = ''
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement