R_MaintJobWorkItemComponentTP
Maintenance Job Work Item Component TP
R_MaintJobWorkItemComponentTP is a Composite CDS View that provides data about "Maintenance Job Work Item Component TP" in SAP S/4HANA. It reads from 1 data source (I_MaintenanceOrderComponent_2) and exposes 27 fields with key fields MaintenanceOrder, MaintenanceOrderOperation, MaintenanceOrderSubOperation, MaintOrderComponentInternalID. It has 4 associations to related views. Part of development package VDM_EAM_MAINTJOB_MANAGE_COMP.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_MaintenanceOrderComponent_2 | I_MaintenanceOrderComponent_2 | from |
Associations (4)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_ProductPlant | _ProductPlant | _ProductPlant.Product = $projection.Material and _ProductPlant.Plant = $projection.Plant |
| [0..1] | P_MaterialValuationCategory | _MaterialValuationCategory | _MaterialValuationCategory.Product = $projection.Material and _MaterialValuationCategory.Plant = $projection.Plant |
| [0..1] | P_SerialNumberProfileProcedure | _SerialNumberProfileProcedure | _SerialNumberProfileProcedure.Product = $projection.Material and _SerialNumberProfileProcedure.Plant = $projection.Plant and _SerialNumberProfileProcedure.SerialNumberProcedure = 'MMSL' |
| [1..1] | R_MaintenanceJobTP | _MaintenanceJob | _MaintenanceJob.MaintenanceOrder = $projection.MaintenanceOrder |
Annotations (8)
| Name | Value | Level | Field |
|---|---|---|---|
| AccessControl.authorizationCheck | #CHECK | view | |
| EndUserText.label | Maintenance Job Work Item Component TP | view | |
| VDM.viewType | #COMPOSITE | view | |
| VDM.lifecycle.contract.type | #SAP_INTERNAL_API | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| AccessControl.personalData.blocking | #NOT_REQUIRED | view |
Fields (27)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | MaintenanceOrder | MaintenanceOrder | ||
| KEY | MaintenanceOrderOperation | MaintenanceOrderOperation | ||
| KEY | MaintenanceOrderSubOperation | MaintenanceOrderSubOperation | ||
| KEY | MaintOrderComponentInternalID | MaintOrderComponentInternalID | ||
| MaintenanceOrderComponent | MaintenanceOrderComponent | |||
| Material | Material | |||
| MaterialNameendasMaterialName | ||||
| ComponentDescription | ComponentDescription | |||
| RequirementQuantityInBaseUnit | RequirementQuantityInBaseUnit | |||
| BaseUnit | BaseUnit | |||
| Plant | Plant | |||
| StorageLocation | StorageLocation | |||
| QuantityWithdrawnInBaseUnit | QuantityWithdrawnInBaseUnit | |||
| GoodsMovementType | GoodsMovementType | |||
| ValuationType | ||||
| SerialNumberProfile | _ProductPlant | SerialNumberProfile | ||
| SerialNumberProcedure | _SerialNumberProfileProcedure | SerialNumberProcedure | ||
| SerialNumberUsageInAssignment | _SerialNumberProfileProcedure | SerialNumberUsageInAssignment | ||
| InventoryValuationCategory | _MaterialValuationCategory | InventoryValuationCategory | ||
| MaintOrdOpCompItemCategory | ||||
| MatlCompIsMarkedForBackflush | MatlCompIsMarkedForBackflush | |||
| ReservationIsFinallyIssued | ReservationIsFinallyIssued | |||
| TotalReturnedQuantity | ||||
| _MaintenanceJobWorkItem | _MaintenanceJobWorkItem | |||
| _MaintenanceJob | _MaintenanceJob | |||
| _MaintenanceOrder | _MaintenanceOrder | |||
| _UnitOfMeasure | _UnitOfMeasure |
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Maintenance Job Work Item Component TP'
@VDM.viewType: #COMPOSITE
@VDM.usage.type: [#TRANSACTIONAL_PROCESSING_SERVICE]
@VDM.lifecycle.contract.type: #SAP_INTERNAL_API
@ObjectModel.usageType: {serviceQuality: #C, sizeCategory: #L, dataClass: #TRANSACTIONAL}
@AccessControl.personalData.blocking:#NOT_REQUIRED
define view entity R_MaintJobWorkItemComponentTP
as select from I_MaintenanceOrderComponent_2
association to parent R_MaintenanceJobWorkItemTP as _MaintenanceJobWorkItem on (
$projection.MaintenanceOrderOperation = _MaintenanceJobWorkItem.MaintenanceOrderOperation
and $projection.MaintenanceOrder = _MaintenanceJobWorkItem.MaintenanceOrder
and $projection.MaintenanceOrderSubOperation = _MaintenanceJobWorkItem.MaintenanceOrderSubOperation
)
association [0..1] to I_ProductPlant as _ProductPlant on _ProductPlant.Product = $projection.Material
and _ProductPlant.Plant = $projection.Plant
association [0..1] to P_MaterialValuationCategory as _MaterialValuationCategory on _MaterialValuationCategory.Product = $projection.Material
and _MaterialValuationCategory.Plant = $projection.Plant
association [0..1] to P_SerialNumberProfileProcedure as _SerialNumberProfileProcedure on _SerialNumberProfileProcedure.Product = $projection.Material
and _SerialNumberProfileProcedure.Plant = $projection.Plant
and _SerialNumberProfileProcedure.SerialNumberProcedure = 'MMSL'
association [1..1] to R_MaintenanceJobTP as _MaintenanceJob on _MaintenanceJob.MaintenanceOrder = $projection.MaintenanceOrder
{
key MaintenanceOrder,
key MaintenanceOrderOperation,
key MaintenanceOrderSubOperation,
key MaintOrderComponentInternalID,
MaintenanceOrderComponent,
@ObjectModel.text.element: [ 'MaterialName' ]
Material,
@Semantics.text: true
case when Material =''
then ComponentDescription
else _MaterialText[1:Language=$session.system_language].MaterialName
end as MaterialName,
ComponentDescription,
RequirementQuantityInBaseUnit,
@Consumption.valueHelpDefinition: [
{ entity : { name: 'I_UnitOfMeasure',
element: 'UnitOfMeasure' }
}]
BaseUnit,
@Semantics.quantity.unitOfMeasure: 'BaseUnit'
//Casting into 2 columns based on movement type to differentate items for Issue and Return
// H = 261 (credit) , S = 262 (debit)
cast(case
when MaintOrderCompDebitCreditCode = 'H'
then RequirementQuantityInBaseUnit
end as bdmng preserving type ) as PlannedQuantity, //Planned Quantity
@Semantics.quantity.unitOfMeasure: 'BaseUnit'
cast(case
when MaintOrderCompDebitCreditCode = 'S'
then RequirementQuantityInBaseUnit
end as bdmng preserving type ) as ReturnableQuantity, //Planned Return
Plant,
StorageLocation,
//Casting into 2 columns based on movement type to differentiate posting of issued and return items
@Semantics.quantity.unitOfMeasure: 'BaseUnit'
cast(case
when MaintOrderCompDebitCreditCode = 'H'
then QuantityWithdrawnInBaseUnit
end as enmng preserving type ) as IssuedQuantity, //QuantityIssued
@Semantics.quantity.unitOfMeasure: 'BaseUnit'
cast(case
when MaintOrderCompDebitCreditCode = 'S'
then QuantityWithdrawnInBaseUnit
end as enmng preserving type ) as ReturnedQuantity, //Actual Return
QuantityWithdrawnInBaseUnit,
GoodsMovementType,
//For Color Visualization of returned items
cast(case MaintOrderCompDebitCreditCode
// when '261' then 0 //Issue - Black Color
when 'S' then //Return - Orange Color
cast(case
when QuantityWithdrawnInBaseUnit = RequirementQuantityInBaseUnit then 3
else 2 end as mpe_criticality_type preserving type )
else 0
end as mpe_criticality_type preserving type ) as SASStatusCriticality,
cast (MaintenanceOrderComponentBatch as valuationtype) as ValuationType,
// Used for Serial Number Validations:- SerialNumberProfile, SerialNumberProcedure, SerialNumberUsageInAssignment
_ProductPlant.SerialNumberProfile,
_SerialNumberProfileProcedure.SerialNumberProcedure,
_SerialNumberProfileProcedure.SerialNumberUsageInAssignment,
// Used in Batch Value Help Validation
_MaterialValuationCategory.InventoryValuationCategory,
// Needed to Identify Stock and Non Stock Items
cast(MaintComponentItemCategory as postp preserving type ) as MaintOrdOpCompItemCategory,
// To identify backflush enabled components
MatlCompIsMarkedForBackflush,
ReservationIsFinallyIssued,
@Semantics.quantity.unitOfMeasure: 'BaseUnit'
cast(0 as enmng ) as TotalReturnedQuantity,
/* Associations */
_MaintenanceJobWorkItem, // Make association public
_MaintenanceJob,
// Inherited association that needs to be exposed
_MaintenanceOrder,
_UnitOfMeasure
}
where
IsDeleted <> 'X' // filter out the deleted items from iw32 component list
and ProductTypeCode <> '2'
Learn More
- What Is a CDS View in SAP S/4HANA?
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- CDS View Annotations — A Complete Guide
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA