I_SupDmndAllDocAssgmt

DDL: I_SUPDMNDALLDOCASSGMT Type: view COMPOSITE

View for Assignment for all Modes

I_SupDmndAllDocAssgmt is a Composite CDS View that provides data about "View for Assignment for all Modes" in SAP S/4HANA. It reads from 5 data sources (I_ARunTimeUnitText, I_ARunAllAssignments, I_ARunCalendarDate, I_CalendarMonthName, I_SupDmndOvwPlant) and exposes 49 fields with key fields Plant, Material, StorageLocation, Batch, RequirementType. It has 4 associations to related views.

Data Sources (5)

SourceAliasJoin Type
I_ARunTimeUnitText ARunTimeUnitText left_outer
I_ARunAllAssignments Assgmt from
I_ARunCalendarDate CalDate left_outer
I_CalendarMonthName CalMonth left_outer
I_SupDmndOvwPlant Plant left_outer

Associations (4)

CardinalityTargetAliasCondition
[1..1] I_Product _Product $projection.Material = _Product.Product
[0..1] I_SalesDocumentScheduleLine _SDSchedule $projection.RequirementDocumentNumber = _SDSchedule.SalesDocument and $projection.RequirementDocumentItem = _SDSchedule.SalesDocumentItem and _SDSchedule.ScheduleLineOrderQuantity > 0
[0..1] I_StockTransptOrdScheduleLine _STOSchedule $projection.RequirementDocumentNumber = _STOSchedule.PurchaseOrder and $projection.PurchasingDocumentItem = _STOSchedule.PurchaseOrderItem and _STOSchedule.ScheduleLineOrderQuantity > 0
[0..1] I_SupDmndAllDocDemand _Demand Assgmt.RequirementDocumentNumber = _Demand.RequirementDocumentNumber and Assgmt.RequirementDocumentItem = _Demand.RequirementDocumentItem and Assgmt.SupProtTimeBucketUUID = _Demand.SupProtTimeBucketUUID and Assgmt.RequestedDate = _Demand.RequestedDate and Assgmt.ProductAvailabilityDate = _Demand.ProductAvailabilityDate and Assgmt.RequirementType = _Demand.RequirementType and Assgmt.Material = _Demand.Material and Assgmt.Plant = _Demand.Plant

Annotations (11)

NameValueLevelField
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.viewType #COMPOSITE view
VDM.lifecycle.contract.type #PUBLIC_LOCAL_API view
AccessControl.authorizationCheck #NOT_REQUIRED view
AbapCatalog.sqlViewName ISUPDMNDADASGMTS view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.sizeCategory #XXL view
EndUserText.label View for Assignment for all Modes view

Fields (49)

KeyFieldSource TableSource FieldDescription
KEY Plant I_ARunAllAssignments Plant
KEY Material I_ARunAllAssignments Material
KEY StorageLocation I_ARunAllAssignments StorageLocation
KEY Batch I_ARunAllAssignments Batch
KEY RequirementType I_ARunAllAssignments RequirementType
KEY RequirementDocumentNumber I_ARunAllAssignments RequirementDocumentNumber
KEY RequirementDocumentItem I_ARunAllAssignments RequirementDocumentItem
KEY SupProtTimeBucketUUID I_ARunAllAssignments SupProtTimeBucketUUID
KEY AssignedSupplyType I_ARunAllAssignments AssignedSupplyType
KEY SupAssgmtSource I_ARunAllAssignments SupAssgmtSource
KEY SupplyNumber I_ARunAllAssignments SupplyNumber
KEY SupplyItem I_ARunAllAssignments SupplyItem
KEY SupplyScheduleLine I_ARunAllAssignments SupplyScheduleLine
KEY RequestedDate I_ARunAllAssignments RequestedDate
KEY ProductAvailabilityDate I_ARunAllAssignments ProductAvailabilityDate
KEY SupplyDeliveryDate I_ARunAllAssignments SupplyDeliveryDate
KEY SupplyAssignmentStatus I_ARunAllAssignments SupplyAssignmentStatus
KEY ARunUUID I_ARunAllAssignments ARunUUID
NumberOfDays I_ARunAllAssignments NumberOfDays
CalendarYear I_ARunCalendarDate CalendarYear
CalendarMonth I_ARunCalendarDate CalendarMonth
CalendarMonthName I_CalendarMonthName CalendarMonthName
CalendarWeek
CalendarDay I_ARunCalendarDate CalendarDay
AssignedQuantityInBaseUnit I_ARunAllAssignments AssignedQuantityInBaseUnit
NormalAssignedQuantityInBsUnt I_ARunAllAssignments NormalAssignedQuantityInBsUnt
PreviewAssignedQuantityInBsUnt I_ARunAllAssignments PreviewAssignedQuantityInBsUnt
ARunTmpAssignedQuantityInBsUnt I_ARunAllAssignments ARunTmpAssignedQuantityInBsUnt
BaseUnit I_ARunAllAssignments BaseUnit
MaterialGroup _Product ProductGroup
MaterialType _Product ProductType
RequirementSegment I_ARunAllAssignments RequirementSegment
CrossPlantConfigurableProduct _Product CrossPlantConfigurableProduct
SupplyProtectionName
SalesOrganization I_SupDmndOvwPlant SalesOrganization
DistributionChannel I_SupDmndOvwPlant DistributionChannel
Division _Product Division
SalesDistrict I_SupDmndOvwPlant SalesDistrict
Customer I_SupDmndOvwPlant PlantCustomer
CompanyCode I_SupDmndOvwPlant CompanyCode
NetPriceAmount
DocumentCurrency
PurchasingDocumentItem I_ARunAllAssignments PurchasingDocumentItem
PurchaseOrder I_ARunAllAssignments PurchaseOrder
PurchaseOrderItem I_ARunAllAssignments PurchaseOrderItem
_Demand _Demand
_SDSchedule _SDSchedule
_STOSchedule _STOSchedule
_Product _Product
@ClientHandling.algorithm: #SESSION_VARIABLE
@VDM: {
  viewType: #COMPOSITE,
  lifecycle.contract.type: #PUBLIC_LOCAL_API
}
@AccessControl: {
  authorizationCheck: #NOT_REQUIRED,
  personalData.blocking: #('TRANSACTIONAL_DATA')
}
@AbapCatalog: {
  sqlViewName: 'ISUPDMNDADASGMTS',
  compiler.compareFilter: true,
  preserveKey:true
 }
@ObjectModel: {
   usageType: {
     dataClass:      #MIXED,
     serviceQuality: #X,
     sizeCategory:   #XXL
   }
}
@EndUserText.label: 'View for Assignment for all Modes'
define view I_SupDmndAllDocAssgmt
  as select from    I_ARunAllAssignments  as Assgmt
    left outer join I_SupDmndOvwPlant     as Plant            on Assgmt.Plant = Plant.Plant
    left outer join I_ARunCalendarDate    as CalDate          on Assgmt.ProductAvailabilityDate = CalDate.CalendarDate
    left outer join I_CalendarMonthName   as CalMonth         on CalDate.CalendarMonth = CalMonth.CalendarMonth
    left outer join I_ARunTimeUnitText    as ARunTimeUnitText on  ARunTimeUnitText.ARunDisplayTimeUnit = '02'
                                                              and ARunTimeUnitText.Language            = $session.system_language
  association [1..1] to I_Product                     as _Product     on  $projection.Material = _Product.Product
  association [0..1] to I_SalesDocumentScheduleLine   as _SDSchedule  on  $projection.RequirementDocumentNumber = _SDSchedule.SalesDocument
                                                                      and $projection.RequirementDocumentItem   = _SDSchedule.SalesDocumentItem
//                                                                      and $projection.ProductAvailabilityDate   = _SDSchedule.ProductAvailabilityDate

                                                                      and _SDSchedule.ScheduleLineOrderQuantity > 0
  association [0..1] to I_StockTransptOrdScheduleLine as _STOSchedule on  $projection.RequirementDocumentNumber  = _STOSchedule.PurchaseOrder
                                                                      and $projection.PurchasingDocumentItem     = _STOSchedule.PurchaseOrderItem
//                                                                      and $projection.ProductAvailabilityDate    = _STOSchedule.ProductAvailabilityDate

                                                                      and _STOSchedule.ScheduleLineOrderQuantity > 0
  association [0..1] to I_SupDmndAllDocDemand         as _Demand      on  Assgmt.RequirementDocumentNumber = _Demand.RequirementDocumentNumber
                                                                      and Assgmt.RequirementDocumentItem   = _Demand.RequirementDocumentItem
                                                                      and Assgmt.SupProtTimeBucketUUID     = _Demand.SupProtTimeBucketUUID
                                                                      and Assgmt.RequestedDate             = _Demand.RequestedDate
                                                                      and Assgmt.ProductAvailabilityDate   = _Demand.ProductAvailabilityDate
                                                                      and Assgmt.RequirementType           = _Demand.RequirementType
                                                                      and Assgmt.Material                  = _Demand.Material
                                                                      and Assgmt.Plant                     = _Demand.Plant

{
  key Assgmt.Plant,
  key Assgmt.Material,
  key Assgmt.StorageLocation,
  key Assgmt.Batch,
  key Assgmt.RequirementType,
  key Assgmt.RequirementDocumentNumber,
  key Assgmt.RequirementDocumentItem,
  key Assgmt.SupProtTimeBucketUUID,
  key Assgmt.AssignedSupplyType,
  key Assgmt.SupAssgmtSource,
  key Assgmt.SupplyNumber,
  key Assgmt.SupplyItem,
  key Assgmt.SupplyScheduleLine,
  key Assgmt.RequestedDate,
  key Assgmt.ProductAvailabilityDate,
  key Assgmt.SupplyDeliveryDate,
  key Assgmt.SupplyAssignmentStatus,
  key Assgmt.ARunUUID,
      case when Assgmt.SalesDocument <> '' then
        _SDSchedule.RequestedDeliveryDate else
        ( case when Assgmt.PurchasingDocument <> '' then _STOSchedule.ScheduleLineDeliveryDate
           else Assgmt.ProductAvailabilityDate end ) end                   as RequestedDeliveryDate,
      Assgmt.NumberOfDays,
      //'Mat. Avail Date - Supply Delivery Date'

      case
        when Assgmt.NumberOfDays <= 0  then '00'
        when Assgmt.NumberOfDays < 7   then '01'
        when Assgmt.NumberOfDays < 14  then '02'
        when Assgmt.NumberOfDays < 21  then '03'
        when Assgmt.NumberOfDays <= 28 then '04'
        when Assgmt.NumberOfDays > 28  then '05'
        else ' '
      end                                                                  as ARunSupDlyHrznInWeeks,
      CalDate.CalendarYear,
      CalDate.CalendarMonth,
      CalMonth.CalendarMonthName,
      concat_with_space( ARunDisplayTimeUnitText, CalDate.CalendarWeek, 1) as CalendarWeek,
      CalDate.CalendarDay,
      Assgmt.AssignedQuantityInBaseUnit                                    as AssignedQuantityInBaseUnit,
      Assgmt.NormalAssignedQuantityInBsUnt                                 as NormalAssignedQuantityInBsUnt,
      Assgmt.PreviewAssignedQuantityInBsUnt                                as PreviewAssignedQuantityInBsUnt,
      Assgmt.ARunTmpAssignedQuantityInBsUnt                                as ARunTmpAssignedQuantityInBsUnt,
      Assgmt.BaseUnit,
       _Product.ProductGroup                                                as MaterialGroup,
      _Product.ProductType                                                 as MaterialType,
      Assgmt.RequirementSegment,
      _Product.CrossPlantConfigurableProduct,
      cast( '' as sup_object_name)                                         as SupplyProtectionName,
      Plant.SalesOrganization                                              as SalesOrganization,
      Plant.DistributionChannel                                            as DistributionChannel,
      _Product.Division                                                    as Division,
      Plant.SalesDistrict                                                  as SalesDistrict,
      Plant.PlantCustomer                                                  as Customer,
      Plant.CompanyCode                                                    as CompanyCode,
      cast( 0 as netpr)                                                    as NetPriceAmount,
      cast( '' as waerk)                                                   as DocumentCurrency,
      Assgmt.PurchasingDocumentItem,
      Assgmt.PurchaseOrder,
      Assgmt.PurchaseOrderItem,
      _Demand,
      _SDSchedule,
      _STOSchedule,
      _Product
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_ARUNALLASSIGNMENTS",
"I_ARUNCALENDARDATE",
"I_ARUNTIMEUNITTEXT",
"I_CALENDARMONTHNAME",
"I_PRODUCT",
"I_SALESDOCUMENTSCHEDULELINE",
"I_STOCKTRANSPTORDSCHEDULELINE",
"I_SUPDMNDOVWPLANT"
],
"ASSOCIATED":
[
"I_PRODUCT",
"I_SALESDOCUMENTSCHEDULELINE",
"I_STOCKTRANSPTORDSCHEDULELINE",
"I_SUPDMNDALLDOCDEMAND"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/