R_MAINTJOBWORKITEMUNPLNDCOMPTP
Maintenance Work Item Unplanned Comp TP
R_MAINTJOBWORKITEMUNPLNDCOMPTP is a CDS View in S/4HANA. Maintenance Work Item Unplanned Comp TP. 1 CDS views read from this table.
CDS Views using this table (1)
| View | Type | Join | VDM | Description |
|---|---|---|---|---|
| C_MaintJobWorkItemUnplndCompTP | view_entity | from | CONSUMPTION | Consumption layer unplanned components |
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Maintenance Work Item Unplanned Comp TP'
@VDM.viewType: #TRANSACTIONAL
@VDM.lifecycle.contract.type: #SAP_INTERNAL_API
@VDM.usage.type: [#TRANSACTIONAL_PROCESSING_SERVICE]
@ObjectModel.usageType: {serviceQuality: #C, sizeCategory: #L, dataClass: #TRANSACTIONAL}
@AccessControl.personalData.blocking:#NOT_REQUIRED
define view entity R_MaintJobWorkItemUnplndCompTP
as select from I_MaterialDocumentItem_2
association [0..*] to I_MaintenanceOrderOperation as _MaintenanceOrderOperation on $projection.MaintOrderRoutingNumber = _MaintenanceOrderOperation.MaintOrderRoutingNumber
and $projection.MaintOrderOperationCounter = _MaintenanceOrderOperation.MaintOrderOperationCounter
association [0..1] to I_MaintenanceOrder as _MaintenanceOrder on $projection.MaintenanceOrder = _MaintenanceOrder.MaintenanceOrder
association [0..1] to I_Product as _Product on $projection.Material = _Product.Product
association [0..*] to I_MaterialText as _MaterialText on $projection.Material = _MaterialText.Material
{
key I_MaterialDocumentItem_2.OrderID as MaintenanceOrder,
key I_MaterialDocumentItem_2.MaterialDocument,
key I_MaterialDocumentItem_2.MaterialDocumentItem,
key I_MaterialDocumentItem_2.MaterialDocumentYear,
cast(_MaintenanceOrderOperation.MaintenanceOrderOperation as pph_vornr preserving type) as MaintenanceOrderOperation,
I_MaterialDocumentItem_2.Material,
_MaterialText[1:Language=$session.system_language].MaterialName,
cast(I_MaterialDocumentItem_2.Material as matnr preserving type ) as Product,
//I_MaterialDocumentItem_2.Plant,
_MaintenanceOrder.MaintenancePlanningPlant,
_MaintenanceOrder.MaintenancePlant as Plant,
I_MaterialDocumentItem_2.StorageLocation,
I_MaterialDocumentItem_2.QuantityInBaseUnit,
I_MaterialDocumentItem_2.MaterialBaseUnit,
I_MaterialDocumentItem_2.MaintOrderRoutingNumber,
I_MaterialDocumentItem_2.MaintOrderOperationCounter,
cast (I_MaterialDocumentItem_2.Batch as valuationtype) as ValuationType,
cast (' ' as abap.char( 18 )) as SerialNumber,
I_MaterialDocumentItem_2.Reservation,
// Below listed 6 fields are to control serial number popup and batch f4 in UI.
// Data is filled by the UI hence casted to empty values in CDS
cast ('' as serail) as SerialNumberProfile,
cast('' as beleg) as SerialNumberProcedure,
cast('' as serpflicht) as SerialNumberUsageInAssignment,
cast('' as bwtty_d) as InventoryValuationCategory,
cast('' as lkenz) as IsMarkedForDeletion,
cast('' as auart) as MaintenanceOrderType,
cast
( case when _MaintenanceOrderOperation.Equipment != '' then
_MaintenanceOrderOperation.Equipment
when _MaintenanceOrderOperation.Equipment = '' and
_MaintenanceOrderOperation.FunctionalLocation != '' then
_MaintenanceOrderOperation.FunctionalLocation
else ''
end as eams_tec_obj ) as TechnicalObject,
cast(case when _MaintenanceOrderOperation.Equipment != '' then
'EAMS_EQUI'
when _MaintenanceOrderOperation.Equipment = '' and
_MaintenanceOrderOperation.FunctionalLocation != '' then
'EAMS_FL'
else ''
end as eams_tec_obj_type_value ) as TechObjIsEquipOrFuncnlLoc,
I_MaterialDocumentItem_2.MaterialDocumentItemText as MaterialDocumentItemText,
I_MaterialDocumentItem_2.GoodsMovementType,
I_MaterialDocumentItem_2._GoodsMovementType._Text[1:Language=$session.system_language].GoodsMovementTypeName,
_Product.ProductType
}
where
I_MaterialDocumentItem_2.Reservation = '0000000000' //indicates unplanned components that dont have reservation numbers against them
and _Product._ProductType.ProductTypeCode <> '2' // To filter out Service Materials
and I_MaterialDocumentItem_2.PurchaseOrder = '' // To eliminate the components of Goods Reciptes for Purchase Order (MI)
and I_MaterialDocumentItem_2.OrderID <> ''
and _MaintenanceOrder.MaintenanceOrderCategory = '30'