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 100 fields with key fields MaintenanceOrder, MaintenanceOrderOperation, MaintenanceOrderSubOperation, MaintOrderComponentInternalID. It has 3 associations to related views.

Data Sources (1)

SourceAliasJoin Type
I_MaintenanceOrderComponent_2 I_MaintenanceOrderComponent_2 from

Associations (3)

CardinalityTargetAliasCondition
[1..1] R_MaintenanceOrderTP _MaintenanceOrder $projection.MaintenanceOrder = _MaintenanceOrder.MaintenanceOrder
[0..1] I_WBSElementBasicData _WBSElement _WBSElement.WBSElementInternalID = $projection.MaintOrdOpCompAssgdWBSElmntInt
[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 (100)

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
MaintOrdOpCompRequiredQuantity RequirementQuantityInBaseUnit
BaseUnit BaseUnit
QuantityInUnitOfEntry QuantityInUnitOfEntry
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 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
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
@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

{

  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,
      RequirementQuantityInBaseUnit                                                                                    as MaintOrdOpCompRequiredQuantity,
      BaseUnit,
      QuantityInUnitOfEntry,
      UnitOfEntry,
      case RequirementTime when '240000'
      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 RequirementTime when '240000'
      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 RequirementTime when '240000'
      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 PerformancePeriodStartTime when '240000'
      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 PerformancePeriodStartTime when '240000'
      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 PerformancePeriodStartTime when '240000'
      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 PerformancePeriodEndTime when '240000'
      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 PerformancePeriodEndTime when '240000'
      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 PerformancePeriodEndTime when '240000'
      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,
      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,

      _ReservationItem.RecipientLocationCode,
      _MaintenanceOrder.ControllingArea,
      _MaintenanceOrder,
      _MaintenanceOrderOperation,
      _ReservationItem,
      _UnitOfMeasure,
      _UnitOfMeasureEntry,
      _Plant,
      _StorageLocation,
      _ItemCategoryText,
      _ProductTypeCode,
      _ReservationIsFinallyIssued,
      _MaterialGroup,
      _PurReqnOrResvnGeneration,
      _Supplier,
      _MaintOrderOpCompLongText,
      _MaintOrdCompDelivDateAdjmtT

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

//and IsDeleted 

/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_MAINTENANCEORDERCOMPONENT_2",
"I_MATERIALTEXT",
"I_RESERVATIONDOCUMENTITEM",
"I_STATUSOBJECTACTIVESTATUS",
"I_WBSELEMENTBASICDATA",
"R_MAINTENANCEORDERTP"
],
"ASSOCIATED":
[
"I_INDICATOR",
"I_MAINTCOMPITEMCATEGORYTXT",
"I_MAINTORDCOMPDELIVDATEADJMTT",
"I_MATERIALGROUP",
"I_PLANT",
"I_PMUNITOFMEASUREVH",
"I_PRODUCTTYPECODE",
"I_PURREQNORRESVNGENERATION",
"I_RESERVATIONDOCUMENTITEM",
"I_STORAGELOCATION",
"I_SUPPLIER",
"R_MAINTENANCEORDEROPERATIONTP",
"R_MAINTENANCEORDERTP",
"R_MAINTORDEROPCOMPLONGTEXTTP_2"
],
"BASE":
[
"I_MAINTENANCEORDERCOMPONENT_2"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/