@AbapCatalog.sqlViewName: 'CPRSORDOBJPG'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Process Order Object Page'
@VDM.viewType: #CONSUMPTION
@AccessControl.personalData.blocking: #('TRANSACTIONAL_DATA')
@Search.searchable: true
@Consumption.semanticObject: 'ProcessOrder'
//@Analytics: {dataCategory: #DIMENSION, dataExtraction.enabled: true}
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.representativeKey: 'ProcessOrder'
@ObjectModel.semanticKey: 'ProcessOrder'
@ObjectModel.usageType: {serviceQuality: #C, sizeCategory: #XL, dataClass: #MIXED}
/* UI annotations for header area of object page*/
@UI.headerInfo.typeName: 'Process Order'
@UI.headerInfo.typeNamePlural: 'List of Process Orders'
@UI.headerInfo.title.label: 'Process Order'
@UI.headerInfo.title.value: 'Material'
@UI.headerInfo.description.value: 'MaterialName'
define view C_ProcessOrderObjPg
as select from I_MfgOrderWithStatus
association [0..*] to C_ProcessOrderObjPgOpr as _MfgOrderOperations // Operations
on $projection.ProcessOrder = _MfgOrderOperations.ManufacturingOrder
association [0..*] to C_MfgOrderObjPgComp as _MfgOrderComponents // Components
on $projection.ProcessOrder = _MfgOrderComponents.ManufacturingOrder
association [0..*] to C_ProcessOrderObjPgItem as _MfgOrderItems // Items
on $projection.ProcessOrder = _MfgOrderItems.ManufacturingOrder
association [0..*] to C_MfgOrderObjPgContacts as _MfgOrderContactDetails // Contact Details
on $projection.ProcessOrder = _MfgOrderContactDetails.ManufacturingOrder
association [0..*] to I_MfgOrderObjPgStatus as _MfgOrderSystemStatus // Status
on $projection.ProcessOrder = _MfgOrderSystemStatus.ManufacturingOrder
association [1..1] to I_CostingVariant as _PlannedCostingVariant on $projection.PlannedCostsCostingVariant = _PlannedCostingVariant.CostingVariant
association [1..1] to I_CostingVariant as _ActualCostingVariant on $projection.ActualCostsCostingVariant = _ActualCostingVariant.CostingVariant
association [0..1] to I_SystemStatusText as _StatusTextI0001 // Status Created
on _StatusTextI0001.SystemStatus = 'I0001'
and _StatusTextI0001.Language = $session.system_language
association [0..1] to I_SystemStatusText as _StatusTextI0002 // Status Released
on _StatusTextI0002.SystemStatus = 'I0002'
and _StatusTextI0002.Language = $session.system_language
association [0..1] to I_SystemStatusText as _StatusTextI0009 // Status Confirmed
on _StatusTextI0009.SystemStatus = 'I0009'
and _StatusTextI0009.Language = $session.system_language
association [0..1] to I_SystemStatusText as _StatusTextI0010 // Status Partially confirmed
on _StatusTextI0010.SystemStatus = 'I0010'
and _StatusTextI0010.Language = $session.system_language
association [0..1] to I_SystemStatusText as _StatusTextI0012 // Status Delivered
on _StatusTextI0012.SystemStatus = 'I0012'
and _StatusTextI0012.Language = $session.system_language
association [0..1] to I_SystemStatusText as _StatusTextI0013 // Status Deleted
on _StatusTextI0013.SystemStatus = 'I0013'
and _StatusTextI0013.Language = $session.system_language
association [0..1] to I_SystemStatusText as _StatusTextI0016 // Status Pre-costed
on _StatusTextI0016.SystemStatus = 'I0016'
and _StatusTextI0016.Language = $session.system_language
association [0..1] to I_SystemStatusText as _StatusTextI0028 // Status Settlement rule created
on _StatusTextI0028.SystemStatus = 'I0028'
and _StatusTextI0028.Language = $session.system_language
association [0..1] to I_SystemStatusText as _StatusTextI0042 // Status Partially released
on _StatusTextI0042.SystemStatus = 'I0042'
and _StatusTextI0042.Language = $session.system_language
association [0..1] to I_SystemStatusText as _StatusTextI0045 // Status Technically completed
on _StatusTextI0045.SystemStatus = 'I0045'
and _StatusTextI0045.Language = $session.system_language
association [0..1] to I_SystemStatusText as _StatusTextI0046 // Status Closed
on _StatusTextI0046.SystemStatus = 'I0046'
and _StatusTextI0046.Language = $session.system_language
association [0..1] to I_SystemStatusText as _StatusTextI0076 // Status Marked for Deletion
on _StatusTextI0076.SystemStatus = 'I0076'
and _StatusTextI0076.Language = $session.system_language
association [1..1] to I_Plant as _PlantProdOrder on $projection.Plant = _PlantProdOrder.Plant
{
//General Information
@UI.dataPoint:{ title: 'Process Order'}
@Consumption.semanticObject: 'ProcessOrder'
@UI.lineItem:{ position:10, type: #WITH_INTENT_BASED_NAVIGATION,semanticObjectAction: 'display'}
@UI.identification:[{position:10 }]
@Search: {defaultSearchElement: true, ranking: #HIGH, fuzzinessThreshold: 0.8}
@EndUserText.label: 'Process Order'
@UI.selectionField.position: 0
key ManufacturingOrder as ProcessOrder,
@UI.hidden: true
ManufacturingOrder,
@UI.hidden: true
ManufacturingOrder as OrderID,
@UI.dataPoint:{ title: 'Production Plant'}
@Consumption.semanticObject: 'Plant'
@UI.lineItem:{ position:20, type: #WITH_INTENT_BASED_NAVIGATION,semanticObjectAction: 'display'}
@UI.identification:[{position:60}]
ProductionPlant,
@EndUserText.label: 'Operation Task List No.'
MfgOrderInternalID as OrderInternalBillOfOperations,
// Status on Header
@UI.dataPoint: {title: 'Status'}
case
when OrderIsDeleted = 'X'
then _StatusTextI0013.SystemStatusName
when OrderIsClosed = 'X'
then _StatusTextI0046.SystemStatusName
when OrderIsTechnicallyCompleted = 'X'
then _StatusTextI0045.SystemStatusName
when OrderIsDelivered = 'X'
then _StatusTextI0012.SystemStatusName
when OrderIsConfirmed = 'X'
then _StatusTextI0009.SystemStatusName
when OrderIsPartiallyConfirmed = 'X'
then _StatusTextI0010.SystemStatusName
when OrderIsMarkedForDeletion = 'X'
then _StatusTextI0076.SystemStatusName
when OrderIsReleased = 'X'
then _StatusTextI0002.SystemStatusName
when OrderIsPartiallyReleased = 'X'
then _StatusTextI0042.SystemStatusName
when OrderIsCreated = 'X'
then _StatusTextI0001.SystemStatusName
when OrderIsPreCosted = 'X'
then _StatusTextI0016.SystemStatusName
when SettlementRuleIsCreated = 'X'
then _StatusTextI0028.SystemStatusName
else ''
end as SystemStatusText,
@Consumption.semanticObject: 'Material'
@UI.lineItem:{ position:30, type: #WITH_INTENT_BASED_NAVIGATION,semanticObjectAction: 'display'}
@UI.identification:[{position: 20}]
@Consumption.valueHelpDefinition: [ { entity: { name: 'I_MaterialStdVH', element: 'Material' } } ]
@UI.selectionField.position: 10
Material,
@UI.hidden: true
_Material._Text[1: Language=$session.system_language].MaterialName as MaterialName,
@Semantics.unitOfMeasure: true
ProductionUnit,
@UI.identification: [{position:30}]
@Semantics.quantity.unitOfMeasure: 'ProductionUnit'
@UI.dataPoint: {title: 'Total Quantity'}
MfgOrderPlannedTotalQty as TotalQuantity,
@UI.identification: [{position:50}]
ManufacturingOrderType,
@UI.identification: [{position:70}]
MRPArea,
ManufacturingObject,
@UI.identification: [{position:80}]
PlanningPlant as Plant,
@UI.identification: [{position:40}]
@Semantics.quantity.unitOfMeasure: 'ProductionUnit'
MfgOrderConfirmedYieldQty,
//Dates/Times
@UI.fieldGroup: [{qualifier:'DateTime',position:10}]
MfgOrderPlannedStartDate,
@UI.fieldGroup: [{qualifier:'DateTime',position:20}]
MfgOrderPlannedStartTime,
@UI.fieldGroup: [{qualifier:'DateTime',position:30}]
MfgOrderPlannedEndDate,
@UI.fieldGroup: [{qualifier:'DateTime',position:40}]
MfgOrderPlannedEndTime,
@UI.fieldGroup: [{qualifier:'DateTime',position:50}]
MfgOrderScheduledStartDate,
@UI.fieldGroup: [{qualifier:'DateTime',position:60}]
MfgOrderScheduledStartTime,
@UI.fieldGroup: [{qualifier:'DateTime',position:70}]
MfgOrderScheduledEndDate,
@UI.fieldGroup: [{qualifier:'DateTime',position:80}]
MfgOrderScheduledEndTime,
@UI.fieldGroup: [{qualifier:'DateTime',position:90}]
cast(_PlantProdOrder._OrganizationAddress[AddressRepresentationCode = ''].AddressTimeZone as co_plant_timezone ) as AddressTimeZone,
//Assignments
@Consumption.semanticObject: 'ProductionVersion'
@UI.fieldGroup:[{qualifier:'Assignments'}]
@UI.lineItem:{ position:40, type: #WITH_INTENT_BASED_NAVIGATION,semanticObjectAction: 'display'}
@Consumption.valueHelpDefinition: [ { entity: { name: 'I_ProductionVersionStdVH', element: 'ProductionVersion' } } ]
ProductionVersion,
@UI.fieldGroup: [{qualifier:'Assignments', position:10}]
@Consumption.semanticObject: 'SalesOrder'
@Consumption.valueHelpDefinition: [ { entity: { name: 'I_SalesOrderStdVH', element: 'SalesOrder' } } ]
@UI.lineItem:{ position:50, type: #WITH_INTENT_BASED_NAVIGATION,semanticObjectAction: 'display'}
SalesOrder,
@Consumption.valueHelpDefinition: [ { entity: { name: 'I_SalesOrderItemStdVH', element: 'SalesOrderItem' } } ]
SalesOrderItem,
@UI.fieldGroup: [{qualifier:'Assignments',position:20}]
_PlannedOrder._Customer.CustomerName,
@Consumption.valueHelpDefinition: [ { entity: { name: 'I_PlannedOrderStdVH', element: 'PlannedOrder' } } ]
PlannedOrder,
@UI.fieldGroup: [{qualifier:'Assignments',position:30}]
@UI.identification:[{ position:90}]
@ObjectModel.text.element: 'WBSDescription'
@Consumption.valueHelpDefinition: [ { entity: { name: 'I_WBSElmntByIntKeyStdVH', element: 'WBSElement' } } ]
@UI.lineItem:{ position:60, type: #WITH_INTENT_BASED_NAVIGATION,semanticObjectAction: 'display'}
cast( _WBSElement.WBSElement as rcpe_ps_posnr preserving type ) as WBSElement,
@ObjectModel.foreignKey.association: '_WBSElement'
WBSElementInternalID,
@Semantics.text: true
_WBSElement.WBSDescription,
@UI.fieldGroup: [{qualifier:'Assignments',position:40}]
@Consumption.valueHelpDefinition: [ { entity: { name: 'I_CompanyCodeStdVH', element: 'CompanyCode' } } ]
CompanyCode,
@UI.fieldGroup: [{qualifier:'Assignments',position:50}]
@ObjectModel.foreignKey.association: '_FunctionalArea'
FunctionalArea,
@UI.fieldGroup: [{qualifier:'Assignments',position:60}]
@EndUserText.label: 'Planned Costing Variant'
@ObjectModel.foreignKey.association: '_PlannedCostingVariant'
@ObjectModel.text.element: 'CostingVariantName'
PlannedCostsCostingVariant,
@UI.hidden: true
_PlannedCostingVariant._Text[1: Language=$session.system_language].CostingVariantName as CostingVariantName,
@UI.fieldGroup: [{qualifier:'Assignments',position:70}]
@EndUserText.label: 'Actual Costing Variant'
@ObjectModel.foreignKey.association: '_ActualCostingVariant'
@ObjectModel.text.element: 'TargetCostVariantName'
ActualCostsCostingVariant,
@UI.hidden: true
_ActualCostingVariant._Text[1: Language=$session.system_language].CostingVariantName as TargetCostVariantName,
@UI.fieldGroup: [{qualifier:'Assignments',position:75}]
cast(OrderIsEventBasedPosting as mpe_ebpost) as OrderIsEventBasedPosting,
_MRPController.UserID,
//Responsibilities
@UI.fieldGroup: [{position:10,qualifier:'Responsibilities'}]
MRPController,
@UI.fieldGroup: [{qualifier:'Responsibilities',position:20}]
@EndUserText.label: 'Production Supervisor'
ProductionSupervisor,
ManufacturingOrderCategory,
_MfgOrderOperations,
_MfgOrderComponents,
_MfgOrderSystemStatus,
_MfgOrderContactDetails,
_MfgOrderItems,
_ProductionPlant as _Plant,
_CompanyCode,
_MRPController,
_FunctionalArea,
_ProductionSupervisor,
_PlannedOrder,
_SalesOrder,
_SalesOrderItem,
_MRPArea,
_WBSElement,
_PlanningPlant as _MRPPlant,
_Material,
_MfgOrderType,
_ProductionVersion,
_PlannedCostingVariant,
_ActualCostingVariant,
_PlantProdOrder
}
where
ManufacturingOrderCategory = '40';
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_COSTINGVARIANT",
"I_COSTINGVARIANTTEXT",
"I_CUSTOMER",
"I_MATERIAL",
"I_MATERIALTEXT",
"I_MFGORDERWITHSTATUS",
"I_MRPCONTROLLER",
"I_ORGANIZATIONADDRESS",
"I_PLANNEDORDER",
"I_PLANT",
"I_SYSTEMSTATUSTEXT",
"I_WBSELEMENTBYINTERNALKEY"
],
"ASSOCIATED":
[
"C_MFGORDEROBJPGCOMP",
"C_MFGORDEROBJPGCONTACTS",
"C_PROCESSORDEROBJPGITEM",
"C_PROCESSORDEROBJPGOPR",
"I_COMPANYCODE",
"I_COSTINGVARIANT",
"I_FUNCTIONALAREA",
"I_MATERIAL",
"I_MFGORDEROBJPGSTATUS",
"I_MFGORDERTYPE",
"I_MRPAREA",
"I_MRPCONTROLLER",
"I_PLANNEDORDER",
"I_PLANT",
"I_PRODUCTIONSUPERVISOR",
"I_PRODUCTIONVERSION",
"I_SALESORDER",
"I_SALESORDERITEM",
"I_SYSTEMSTATUSTEXT",
"I_WBSELEMENTBYINTERNALKEY"
],
"BASE":
[
"I_MFGORDERWITHSTATUS"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/