C_SupDmndTotSlsOrdQuery

DDL: C_SUPDMNDTOTSLSORDQUERY Type: view CONSUMPTION Package: VDM_ARUN_ANALYTICS

Query View for Total Demand

C_SupDmndTotSlsOrdQuery is a Consumption CDS View that provides data about "Query View for Total Demand" in SAP S/4HANA. It reads from 15 data sources and exposes 90 fields with key fields RequirementDocumentNumber, RequirementDocumentItem, RequestedDate, ProductAvailabilityDate, RequirementType. It has 1 association to related views. Part of development package VDM_ARUN_ANALYTICS.

Data Sources (15)

SourceAliasJoin Type
I_ARunCancDteSupDlyHrznT CancDteSupDlyHrznT left_outer
I_RetailCharacteristicValueT CharValTexts1 left_outer
I_RetailCharacteristicValueT CharValTexts2 left_outer
I_RetailCharacteristicValueT CharValTexts3 left_outer
I_CompanyCode CompanyCode left_outer
I_Customer Customer left_outer
I_SupDmndOvwTotalDemandCube Demand from
I_DistributionChannelText DistChl left_outer
I_DivisionText Div left_outer
I_Material Material left_outer
I_MaterialText MaterialText left_outer
I_MaterialGroupText MatGrpText left_outer
I_Plant Plant left_outer
I_SalesDistrictText SalesDist left_outer
I_SalesOfficeText SalesOffice left_outer

Associations (1)

CardinalityTargetAliasCondition
[0..1] I_DivisionText _OrganizationDivn $projection.OrganizationDivision = _OrganizationDivn.Division and _OrganizationDivn.Language = $session.system_language

Annotations (11)

NameValueLevelField
AbapCatalog.sqlViewName CSDOSOQRY view
AbapCatalog.compiler.compareFilter true view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.sizeCategory #XXL view
AccessControl.authorizationCheck #CHECK view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ClientHandling.type #INHERITED view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.viewType #CONSUMPTION view
AccessControl.personalData.blocking #REQUIRED view
EndUserText.label Query View for Total Demand view

Fields (90)

KeyFieldSource TableSource FieldDescription
KEY RequirementDocumentNumber RequirementDocumentNumber Requirement Document Number
KEY RequirementDocumentItem RequirementDocumentItem Requirement Document Item
KEY RequestedDate RequestedDate Requested Date
KEY ProductAvailabilityDate ProductAvailabilityDate
KEY RequirementType RequirementType Requirement Type
DeliveredQuantityInBaseUnit DeliveredQuantityInBaseUnit Delivered Quantity
RequestedRqmtQtyInBaseUnit RequestedRqmtQtyInBaseUnit Order Quantity
ConfirmedRqmtQtyInBaseUnit ConfirmedRqmtQtyInBaseUnit Confirmed Quantity
OpenDemandQuantity OpenDemandQuantity Open Demand Quantity
RequirementTypeName RequirementTypeName Requirement Type Name
OrderType OrderType Document Type
SalesOrganization I_SupDmndOvwTotalDemandCube SalesOrganization
DistributionChannel I_SupDmndOvwTotalDemandCube DistributionChannel
RequestedDeliveryDate RequestedDeliveryDate Requested Delivery Date
SoldToParty SoldToParty
CompanyCode I_SupDmndOvwTotalDemandCube CompanyCode Company Code
PartnerFunction PartnerFunction
ShipToParty ShipToParty
SalesDocumentItemCategory SalesDocumentItemCategory
Division I_SupDmndOvwTotalDemandCube Division
Material I_SupDmndOvwTotalDemandCube Material
MaterialGroup I_SupDmndOvwTotalDemandCube MaterialGroup
BaseUnit BaseUnit
DeliveryGroup DeliveryGroup
ItemBillingBlockReason ItemBillingBlockReason
NetAmount NetAmount
DocumentCurrency DocumentCurrency
Plant I_SupDmndOvwTotalDemandCube Plant
StorageLocation StorageLocation
ShippingPoint ShippingPoint
NetPriceAmount NetPriceAmount
NetPriceQuantity NetPriceQuantity
RequirementSegment RequirementSegment
ProductSeasonYear ProductSeasonYear
ProductSeason ProductSeason
ProductCollection ProductCollection
ProductTheme ProductTheme
FashionCancelDate FashionCancelDate
ShippingGroupRule ShippingGroupRule
ShippingGroupNumber ShippingGroupNumber
CustomerGroup CustomerGroup
SalesDistrict I_SupDmndOvwTotalDemandCube SalesDistrict
CalendarMonth CalendarMonth
CalendarWeek CalendarWeek Week
CalendarYear CalendarYear Year
CalendarMonthName CalendarMonthName Month
AssignedQuantityInBaseUnit AssignedQuantityInBaseUnit Total Assigned Quantity
NormalAssignedQuantityInBsUnt NormalAssignedQuantityInBsUnt Normal Assigned Quantity
FixedQuantityInBaseUnit FixedQuantityInBaseUnit Ready for Delivery Quantity
SupAssgmtReservedQtyInBaseUnit SupAssgmtReservedQtyInBaseUnit Reserved Quantity
OnHoldQuantityInBaseUnit OnHoldQuantityInBaseUnit On Hold Quantity
ReadyForReleaseQtyInBaseUnit ReadyForReleaseQtyInBaseUnit Open for Release Check Quantity
InboundAssignedQuantityInBsUnt InboundAssignedQuantityInBsUnt IFO Assigned Quantity
PreviewFixedAssignedQtyInBsUnt PreviewFixedAssignedQtyInBsUnt Ready for Delivery (Preview)
PreviewReservedAssgdQtyInBsUnt PreviewReservedAssgdQtyInBsUnt Reserved (Preview)
PreviewOnHoldAssgdQtyInBsUnt PreviewOnHoldAssgdQtyInBsUnt On Hold (Preview)
PreviewRdyForReleaseQtyInBsUnt PreviewRdyForReleaseQtyInBsUnt Open for Release Check (Preview)
PreviewAssignedQuantityInBsUnt PreviewAssignedQuantityInBsUnt Preview Assigned Quantity
RequestedQuantityInBaseUnit RequestedQuantityInBaseUnit
SupAssgmtCategory SupAssgmtCategory SDO Category
SupAssgmtCategoryName SupAssgmtCategoryName SDO Category
SupAssgmtOrdStatusName SupAssgmtOrdStatusName Order Status
CrossPlantConfigurableProduct I_SupDmndOvwTotalDemandCube CrossPlantConfigurableProduct Generic Material
SupAssgmtSource SupAssgmtSource Demand/Supply
SupAssgmtSourceName SupAssgmtSourceName Demand/Supply
SalesDocument SalesDocument Sales Document
SalesOrganizationName SalesOrganizationName
MaterialName I_MaterialText MaterialName
MaterialGroupName I_MaterialGroupText MaterialGroupName
DistributionChannelName I_DistributionChannelText DistributionChannelName
DivisionName I_DivisionText DivisionName
SalesDistrictName I_SalesDistrictText SalesDistrictName
PlantName I_Plant PlantName
CompanyCodeName I_CompanyCode CompanyCodeName
OrderTypeName OrderTypeName Document Type
ARunCancDteSupDlyTmeHrznCode I_SupDmndOvwTotalDemandCube ARunCancDteSupDlyTmeHrznCode
ARunCancDteSupDlyTmeHrznTxt I_ARunCancDteSupDlyHrznT ARunCancDteSupDlyTmeHrznTxt Cancel Date - Supply Delivery Date
CustomerName I_Customer CustomerName
PurchaseOrderByCustomer PurchaseOrderByCustomer
DeliveryBlockReason DeliveryBlockReason
ProductCharacteristic1 I_SupDmndOvwTotalDemandCube ProductCharacteristic1
ProductCharacteristic1Desc I_RetailCharacteristicValueT RetailCharacteristicValueDesc
ProductCharacteristic2 I_SupDmndOvwTotalDemandCube ProductCharacteristic2
ProductCharacteristic2Desc I_RetailCharacteristicValueT RetailCharacteristicValueDesc
ProductCharacteristic3 I_SupDmndOvwTotalDemandCube ProductCharacteristic3
ProductCharacteristic3Desc I_RetailCharacteristicValueT RetailCharacteristicValueDesc
OrganizationDivision OrganizationDivision Organization Division
SalesOffice I_SupDmndOvwTotalDemandCube SalesOffice
SalesOfficeName I_SalesOfficeText SalesOfficeName
_OrganizationDivn _OrganizationDivn
@AbapCatalog: {
  sqlViewName: 'CSDOSOQRY',
  compiler.compareFilter: true
}
@ObjectModel:{
  usageType.serviceQuality: #X,
  usageType.sizeCategory: #XXL
  }
@AccessControl.authorizationCheck: #CHECK
@ObjectModel.usageType.dataClass: #TRANSACTIONAL
@ClientHandling.type: #INHERITED
@ClientHandling.algorithm: #SESSION_VARIABLE
@VDM.viewType: #CONSUMPTION
//@Analytics.query: true

@AccessControl.personalData.blocking: #REQUIRED
@EndUserText.label: 'Query View for Total Demand'
//@OData.publish: true

define view C_SupDmndTotSlsOrdQuery
  as select from    I_SupDmndOvwTotalDemandCube as Demand
  //    left outer join I_SalesOrganizationText     as SalesOrgText on  Demand.SalesOrganization = SalesOrgText.SalesOrganization

  //                                                                and SalesOrgText.Language    = $session.system_language

    left outer join I_MaterialText              as MaterialText on  Demand.Material       = MaterialText.Material
                                                                and MaterialText.Language = $session.system_language
    left outer join I_MaterialGroupText         as MatGrpText   on  Demand.MaterialGroup  = MatGrpText.MaterialGroup
                                                                and MatGrpText.Language   = $session.system_language
                                                                and MaterialText.Language = $session.system_language
    left outer join I_DistributionChannelText   as DistChl      on  Demand.DistributionChannel = DistChl.DistributionChannel
                                                                and DistChl.Language           = $session.system_language
    left outer join I_DivisionText              as Div          on  Demand.Division = Div.Division
                                                                and Div.Language    = $session.system_language
    left outer join I_SalesDistrictText         as SalesDist    on  Demand.SalesDistrict = SalesDist.SalesDistrict
                                                                and SalesDist.Language   = $session.system_language
    left outer join I_Plant                     as Plant        on Demand.Plant = Plant.Plant
    left outer join I_CompanyCode               as CompanyCode  on Demand.CompanyCode = CompanyCode.CompanyCode
    left outer join I_Customer                  as Customer     on Demand.SoldToParty = Customer.Customer
    left outer join I_SalesOfficeText           as SalesOffice  on  Demand.SalesOffice = SalesOffice.SalesOffice
                                                                and SalesOffice.Language    = $session.system_language
    left outer join I_ARunCancDteSupDlyHrznT    as CancDteSupDlyHrznT on  Demand.ARunCancDteSupDlyTmeHrznCode    = CancDteSupDlyHrznT.ARunCancDteSupDlyTmeHrznCode
                                                                          and CancDteSupDlyHrznT.Language        = $session.system_language
    left outer join I_Material                  as Material     on Demand.Material = Material.Material
    left outer join I_RetailCharacteristicValueT as CharValTexts1     on  Demand.ProductCharacteristic1          = CharValTexts1.RetailCharacteristicValue
                                                                          and Material.ProdCharc1InternalNumber  = CharValTexts1.CharacteristicInternalID
                                                                          and CharValTexts1.Language             = $session.system_language

    left outer join I_RetailCharacteristicValueT as CharValTexts2     on  Demand.ProductCharacteristic2          = CharValTexts2.RetailCharacteristicValue
                                                                          and Material.ProdCharc2InternalNumber  = CharValTexts2.CharacteristicInternalID
                                                                          and CharValTexts2.Language             = $session.system_language

    left outer join I_RetailCharacteristicValueT as CharValTexts3     on  Demand.ProductCharacteristic3          = CharValTexts3.RetailCharacteristicValue
                                                                          and Material.ProdCharc3InternalNumber  = CharValTexts3.CharacteristicInternalID
                                                                          and CharValTexts3.Language             = $session.system_language
    association [0..1] to I_DivisionText         as _OrganizationDivn on  $projection.OrganizationDivision = _OrganizationDivn.Division
                                                                          and _OrganizationDivn.Language       = $session.system_language
{
      @EndUserText.label: 'Requirement Document Number'
  key RequirementDocumentNumber,
      @EndUserText.label: 'Requirement Document Item'
  key RequirementDocumentItem,
      @EndUserText.label: 'Requested Date'
  key RequestedDate,
  key ProductAvailabilityDate,
      @EndUserText.label: 'Requirement Type'
  key RequirementType,
      @EndUserText.label: 'Requirement Document'
      cast(
            concat(concat(Demand.RequirementDocumentNumber, '/'), Demand.RequirementDocumentItem)
            as arun_doc_item_unique_id preserving type
      )                                                                                  as ARunDocumentItemUniqueID,
      cast(
            concat(concat(Demand.RequirementDocumentNumber, '/'), Demand.RequirementDocumentItem)
            as arun_doc_item_unique_id preserving type
      )                                                                                  as DocumentItemConcatenatedID,
      @EndUserText.label: 'Delivered Quantity'
      @DefaultAggregation: #SUM
      DeliveredQuantityInBaseUnit,
      @EndUserText.label: 'Order Quantity'
      @DefaultAggregation: #SUM
      RequestedRqmtQtyInBaseUnit,
      @EndUserText.label: 'Confirmed Quantity'
      @DefaultAggregation: #SUM
      ConfirmedRqmtQtyInBaseUnit,
      @EndUserText.label: 'Open Demand Quantity'
      @DefaultAggregation: #SUM
      OpenDemandQuantity,
      @EndUserText.label: 'Requirement Type Name'
      RequirementTypeName,
      @EndUserText.label: 'Document Type'
      OrderType,
      Demand.SalesOrganization,
      Demand.DistributionChannel,
      @EndUserText.label: 'Requested Delivery Date'
      RequestedDeliveryDate,
      SoldToParty,
      @EndUserText.label: 'Company Code'
      Demand.CompanyCode,
      //  FashionCustomerGroup6,

      //  FashionCustomerGroup7,

      //  FashionCustomerGroup8,

      //  FashionCustomerGroup9,

      //  FashionCustomerGroup10,

      PartnerFunction,
      ShipToParty,
      SalesDocumentItemCategory,
      Demand.Division,
      Demand.Material,
      Demand.MaterialGroup,
      BaseUnit,
      DeliveryGroup,
      ItemBillingBlockReason,
      @DefaultAggregation: #SUM
      NetAmount,
      DocumentCurrency,
      Demand.Plant,
      StorageLocation,
      ShippingPoint,
      //      route,

      @DefaultAggregation: #SUM
      NetPriceAmount,
      @DefaultAggregation: #SUM
      NetPriceQuantity,
      @Feature:'SW:RFM_SEGMTN_UI'
      RequirementSegment,
      @Feature:'SW:RFM_SEASON_UI'
      ProductSeasonYear,
      @Feature:'SW:RFM_SEASON_UI'
      ProductSeason,
      @Feature:'SW:RFM_SEASON_UI'
      ProductCollection,
      @Feature:'SW:RFM_SEASON_UI'
      ProductTheme,
      @Feature:'SW:RFM_CANC_DTE_UI'
      FashionCancelDate,
      ShippingGroupRule,
      ShippingGroupNumber,
      CustomerGroup,
      Demand.SalesDistrict,
      CalendarMonth,
      @EndUserText.label: 'Week'
      CalendarWeek,
      @EndUserText.label: 'Year'
      CalendarYear,
      @EndUserText.label: 'Month'
      CalendarMonthName,
      @EndUserText.label: 'Total Assigned Quantity'
      @DefaultAggregation: #SUM
      AssignedQuantityInBaseUnit,
      @EndUserText.label: 'Normal Assigned Quantity'
      @DefaultAggregation: #SUM
      NormalAssignedQuantityInBsUnt,
      @EndUserText.label: 'Ready for Delivery Quantity'
      @DefaultAggregation: #SUM
      FixedQuantityInBaseUnit,
      @EndUserText.label: 'Reserved Quantity'
      @DefaultAggregation: #SUM
      SupAssgmtReservedQtyInBaseUnit,
      @EndUserText.label: 'On Hold Quantity'
      @DefaultAggregation: #SUM
      OnHoldQuantityInBaseUnit,
      @EndUserText.label: 'Open for Release Check Quantity'
      @DefaultAggregation: #SUM
      ReadyForReleaseQtyInBaseUnit,
      @EndUserText.label: 'IFO Assigned Quantity'
      @DefaultAggregation: #SUM
      InboundAssignedQuantityInBsUnt,
      @EndUserText.label: 'Ready for Delivery (Preview)'
      @DefaultAggregation: #SUM
      PreviewFixedAssignedQtyInBsUnt,
      @EndUserText.label: 'Reserved (Preview)'
      @DefaultAggregation: #SUM
      PreviewReservedAssgdQtyInBsUnt,
      @EndUserText.label: 'On Hold (Preview)'
      @DefaultAggregation: #SUM
      PreviewOnHoldAssgdQtyInBsUnt,
      @EndUserText.label: 'Open for Release Check (Preview)'
      @DefaultAggregation: #SUM
      PreviewRdyForReleaseQtyInBsUnt,
      @EndUserText.label: 'Preview Assigned Quantity'
      @DefaultAggregation: #SUM
      PreviewAssignedQuantityInBsUnt,
      @DefaultAggregation: #SUM
      RequestedQuantityInBaseUnit,
      @EndUserText.label: 'SDO Category'
      SupAssgmtCategory,
      @EndUserText.label: 'SDO Category'
      SupAssgmtCategoryName,
      @EndUserText.label: 'Order Status'
      SupAssgmtOrdStatusName,
      @EndUserText.label: 'Generic Material'
      Demand.CrossPlantConfigurableProduct,
      @EndUserText.label: 'Demand/Supply'
      SupAssgmtSource,
      @EndUserText.label: 'Demand/Supply'
      SupAssgmtSourceName,
      @EndUserText.label: 'Sales Document'
      SalesDocument,
      SalesOrganizationName,
      MaterialText.MaterialName,
      MatGrpText.MaterialGroupName,
      DistChl.DistributionChannelName,
      Div.DivisionName,
      SalesDist.SalesDistrictName,
      Plant.PlantName,
      CompanyCode.CompanyCodeName,
      @EndUserText.label: 'Document Type'
      OrderTypeName,
      Demand.ARunCancDteSupDlyTmeHrznCode,
      @EndUserText.label: 'Cancel Date - Supply Delivery Date'
      CancDteSupDlyHrznT.ARunCancDteSupDlyTmeHrznTxt,
      Customer.CustomerName,
      PurchaseOrderByCustomer,
      DeliveryBlockReason,
      @Feature:'SW:RFM_CHARC_VALS_UI'
      Demand.ProductCharacteristic1,
      @Feature:'SW:RFM_CHARC_VALS_UI'
      CharValTexts1.RetailCharacteristicValueDesc as ProductCharacteristic1Desc,
      @Feature:'SW:RFM_CHARC_VALS_UI'
      Demand.ProductCharacteristic2,
      @Feature:'SW:RFM_CHARC_VALS_UI'
      CharValTexts2.RetailCharacteristicValueDesc as ProductCharacteristic2Desc,
      @Feature:'SW:RFM_CHARC_VALS_UI'
      Demand.ProductCharacteristic3,
      @Feature:'SW:RFM_CHARC_VALS_UI'
      CharValTexts3.RetailCharacteristicValueDesc as ProductCharacteristic3Desc,
      @ObjectModel.text.association: '_OrganizationDivn'
      @EndUserText.label: 'Organization Division' 
      OrganizationDivision,
      Demand.SalesOffice,
      SalesOffice.SalesOfficeName,
      _OrganizationDivn
      
}
where
  (
       RequirementType = 'VC'
    or RequirementType = 'VI'
    or RequirementType = 'VG'
  )