R_MaintOrderOpComponentTP_2

DDL: R_MAINTORDEROPCOMPONENTTP_2 Type: view_entity TRANSACTIONAL

Maintenance Order Operation Component TP

R_MaintOrderOpComponentTP_2 is a Transactional CDS View that provides data about "Maintenance Order Operation Component TP" in SAP S/4HANA. It reads from 1 data source (I_MaintenanceOrderComponent_2) and exposes 106 fields with key fields MaintenanceOrder, MaintenanceOrderOperation, MaintenanceOrderSubOperation, MaintOrderComponentInternalID. It has 4 associations to related views.

Data Sources (1)

SourceAliasJoin Type
I_MaintenanceOrderComponent_2 I_MaintenanceOrderComponent_2 from

Associations (4)

CardinalityTargetAliasCondition
[1..1] R_MaintenanceOrderTP _MaintenanceOrder $projection.MaintenanceOrder = _MaintenanceOrder.MaintenanceOrder
[0..1] I_WBSElementBasicData _WBSElement _WBSElement.WBSElementInternalID = $projection.MaintOrdOpCompAssgdWBSElmntInt
[0..1] I_CostElement _CostElement $projection.ControllingArea = _CostElement.ControllingArea and $projection.MaintOrdOpComponentGLAccount = _CostElement.CostElement
[0..*] R_MaintOrderOpCompLongTextTP_2 _MaintOrderOpCompLongText

Annotations (7)

NameValueLevelField
AccessControl.authorizationCheck #MANDATORY view
VDM.viewType #TRANSACTIONAL view
VDM.lifecycle.contract.type #SAP_INTERNAL_API view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
EndUserText.label Maintenance Order Operation Component TP view

Fields (106)

KeyFieldSource TableSource FieldDescription
KEY MaintenanceOrder MaintenanceOrder
KEY MaintenanceOrderOperation MaintenanceOrderOperation
KEY MaintenanceOrderSubOperation MaintenanceOrderSubOperation
KEY MaintOrderComponentInternalID MaintOrderComponentInternalID
MaintenanceOrderComponent MaintenanceOrderComponent
MaintOrderOperationForEdit
MaintOrderSubOperationForEdit
Reservation Reservation
ReservationItem ReservationItem
ReservationType ReservationType
MaintOrderRoutingNumber MaintOrderRoutingNumber
MaintOrderOperationCounter MaintOrderOperationCounter
Product Material
BaseUnit BaseUnit
UnitOfEntry UnitOfEntry
Supplier Supplier
Plant Plant
StorageLocation StorageLocation
MaintOrdOpCompItemCategory MaintComponentItemCategory
GoodsMovementType GoodsMovementType
ReservationIsFinallyIssued ReservationIsFinallyIssued
MaterialGroup MaterialGroup
PurReqnOrResvnGeneration PurReqnOrResvnGeneration
MaterialCompIsProcuredDirectly MaterialCompIsProcuredDirectly
ProductTypeCode ProductTypeCode
ServicePerformer ServicePerformer
LeanServiceDuration LeanServiceDuration
LeanServiceDurationUnit LeanServiceDurationUnit
DistributionFunction DistributionFunction
MaintOrdCompDeliveryDateAdjmt MaintOrdCompDeliveryDateAdjmt
SrvcSchedgIsAlignedWthOpWrkCtr SrvcSchedgIsAlignedWthOpWrkCtr
MaintOrderCompDebitCreditCode MaintOrderCompDebitCreditCode
GoodsMovementIsAllowed GoodsMovementIsAllowed
MaintenanceOrderComponentBatch MaintenanceOrderComponentBatch
QuantityIsFixed QuantityIsFixed
MaintOrdOpComponentCurrency MaintOrdOpComponentCurrency
MaintOrdOpComponentGLAccount MaintOrdOpComponentGLAccount
MaintOrdOpCompCostingRelevancy MaintOrdOpCompCostingRelevancy
MaintCompAltvProdUsgeRateInPct MaintCompAltvProdUsgeRateInPct
MaintOrderOpComponentSortText MaintOrderOpComponentSortText
MaintOrdOpCompIsBulkProduct MaintOrdOpCompIsBulkProduct
MaterialProvisionType MaterialProvisionType
MaintOrdOpCompAssgdWBSElmntInt MaintOrdOpCompAssgdWBSElmntInt
WBSElement
MaintOrderOpComponentPrice MaintOrderOpComponentPrice
MaintOrdOpCompPriceUnitQty MaintOrdOpCompPriceUnitQty
MatlCompIsMarkedForBackflush MatlCompIsMarkedForBackflush
PurchasingGroup PurchasingGroup
DeliveryTimeInDays DeliveryTimeInDays
MaintOrdOpCompGdsRecipientName MaintOrdOpCompGdsRecipientName
MaintOrdOpCompUnloadingPtTxt MaintOrdOpCompUnloadingPtTxt
GoodsReceiptDurationInWorkDays GoodsReceiptDurationInWorkDays
PurchasingInfoRecord PurchasingInfoRecord
OperationLeadTimeOffset OperationLeadTimeOffset
OpsLeadTimeOffsetUnit OpsLeadTimeOffsetUnit
MaintOrdOpCompRequisitioner MaintOrdOpCompRequisitioner
MaintOrdOpCompProcmtTrckgNmbr
ResponsiblePurchaseOrg ResponsiblePurchaseOrg
PurchaseRequisition PurchaseRequisition
PurchaseRequisitionItem PurchaseRequisitionItem
OverallLimitAmount OverallLimitAmount
ExpectedOverallLimitAmount ExpectedOverallLimitAmount
MaintOrdOpCompSpecialStockType MaintOrdOpCompSpecialStockType
VariableSizeDimension1 VariableSizeDimension1
VariableSizeDimensionUnit VariableSizeDimensionUnit
VariableSizeCompFormulaKey VariableSizeCompFormulaKey
VariableSizeDimension2 VariableSizeDimension2
NumberOfVariableSizeItem NumberOfVariableSizeItem
VariableSizeDimension3 VariableSizeDimension3
VariableSizeItemQuantity VariableSizeItemQuantity
VariableSizeComponentUnit VariableSizeComponentUnit
RqmtDateIsEnteredManually RqmtDateIsEnteredManually
SupplierProduct SupplierProduct
MaintOrdCompCmtdQtyIsKept MaintOrdCompCmtdQtyIsKept
MaintOrdOpCompPurOutlineAgrmt MaintOrdOpCompPurOutlineAgrmt
MaintOrdCompPurOutlineAgrmtItm MaintOrdCompPurOutlineAgrmtItm
IsDeleted IsDeleted
MaintOrdOpCompProcmtCatalog MaintOrdOpCompProcmtCatalog
MaintOrdOpCompProcmtCatalogItm MaintOrdOpCompProcmtCatalogItm
QuantityWithdrawnInBaseUnit QuantityWithdrawnInBaseUnit
ConfirmedAvailableQuantity ConfirmedAvailableQuantity
_CompRcvdQuantity _CompRcvdQuantity
OperationDescription _MaintenanceOrderOperation OperationDescription
RecipientLocationCode _ReservationItem RecipientLocationCode
ControllingArea _MaintenanceOrder ControllingArea
_MaintenanceOrder _MaintenanceOrder
_MaintenanceOrderOperation _MaintenanceOrderOperation
_ReservationItem _ReservationItem
_UnitOfMeasure _UnitOfMeasure
_UnitOfMeasureEntry _UnitOfMeasureEntry
_Plant _Plant
_StorageLocation _StorageLocation
_ItemCategoryText _ItemCategoryText
_ProductTypeCode _ProductTypeCode
_ReservationIsFinallyIssued _ReservationIsFinallyIssued
_MaterialGroup _MaterialGroup
_PurReqnOrResvnGeneration _PurReqnOrResvnGeneration
_Supplier _Supplier
_MaintOrderOpCompLongText _MaintOrderOpCompLongText
_MaintOrdCompDelivDateAdjmtT _MaintOrdCompDelivDateAdjmtT
_PurReqnOrResvnGenerationText _PurReqnOrResvnGenerationText
_MaterialGroupText _MaterialGroupText
_UnitOfMeasureText _UnitOfMeasureText
_PurchasingGroup _PurchasingGroup
_PurchasingOrganization _PurchasingOrganization
_CostElement _CostElement
@AccessControl.authorizationCheck: #MANDATORY
@VDM: { viewType: #TRANSACTIONAL, lifecycle.contract.type: #SAP_INTERNAL_API }
@ObjectModel.usageType: {serviceQuality: #C, sizeCategory: #L, dataClass: #TRANSACTIONAL}
@VDM.usage.type: [#TRANSACTIONAL_PROCESSING_SERVICE]
@EndUserText.label: 'Maintenance Order Operation Component TP'
define view entity R_MaintOrderOpComponentTP_2
  as select from I_MaintenanceOrderComponent_2
  association        to parent R_MaintenanceOrderOperationTP     as _MaintenanceOrderOperation    on  (
         $projection.MaintenanceOrderOperation        = _MaintenanceOrderOperation.MaintenanceOrderOperation
         and $projection.MaintenanceOrderSubOperation = _MaintenanceOrderOperation.MaintenanceOrderSubOperation
         and $projection.MaintenanceOrder             = _MaintenanceOrderOperation.MaintenanceOrder
       )

  composition [0..*] of R_MaintOrderOpCompLongTextTP_2           as _MaintOrderOpCompLongText

  association [1..1] to R_MaintenanceOrderTP                     as _MaintenanceOrder             on  $projection.MaintenanceOrder = _MaintenanceOrder.MaintenanceOrder

  association [0..1] to I_WBSElementBasicData                    as _WBSElement                   on  _WBSElement.WBSElementInternalID = $projection.MaintOrdOpCompAssgdWBSElmntInt

  association of one to one I_MaintOrdOpCompProcmtQuantity       as _CompRcvdQuantity             on  $projection.MaintenanceOrder              = _CompRcvdQuantity.MaintenanceOrder
                                                                                                  and $projection.MaintenanceOrderOperation     = _CompRcvdQuantity.MaintenanceOrderOperation
                                                                                                  and $projection.MaintenanceOrderSubOperation  = _CompRcvdQuantity.MaintenanceOrderSubOperation
                                                                                                  and $projection.MaintOrderComponentInternalID = _CompRcvdQuantity.MaintOrderComponentInternalID

  association [0..1] to I_CostElement                            as _CostElement                  on  $projection.ControllingArea              = _CostElement.ControllingArea
                                                                                                  and $projection.MaintOrdOpComponentGLAccount = _CostElement.CostElement

  association of one to many I_PurReqnOrResvnGenerationText as _PurReqnOrResvnGenerationText on  $projection.PurReqnOrResvnGeneration   = _PurReqnOrResvnGenerationText.PurReqnOrResvnGeneration

  association of one to many I_MaterialGroupText            as _MaterialGroupText            on  $projection.MaterialGroup   = _MaterialGroupText.MaterialGroup

  association of one to many I_UnitOfMeasureText            as _UnitOfMeasureText            on  $projection.BaseUnit        = _UnitOfMeasureText.UnitOfMeasure
{

  key MaintenanceOrder,
  key MaintenanceOrderOperation,
  key MaintenanceOrderSubOperation,
  key MaintOrderComponentInternalID,
      MaintenanceOrderComponent,

      @ObjectModel.editableFieldFor: 'MaintenanceOrderOperation'
      cast( MaintenanceOrderOperation    as maintenanceorderoperation preserving type )                                          as MaintOrderOperationForEdit,
      @ObjectModel.editableFieldFor: 'MaintenanceOrderSubOperation'
      cast( MaintenanceOrderSubOperation as maintenanceordersuboperation preserving type )                                       as MaintOrderSubOperationForEdit,

      Reservation,
      ReservationItem,
      ReservationType,
      MaintOrderRoutingNumber,
      MaintOrderOperationCounter,
      Material                                                                                                                   as Product,
      case when Material = ''
         then ComponentDescription
         else cast ( _MaterialText[1:Language = $session.system_language ].MaterialName as potx1 preserving type ) end           as MaintOrdOperationComponentText,
      @Semantics.quantity.unitOfMeasure: 'BaseUnit'
      cast(case MaintOrderCompDebitCreditCode
          when 'S' then -RequirementQuantityInBaseUnit
          else RequirementQuantityInBaseUnit
      end                    as bdmng )                                                                                          as MaintOrdOpCompRequiredQuantity,
      BaseUnit,
      @Semantics.quantity.unitOfMeasure: 'UnitOfEntry'
      cast(case MaintOrderCompDebitCreditCode
          when 'S' then -QuantityInUnitOfEntry
          else QuantityInUnitOfEntry
      end                    as erfmg )                                                                                          as QuantityInUnitOfEntry,
      UnitOfEntry,
      case  when RequirementTime = '240000' and RequirementDate is not initial
      then cast( tstmp_to_dats( dats_tims_to_tstmp(dats_add_days( RequirementDate, 1, 'NULL'), cast( '000000' as abap.tims ),
                       abap_system_timezone( $session.client,'NULL' ),
                       $session.client, 'NULL'), 'UTC', $session.client, 'NULL' ) as bdter preserving type )
      else cast( tstmp_to_dats( dats_tims_to_tstmp(RequirementDate, RequirementTime,
                       abap_system_timezone( $session.client,'NULL' ),
                       $session.client, 'NULL'), 'UTC', $session.client, 'NULL' ) as bdter preserving type )
      end                                                                                                                        as RequirementDate,
      case when RequirementTime  = '240000' and RequirementDate is not initial
      then cast( tstmp_to_tims( dats_tims_to_tstmp(dats_add_days( RequirementDate, 1, 'NULL'), cast( '000000' as abap.tims ),
                          abap_system_timezone( $session.client,'NULL' ),
                          $session.client, 'NULL'), 'UTC', $session.client, 'NULL' ) as bdztp preserving type )
      else cast( tstmp_to_tims( dats_tims_to_tstmp(RequirementDate, RequirementTime,
                          abap_system_timezone( $session.client,'NULL' ),
                          $session.client, 'NULL'), 'UTC', $session.client, 'NULL' ) as bdztp preserving type )
      end                                                                                                                        as RequirementTime,
      case  when RequirementTime = '240000' and RequirementDate is not initial
      then cast(dats_tims_to_tstmp( dats_add_days( RequirementDate, 1, 'NULL'), cast( '000000' as abap.tims ),
                              abap_system_timezone( $session.client,'NULL' ),
                              $session.client, 'NULL') as timestamp preserving type)
      else cast(dats_tims_to_tstmp( RequirementDate,   RequirementTime,
                              abap_system_timezone( $session.client,'NULL' ),
                              $session.client, 'NULL') as timestamp preserving type)
      end                                                                                                                        as RequirementDateTime,
      Supplier,
      Plant,
      StorageLocation,
      MaintComponentItemCategory                                                                                                 as MaintOrdOpCompItemCategory,
      //_ItemCategoryText[1:Language = $session.system_language ].BillOfMaterialItemCategoryDesc as BillOfMaterialItemCategoryDesc,

      GoodsMovementType,
      ReservationIsFinallyIssued,
      MaterialGroup,
      PurReqnOrResvnGeneration,
      MaterialCompIsProcuredDirectly,
      ProductTypeCode,
      ServicePerformer,
      case  when PerformancePeriodStartTime = '240000' and PerformancePeriodStartDate is not initial
      then cast(dats_tims_to_tstmp( dats_add_days( PerformancePeriodStartDate, 1, 'NULL'), cast( '000000' as abap.tims ),
                              abap_system_timezone( $session.client,'NULL' ),
                              $session.client, 'NULL') as timestamp preserving type)
      else cast(dats_tims_to_tstmp( PerformancePeriodStartDate,   PerformancePeriodStartTime,
                              abap_system_timezone( $session.client,'NULL' ),
                              $session.client, 'NULL') as timestamp preserving type)
      end                                                                                                                        as PerformancePeriodStartDateTime,
      case  when PerformancePeriodStartTime = '240000' and PerformancePeriodStartDate is not initial
      then cast( tstmp_to_dats( dats_tims_to_tstmp(dats_add_days( PerformancePeriodStartDate, 1, 'NULL'), cast( '000000' as abap.tims ),
                       abap_system_timezone( $session.client,'NULL' ),
                       $session.client, 'NULL'), 'UTC', $session.client, 'NULL' ) as mmpur_servproc_period_start preserving type )
      else cast( tstmp_to_dats( dats_tims_to_tstmp(PerformancePeriodStartDate, PerformancePeriodStartTime,
                       abap_system_timezone( $session.client,'NULL' ),
                       $session.client, 'NULL'), 'UTC', $session.client, 'NULL' ) as mmpur_servproc_period_start preserving type )
      end                                                                                                                        as PerformancePeriodStartDate,

      case  when PerformancePeriodStartTime = '240000' and PerformancePeriodStartDate is not initial
      then cast( tstmp_to_tims( dats_tims_to_tstmp(dats_add_days( PerformancePeriodStartDate, 1, 'NULL'), cast( '000000' as abap.tims ),
                          abap_system_timezone( $session.client,'NULL' ),
                          $session.client, 'NULL'), 'UTC', $session.client, 'NULL' ) as performanceperiodstarttime preserving type )
      else cast( tstmp_to_tims( dats_tims_to_tstmp(PerformancePeriodStartDate, PerformancePeriodStartTime,
                          abap_system_timezone( $session.client,'NULL' ),
                          $session.client, 'NULL'), 'UTC', $session.client, 'NULL' ) as performanceperiodstarttime preserving type )
      end                                                                                                                        as PerformancePeriodStartTime,
      case  when PerformancePeriodEndTime = '240000' and PerformancePeriodEndDate is not initial
      then cast(dats_tims_to_tstmp( dats_add_days( PerformancePeriodEndDate, 1, 'NULL'), cast( '000000' as abap.tims ),
                                    abap_system_timezone( $session.client,'NULL' ),
                                    $session.client, 'NULL') as timestamp preserving type)
      else cast(dats_tims_to_tstmp( PerformancePeriodEndDate,   PerformancePeriodEndTime,
                                    abap_system_timezone( $session.client,'NULL' ),
                                    $session.client, 'NULL') as timestamp preserving type)
      end                                                                                                                        as PerformancePeriodEndDateTime,
      case  when PerformancePeriodEndTime = '240000' and PerformancePeriodEndDate is not initial
      then cast( tstmp_to_dats( dats_tims_to_tstmp(dats_add_days( PerformancePeriodEndDate, 1, 'NULL'), cast( '000000' as abap.tims ),
                        abap_system_timezone( $session.client,'NULL' ),
                        $session.client, 'NULL'), 'UTC', $session.client, 'NULL' ) as mmpur_servproc_period_end preserving type )
      else cast( tstmp_to_dats( dats_tims_to_tstmp(PerformancePeriodEndDate, PerformancePeriodEndTime,
                        abap_system_timezone( $session.client,'NULL' ),
                        $session.client, 'NULL'), 'UTC', $session.client, 'NULL' ) as mmpur_servproc_period_end preserving type )
      end                                                                                                                        as PerformancePeriodEndDate,

      case  when PerformancePeriodEndTime = '240000' and PerformancePeriodEndDate is not initial
      then cast( tstmp_to_tims( dats_tims_to_tstmp(dats_add_days( PerformancePeriodEndDate, 1, 'NULL'), cast( '000000' as abap.tims ),
                          abap_system_timezone( $session.client,'NULL' ),
                          $session.client, 'NULL'), 'UTC', $session.client, 'NULL' ) as performanceperiodendtime preserving type )
      else cast( tstmp_to_tims( dats_tims_to_tstmp(PerformancePeriodEndDate, PerformancePeriodEndTime,
                          abap_system_timezone( $session.client,'NULL' ),
                          $session.client, 'NULL'), 'UTC', $session.client, 'NULL' ) as performanceperiodendtime preserving type )
      end                                                                                                                        as PerformancePeriodEndTime,
      LeanServiceDuration,
      LeanServiceDurationUnit,
      DistributionFunction,
      MaintOrdCompDeliveryDateAdjmt,
      SrvcSchedgIsAlignedWthOpWrkCtr,
      MaintOrderCompDebitCreditCode,
      GoodsMovementIsAllowed,
      MaintenanceOrderComponentBatch,
      QuantityIsFixed,
      MaintOrdOpComponentCurrency,
      MaintOrdOpComponentGLAccount,
      MaintOrdOpCompCostingRelevancy,
      MaintCompAltvProdUsgeRateInPct,
      MaintOrderOpComponentSortText,
      MaintOrdOpCompIsBulkProduct,
      MaterialProvisionType,
      MaintOrdOpCompAssgdWBSElmntInt,
      cast ( _WBSElement.WBSElement as vdm_ps_posid preserving type )                                                            as WBSElement,
      MaintOrderOpComponentPrice,
      MaintOrdOpCompPriceUnitQty,
      MatlCompIsMarkedForBackflush,
      PurchasingGroup,
      DeliveryTimeInDays,
      MaintOrdOpCompGdsRecipientName,
      MaintOrdOpCompUnloadingPtTxt,
      GoodsReceiptDurationInWorkDays,
      PurchasingInfoRecord,
      OperationLeadTimeOffset,
      OpsLeadTimeOffsetUnit,
      MaintOrdOpCompRequisitioner,
      cast ( coalesce( _PurchaseRequisitionItem.RequirementTracking , MaintOrdOpCompProcmtTrckgNmbr ) as bednr preserving type ) as MaintOrdOpCompProcmtTrckgNmbr,
      ResponsiblePurchaseOrg,
      PurchaseRequisition,
      PurchaseRequisitionItem,
      OverallLimitAmount,
      ExpectedOverallLimitAmount,
      //      MaintOrdCompIsDirectlyProcured,

      MaintOrdOpCompSpecialStockType,
      VariableSizeDimension1,
      VariableSizeDimensionUnit,
      VariableSizeCompFormulaKey,
      VariableSizeDimension2,
      NumberOfVariableSizeItem,
      VariableSizeDimension3,
      VariableSizeItemQuantity,
      VariableSizeComponentUnit,
      RqmtDateIsEnteredManually,
      SupplierProduct,
      MaintOrdCompCmtdQtyIsKept,
      MaintOrdOpCompPurOutlineAgrmt,
      MaintOrdCompPurOutlineAgrmtItm,
      IsDeleted,
      MaintOrdOpCompProcmtCatalog,
      MaintOrdOpCompProcmtCatalogItm,
      QuantityWithdrawnInBaseUnit,
      ConfirmedAvailableQuantity,
      _CompRcvdQuantity,
      _MaintenanceOrderOperation.OperationDescription,
      _ReservationItem.RecipientLocationCode,
      _MaintenanceOrder.ControllingArea                                                                                          as ControllingArea,
      _MaintenanceOrder,
      _MaintenanceOrderOperation,
      _ReservationItem,
      _UnitOfMeasure,
      _UnitOfMeasureEntry,
      _Plant,
      _StorageLocation,
      _ItemCategoryText,
      _ProductTypeCode,
      _ReservationIsFinallyIssued,
      _MaterialGroup,
      _PurReqnOrResvnGeneration,
      _Supplier,
      _MaintOrderOpCompLongText,
      _MaintOrdCompDelivDateAdjmtT,
      _PurReqnOrResvnGenerationText,
      _MaterialGroupText,
      _UnitOfMeasureText,
      _PurchasingGroup,
      _PurchasingOrganization,
      _CostElement

}
where
  _StatusObjectActiveStatus [1: StatusCode = 'I0013'].StatusCode is null // mark for deletion based on system status

//and IsDeleted