I_MRPOutboundDelivery

DDL: I_MRPOUTBOUNDDELIVERY SQL: IMRPOUTBNDDEL Type: view COMPOSITE Package: ODATA_PP_MRP

MRP Outbound Delivery

I_MRPOutboundDelivery is a Composite CDS View that provides data about "MRP Outbound Delivery" in SAP S/4HANA. It has 5 associations to related views. Part of development package ODATA_PP_MRP.

Associations (5)

CardinalityTargetAliasCondition
[1..1] I_OutboundDelivery _OutboundDelivery $projection.Delivery = _OutboundDelivery.OutboundDelivery
[0..1] I_UnitOfMeasure _BaseUnit $projection.BaseUnit = _BaseUnit.UnitOfMeasure
[0..1] I_UnitOfMeasure _SalesUnit $projection.SalesUnit = _SalesUnit.UnitOfMeasure
[0..1] I_WBSElementBasicData _WBSElement $projection.WBSElementInternalID = _WBSElement.WBSElementInternalID
[0..1] I_EntProjectResponsiblePerson _ProjectRespPersn $projection.WBSElementInternalID = _ProjectRespPersn.WBSElementInternalID and _ProjectRespPersn.WBSElementInternalID is not initial

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName IMRPOUTBNDDEL view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #CHECK view
EndUserText.label MRP Outbound Delivery view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #MIXED view
VDM.viewType #COMPOSITE view
AccessControl.personalData.blocking #REQUIRED view

Fields (67)

KeyFieldSource TableSource FieldDescription
KEY Delivery OutboundDelivery
KEY DeliveryItem OutboundDeliveryItem
DeliveryType _OutboundDelivery DeliveryDocumentType
DocumentDate _OutboundDelivery DocumentDate
ReferenceDocument ReferenceSDDocument
ReferenceDocumentItem ReferenceSDDocumentItem
MRPPlant Plant
MRPPlantName _Plant PlantName
Material Material
MaterialName
MaterialGroup MaterialGroup
StorageLocation StorageLocation
Batch Batch
InventorySpecialStockType InventorySpecialStockType
ReferenceSDDocumentCategory ReferenceSDDocumentCategory
WBSElementInternalID WBSElementInternalID
WBSElementExternalID _WBSElement WBSElementExternalID
WBSDescription _WBSElement WBSDescription
ProjectExternalID
ProjectDescription
ResponsiblePerson
ResponsiblePersonName
MaterialByCustomer MaterialByCustomer
SalesOrder
SalesOrderItem 0
SalesOrderType
SalesOrderItemMaterial
DeliveryToBaseQuantityDnmntr DeliveryToBaseQuantityDnmntr
ActualDeliveryQuantity ActualDeliveryQuantity
DeliveryToBaseQuantityNmrtr DeliveryToBaseQuantityNmrtr
SalesOrganization _OutboundDelivery SalesOrganization
DistributionChannel DistributionChannel
Division Division
CustomerGroup _OutboundDelivery CustomerGroup
Customer _OutboundDelivery ShipToParty
CustomerName
CustomerFullName
ContactPersonPhoneNumber
DeliveryBlockReason _OutboundDelivery DeliveryBlockReason
DeliveryBlockReasonText
DeliveryPriority _OutboundDelivery DeliveryPriority
DeliveryPriorityDesc
CompleteDeliveryIsDefined _OutboundDelivery CompleteDeliveryIsDefined
MaxNumberOfPartialDelivery
RequestedDeliveryDate _OutboundDelivery DeliveryDate
RequestedLoadingDate _OutboundDelivery LoadingDate
RequestedGoodsIssueDate _OutboundDelivery PlannedGoodsIssueDate
ProductAvailabilityDate ProductAvailabilityDate
BaseUnit BaseUnit
DeliveredQuantityInBaseUnit ActualDeliveredQtyInBaseUnit
SalesUnit DeliveryQuantityUnit
DeliveredQuantityInSalesUnit ActualDeliveryQuantity
ReferenceSDDocument ReferenceSDDocument
_BaseUnit _BaseUnit
_SalesUnit _SalesUnit
_OutboundDelivery _OutboundDelivery
_WBSElement _WBSElement
_DeliveryPriority _OutboundDelivery _DeliveryPriority
_DeliveryBlockReason _OutboundDelivery _DeliveryBlockReason
_ShipToParty _OutboundDelivery _ShipToParty
_DeliveryDocumentType _OutboundDelivery _DeliveryDocumentType
_Plant _Plant
_ReferenceSDDocument _ReferenceSDDocument
_Material _Material
_DeliveryQuantityUnit _DeliveryQuantityUnit
_ReferenceSalesDocumentItem _ReferenceSalesDocumentItem
_ReferenceSDDocumentCategory _ReferenceSDDocumentCategory
@AbapCatalog.sqlViewName: 'IMRPOUTBNDDEL'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'MRP Outbound Delivery'

@ClientHandling.algorithm: #SESSION_VARIABLE

@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.sizeCategory: #L
@ObjectModel.usageType.dataClass: #MIXED

@VDM.viewType: #COMPOSITE
@AccessControl.personalData.blocking: #REQUIRED

define view I_MRPOutboundDelivery
  as select distinct from I_OutboundDeliveryItem
  association [1..1] to I_OutboundDelivery as _OutboundDelivery on $projection.Delivery = _OutboundDelivery.OutboundDelivery
  /* View name and Field names are changing. View is not released
     left outer join I_CustomerMaterialInfoRecd as CustomerMaterial
                                                on CustomerMaterial.SalesOrganization = _OutboundDelivery.SalesOrganization
                                               and CustomerMaterial.DistributionChannel = DistributionChannel
                                               and CustomerMaterial.SoldToParty = _OutboundDelivery.ShipToParty
                                               and CustomerMaterial.Material = Material
    */
  association [0..1] to I_UnitOfMeasure            as _BaseUnit            on $projection.BaseUnit = _BaseUnit.UnitOfMeasure
  association [0..1] to I_UnitOfMeasure            as _SalesUnit           on $projection.SalesUnit = _SalesUnit.UnitOfMeasure
  association [0..1] to I_WBSElementBasicData      as _WBSElement          on $projection.WBSElementInternalID = _WBSElement.WBSElementInternalID
  association [0..1] to I_EntProjectResponsiblePerson as _ProjectRespPersn on $projection.WBSElementInternalID = _ProjectRespPersn.WBSElementInternalID
                                                                           and _ProjectRespPersn.WBSElementInternalID is not initial
  
{
  key OutboundDelivery                                                                                              as Delivery,
  key OutboundDeliveryItem                                                                                          as DeliveryItem,
      _OutboundDelivery.DeliveryDocumentType                                                                        as DeliveryType,
      _OutboundDelivery.DocumentDate,
      ReferenceSDDocument                                                                                           as ReferenceDocument,
      ReferenceSDDocumentItem                                                                                       as ReferenceDocumentItem,
      Plant                                                                                                         as MRPPlant,
      _Plant.PlantName                                                                                              as MRPPlantName,
      Material,
      _Material._Text[1: Language = $session.system_language ].MaterialName,
      MaterialGroup,
      StorageLocation,
      Batch,
      InventorySpecialStockType,
      ReferenceSDDocumentCategory,
      // RelatedObjects group

      WBSElementInternalID,
      _WBSElement.WBSElementExternalID,
      _WBSElement.WBSDescription,
      _WBSElement._Project.ProjectExternalID,
      _WBSElement._Project.ProjectDescription,

      cast( _ProjectRespPersn.PersonWorkAgreement as ps_s4_vernr preserving type )                                  as ResponsiblePerson, //WBS Responsible

      _ProjectRespPersn._WorkforcePerson.PersonFullName                                                             as ResponsiblePersonName, //WBS Responsible


      MaterialByCustomer,
      // Sales and Customer data

      ''                                                                                                            as SalesOrder,
      0                                                                                                             as SalesOrderItem,
      ''                                                                                                            as SalesOrderType,
      ''                                                                                                            as SalesOrderItemMaterial,
      DeliveryToBaseQuantityDnmntr,
      ActualDeliveryQuantity,
      DeliveryToBaseQuantityNmrtr,
      @Semantics.quantity.unitOfMeasure: 'BaseUnit'
      case
         when DeliveryToBaseQuantityDnmntr < 1 then ActualDeliveryQuantity
         else division(ActualDeliveryQuantity * DeliveryToBaseQuantityNmrtr, DeliveryToBaseQuantityDnmntr, 5)
       end                                                                                                          as OrderQuantity,

      /*    Sales Order (KDAUF, KDPOS) currently not provided by basic reuse view
            SalesOrder,
            SalesOrderItem,
            _SalesOrder.SalesOrderType,
            SalesOrderMaterial as SalesOrderItemMaterial, */
      _OutboundDelivery.SalesOrganization,
      DistributionChannel,
      Division,
      _OutboundDelivery.CustomerGroup,
      _OutboundDelivery.ShipToParty                                                                                 as Customer,
      _OutboundDelivery._ShipToParty.BPCustomerName                                                                 as CustomerName,
      _OutboundDelivery._ShipToParty.BPCustomerFullName                                                             as CustomerFullName,
      _OutboundDelivery._ShipToParty._StandardAddress.PhoneNumber                                                   as ContactPersonPhoneNumber,
      //_OutboundDelivery._ShipToParty._StandardAddress._DefaultEmailAddress.EmailAddress                           as ContactPersonEmailAddress, // Commented out as prop is not needed and

      // it leads to a full table scan of ADR6 table

      // Material By Customer

      /*
      CustomerMaterial.MaterialByCustomer,
      @Semantics.unitOfMeasure: true
      CustomerMaterial.BaseUnit as CustomerMaterialBaseUnit,
      @DefaultAggregation: #SUM
      @Semantics.quantity.unitOfMeasure: 'BaseUnit'
      CustomerMaterial.MinDeliveryQtyInBaseUnit,
      */

      // Delivery attributes

      _OutboundDelivery.DeliveryBlockReason,
      _OutboundDelivery._DeliveryBlockReason._Text[1: Language = $session.system_language ].DeliveryBlockReasonText as DeliveryBlockReasonText,
      case _OutboundDelivery.DeliveryBlockReason
        when '' then ''
        else 'X'
      end                                                                                                           as DeliveryIsBlocked,
      _OutboundDelivery.DeliveryPriority,
      _OutboundDelivery._DeliveryPriority._Text[1: Language = $session.system_language ].DeliveryPriorityDesc       as DeliveryPriorityDesc,
      _OutboundDelivery.CompleteDeliveryIsDefined,
      case _OutboundDelivery.CompleteDeliveryIsDefined
        when '' then case DeliveryGroup
          when '000' then case PartialDeliveryIsAllowed
            when '' then 'X'
            when 'D' then 'X'
            else ''
            end
          else ''
          end
        else ''
      end                                                                                                           as PartialDeliveryIsAllowed,
      case _OutboundDelivery.OverallGoodsMovementStatus
        when 'C' then 'X'
        else ''
      end                                                                                                           as DeliveryIsPostedGoodsIssue,
      --    MaxNumberOfPartialDelivery,  //not yet available


      // Dates

      _OutboundDelivery.DeliveryDate                                                                                as RequestedDeliveryDate,
      _OutboundDelivery.LoadingDate                                                                                 as RequestedLoadingDate,
      _OutboundDelivery.PlannedGoodsIssueDate                                                                       as RequestedGoodsIssueDate,
      ProductAvailabilityDate,

      // Quantities and UoM

      @Semantics.unitOfMeasure: true
      BaseUnit,
      @DefaultAggregation: #SUM
      @Semantics.quantity.unitOfMeasure: 'BaseUnit'
      ActualDeliveredQtyInBaseUnit                                                                                  as DeliveredQuantityInBaseUnit,
      @Semantics.unitOfMeasure: true
      DeliveryQuantityUnit                                                                                          as SalesUnit,
      @DefaultAggregation: #SUM
      @Semantics.quantity.unitOfMeasure: 'SalesUnit'
      ActualDeliveryQuantity                                                                                        as DeliveredQuantityInSalesUnit,

      ReferenceSDDocument,
      //QuickviewCategory,


      // Associations

      _BaseUnit,
      _SalesUnit,
      _OutboundDelivery,
      _WBSElement,
      _OutboundDelivery._DeliveryPriority,
      _OutboundDelivery._DeliveryBlockReason,
      _OutboundDelivery._ShipToParty,
      _OutboundDelivery._DeliveryDocumentType,
      _Plant,
      _ReferenceSDDocument,
      _Material,
      _DeliveryQuantityUnit,
      _ReferenceSalesDocumentItem,
      _ReferenceSDDocumentCategory
};