I_DepdntResvnQuickView

DDL: I_DEPDNTRESVNQUICKVIEW SQL: IDEPDNTRESVQV Type: view COMPOSITE

Dependent Requirement and Order Reservation Details

I_DepdntResvnQuickView is a Composite CDS View that provides data about "Dependent Requirement and Order Reservation Details" in SAP S/4HANA. It reads from 2 data sources (I_ProductSupplyPlanning, I_ReservationItem) and exposes 47 fields with key fields Reservation, ReservationItem, RecordType. It has 4 associations to related views.

Data Sources (2)

SourceAliasJoin Type
I_ProductSupplyPlanning marc inner
I_ReservationItem resb from

Associations (4)

CardinalityTargetAliasCondition
[0..1] I_PlannedOrderQuickView _plaf $projection.PlannedOrder = _plaf.PlannedOrder and resb.RequirementType = 'SB'
[0..1] I_ProductionOrderQuickView _afpo $projection.ManufacturingOrder = _afpo.OrderID and _afpo.ManufacturingOrderItem = '0001' and resb.RequirementType = 'AR'
[0..1] I_Order _Order $projection.ManufacturingOrder = _Order.OrderID
[0..1] I_RoundingPrfText _RoundingProfile $projection.RoundingProfile = _RoundingProfile.MaterialRoundingProfile and $projection.Plant = _RoundingProfile.Plant

Annotations (11)

NameValueLevelField
AbapCatalog.sqlViewName IDEPDNTRESVQV view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #CHECK view
EndUserText.label Dependent Requirement and Order Reservation Details view
VDM.viewType #COMPOSITE view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.dataClass #MIXED view
AccessControl.personalData.blocking #BLOCKED_DATA_EXCLUDED view

Fields (47)

KeyFieldSource TableSource FieldDescription
KEY Reservation Reservation
KEY ReservationItem ReservationItem
KEY RecordType RecordType
RequirementType I_ReservationItem RequirementType
RequirementDate I_ReservationItem MatlCompRequirementDate
Material I_ReservationItem Material
Plant I_ReservationItem Plant
PlannedOrder I_ReservationItem PlannedOrder
ManufacturingOrder I_ReservationItem ReferenceOrder
BaseUnit I_ReservationItem BaseUnit
CommittedQuantity I_ReservationItem ConfdQtyForATPInBaseUoM
WithdrawnQuantity I_ReservationItem ResvnItmWithdrawnQtyInBaseUnit
MRPElementOpenQuantity
MaterialendasParentComponent
MRPPlantendasParentPlant
MRPControllerendasMRPController
MRPControllerNameendasMRPControllerName
ManufacturingOrderTypeendasOrderType
MfgOrderPlannedEndDateendasBasicEndDate
MRPElementOpenQuantityendasOpenQuantity
ProductionPlantendasProductionPlant
ProductionVersionendasProductionVersion
ProductionLineendasProductionLine
WorkCenterTextendasProductionLineText
SalesOrderendasSalesOrder
SalesOrderItemendasSalesOrderItem
CustomerelseendasCustomer
CustomerNameelseendasCustomerName
WBSElementendasWBSElement
InHouseProductionTime I_ProductSupplyPlanning InHouseProductionTime
TotalReplenishmentLeadTime I_ProductSupplyPlanning TotalReplenishmentLeadTime
MinimumLotSizeQuantity I_ProductSupplyPlanning MinimumLotSizeQuantity
MaximumLotSizeQuantity I_ProductSupplyPlanning MaximumLotSizeQuantity
LotSizeRoundingQuantity I_ProductSupplyPlanning LotSizeRoundingQuantity
RoundingProfile I_ProductSupplyPlanning RoundingProfile
MaterialRoundingProfileName
PlannedOrderOpeningDate
MaterialProcurementType
MaterialProcurementTypeName
MfgOrderReleasedCode _afpo MfgOrderReleasedCode
MfgOrderScheduledReleaseDate _afpo MfgOrderScheduledReleaseDate
MfgOrderScheduledStartDate _afpo MfgOrderScheduledStartDate
MfgOrderScheduledEndDate _afpo MfgOrderScheduledEndDate
ExpectedDeviationQuantity _afpo ExpectedDeviationQuantity
ManufacturingOrderImportance _afpo ManufacturingOrderImportance
ManufacturingOrderCategory _afpo ManufacturingOrderCategory
_Order _Order
@AbapCatalog.sqlViewName: 'IDEPDNTRESVQV'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Dependent Requirement and Order Reservation Details'
@VDM.viewType: #COMPOSITE
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType: {serviceQuality: #X, sizeCategory: #XXL, dataClass: #MIXED}
@AccessControl.personalData.blocking: #BLOCKED_DATA_EXCLUDED
define view I_DepdntResvnQuickView
  as select from I_ReservationItem       as resb
    inner join   I_ProductSupplyPlanning as marc on  resb.Material = marc.Product
                                                 and resb.Plant    = marc.Plant
                                               
  association [0..1] to I_PlannedOrderQuickView    as _plaf            on  $projection.PlannedOrder = _plaf.PlannedOrder
                                                                       and resb.RequirementType     = 'SB'
  association [0..1] to I_ProductionOrderQuickView as _afpo            on  $projection.ManufacturingOrder = _afpo.OrderID
                                                                       and _afpo.ManufacturingOrderItem   = '0001'
                                                                       and resb.RequirementType           = 'AR'
  association [0..1] to I_Order                    as _Order           on  $projection.ManufacturingOrder = _Order.OrderID
  association [0..1] to I_RoundingPrfText          as _RoundingProfile on  $projection.RoundingProfile = _RoundingProfile.MaterialRoundingProfile
                                                                       and $projection.Plant           = _RoundingProfile.Plant
                                                                       

{
      //Common Fields

  key Reservation,
  key ReservationItem,
  key RecordType,
      resb.RequirementType,
      resb.MatlCompRequirementDate                                             as RequirementDate,
      resb.Material,
      resb.Plant,
      resb.PlannedOrder,
      resb.ReferenceOrder                                                      as ManufacturingOrder,
      @Semantics.unitOfMeasure: true
      resb.BaseUnit,
      @Semantics.quantity.unitOfMeasure: 'BaseUnit'
      resb.ConfdQtyForATPInBaseUoM                                             as CommittedQuantity,
      @Semantics.quantity.unitOfMeasure: 'BaseUnit'
      resb.ResvnItmWithdrawnQtyInBaseUnit                                      as WithdrawnQuantity,
      @Semantics.quantity.unitOfMeasure: 'BaseUnit'
      resb.ResvnItmRequiredQtyInBaseUnit - resb.ResvnItmWithdrawnQtyInBaseUnit as MRPElementOpenQuantity,

      case RequirementType
      when 'SB'
      then _plaf(P_MRPElementCategory:'PA').Material
      else _afpo.Material
      end                                                                      as ParentComponent,

      case RequirementType
      when 'SB'
      then _plaf(P_MRPElementCategory:'PA').MRPPlant
      else _afpo.MRPPlant
      end                                                                      as ParentPlant,

      case RequirementType
      when 'SB'
      then _plaf(P_MRPElementCategory : 'PA').MRPController
      else _afpo.MRPController
      end                                                                      as MRPController,

      case RequirementType
      when 'SB'
      then _plaf(P_MRPElementCategory : 'PA').MRPControllerName
      else _afpo.MRPControllerName
      end                                                                      as MRPControllerName,

      case RequirementType
      when 'SB'
      then _plaf(P_MRPElementCategory : 'PA').InternalContactPersonName
      else _afpo.InternalContactPersonName
      end                                                                      as InternalContactPersonName,

      case RequirementType
      when 'SB'
      then _plaf(P_MRPElementCategory : 'PA').InternalContactPhoneNumber
      else _afpo.InternalContactPhoneNumber
      end                                                                      as InternalContactPhoneNumber,

      case RequirementType
      when 'SB'
      then _plaf(P_MRPElementCategory : 'PA').InternalContactEmailAddress
      else _afpo.InternalContactEmailAddress
      end                                                                      as InternalContactEmailAddress,

      case RequirementType
      when 'SB'
      then _plaf(P_MRPElementCategory : 'PA').ProductionSupervisor
      else _afpo.ProductionSupervisor
      end                                                                      as ProductionSupervisor,

      case RequirementType
      when 'SB'
      then _plaf(P_MRPElementCategory : 'PA').ProductionSupervisorName
      else _afpo.ProductionSupervisorName
      end                                                                      as ProductionSupervisorName,

      case RequirementType
      when 'SB'
      then _plaf(P_MRPElementCategory : 'PA').PlndOrderPlannedTotalQty
      else ResvnItmRequiredQtyInBaseUnit
      end                                                                      as OrderedQuantity,

      case RequirementType
      when 'SB'
      then _plaf(P_MRPElementCategory:'PA').PlannedOrderType
      else _afpo.ManufacturingOrderType
      end                                                                      as OrderType,

      case RequirementType
      when 'SB'
      then _plaf(P_MRPElementCategory:'PA').PlannedOrderTypeName
      else _afpo.ManufacturingOrderTypeName
      end                                                                      as OrderTypeName,

      case RequirementType
      when 'SB'
      then _plaf(P_MRPElementCategory:'PA').PlndOrderPlannedStartDate
      else _afpo.MfgOrderPlannedStartDate
      end                                                                      as BasicStartDate,

      case RequirementType
      when 'SB'
      then _plaf(P_MRPElementCategory:'PA').PlndOrderPlannedEndDate
      else _afpo.MfgOrderPlannedEndDate
      end                                                                      as BasicEndDate,

      case RequirementType
      when 'SB'
      then _plaf(P_MRPElementCategory:'PA').MaterialGoodsReceiptDuration
      else _afpo.MaterialGoodsReceiptDuration
      end                                                                      as MaterialGoodsReceiptDuration,

      case RequirementType
      when 'SB'
      then _plaf(P_MRPElementCategory:'PA').PlndOrderPlannedTotalQty
      else _afpo.MfgOrderPlannedTotalQty
      end                                                                      as TotalQuantity,

      case RequirementType
      when 'SB'
      then _plaf(P_MRPElementCategory:'PA').PlndOrderPlannedScrapQty
      else _afpo.MfgOrderPlannedScrapQty
      end                                                                      as MRPElementPlannedScrapQuantity,

      case RequirementType
      when 'SB'
      then _plaf(P_MRPElementCategory:'PA').GoodsReceiptQty
      else _afpo.MfgOrderItemGoodsReceiptQty
      end                                                                      as GoodsReceiptQty,

      case RequirementType
      when 'SB'
      then resb.ResvnItmRequiredQtyInBaseUnit - _plaf(P_MRPElementCategory:'PA').PlndOrderPlannedScrapQty - _plaf(P_MRPElementCategory:'PA').PlndOrderPlannedScrapQty
      else _afpo.MRPElementOpenQuantity
      end                                                                      as OpenQuantity,

      case RequirementType
      when 'SB'
      then _plaf(P_MRPElementCategory:'PA').ProductionPlant
      else _afpo.ProductionPlant
      end                                                                      as ProductionPlant,

      case RequirementType
      when 'SB'
      then _plaf(P_MRPElementCategory:'PA').ProductionPlantName
      else _afpo.ProductionPlantName
      end                                                                      as ProductionPlantName,

      case RequirementType
      when 'SB'
      then _plaf(P_MRPElementCategory:'PA').ProductionVersion
      else _afpo.ProductionVersion
      end                                                                      as ProductionVersion,

      case RequirementType
      when 'SB'
      then _plaf(P_MRPElementCategory:'PA').ProductionVersionText
      else _afpo.ProductionVersionText
      end                                                                      as ProductionVersionText,

      case RequirementType
      when 'SB'
      then _plaf(P_MRPElementCategory:'PA').ProductionLine
      else _afpo.ProductionLine
      end                                                                      as ProductionLine,
      
      case RequirementType
      when 'SB'
      then _plaf(P_MRPElementCategory:'PA')._ProductionLineText.WorkCenterText
      else _afpo._ProductionLineText.WorkCenterText
      end                                                                      as ProductionLineText,
      
      case RequirementType
      when 'SB'
      then _plaf(P_MRPElementCategory:'PA').SalesOrder
      else _afpo.SalesOrder
      end                                                                      as SalesOrder,

      case RequirementType
      when 'SB'
      then _plaf(P_MRPElementCategory:'PA').SalesOrderItem
      else _afpo.SalesOrderItem
      end                                                                      as SalesOrderItem,

      case RequirementType
      when 'SB'
      then _plaf(P_MRPElementCategory:'PA').Customer
      else ''
      end                                                                      as Customer,

      case RequirementType
      when 'SB'
      then _plaf(P_MRPElementCategory:'PA').CustomerName
      else ''
      end                                                                      as CustomerName,

      case RequirementType
      when 'SB'
      then _plaf(P_MRPElementCategory:'PA').WBSElement
      else _afpo.WBSElement
      end                                                                      as WBSElement,

      marc.InHouseProductionTime,
      marc.TotalReplenishmentLeadTime,
      marc.MinimumLotSizeQuantity,
      marc.MaximumLotSizeQuantity,
      marc.LotSizeRoundingQuantity,
      marc.RoundingProfile,
      _RoundingProfile[1:Language = $session.system_language].MaterialRoundingProfileName,


      //PLAF Fields

      _plaf(P_MRPElementCategory:'PA').PlannedOrderOpeningDate,
      _plaf(P_MRPElementCategory:'PA').MaterialProcurementType,
      _plaf(P_MRPElementCategory:'PA').MaterialProcurementTypeName,

      //MFG Order Fields

      _afpo.MfgOrderReleasedCode,
      _afpo.MfgOrderScheduledReleaseDate,
      _afpo.MfgOrderScheduledStartDate,
      _afpo.MfgOrderScheduledEndDate,
      _afpo.ExpectedDeviationQuantity,
      _afpo.ManufacturingOrderImportance,
      _afpo.ManufacturingOrderCategory,

      _Order
      
}
where
  (
       RequirementType                =  'SB'
    or RequirementType                =  'AR'
  )
  and  ReservationItmIsMarkedForDeltn <> 'X'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_PLANNEDORDERQUICKVIEW",
"I_PRODUCTIONORDERQUICKVIEW",
"I_PRODUCTSUPPLYPLANNING",
"I_RESERVATIONITEM",
"I_ROUNDINGPRFTEXT",
"I_WORKCENTERTEXTBYSEMANTICKEY"
],
"ASSOCIATED":
[
"I_ORDER",
"I_PLANNEDORDERQUICKVIEW",
"I_PRODUCTIONORDERQUICKVIEW",
"I_ROUNDINGPRFTEXT"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/