I_SupDmndAllDocRetSlsOrdC

DDL: I_SUPDMNDALLDOCRETSLSORDC Type: view COMPOSITE

Cube View for Return Sales Orders Details

I_SupDmndAllDocRetSlsOrdC is a Composite CDS View (Cube) that provides data about "Cube View for Return Sales Orders Details" in SAP S/4HANA. It reads from 6 data sources and exposes 57 fields with key fields Material, Plant, Batch, StorageLocation, SupplyNumber. It has 17 associations to related views.

Data Sources (6)

SourceAliasJoin Type
I_ARunTimeUnitText ARunTimeUnitText left_outer
P_ARunAssgmtSup Assgmt left_outer
I_ARunCalendarDate CalDate left_outer
I_CalendarMonthName CalMonth left_outer
I_SupDmndOvwPlant Plant inner
I_SupDmndAllDocRetSlsOrd Supply from

Associations (17)

CardinalityTargetAliasCondition
[0..1] I_ProductText _ProductText $projection.Material = _ProductText.Product and _ProductText.Language = $session.system_language
[0..1] I_ProductGroupText _ProductGroupText $projection.MaterialGroup = _ProductGroupText.MaterialGroup and _ProductGroupText.Language = $session.system_language
[0..1] I_ProductTypeText _ProductTypeText $projection.MaterialType = _ProductTypeText.ProductType and _ProductTypeText.Language = $session.system_language
[0..1] I_SalesOrganizationText _SalesOrgText $projection.SalesOrganization = _SalesOrgText.SalesOrganization and _SalesOrgText.Language = $session.system_language
[0..1] I_DistributionChannelText _DistrChnl $projection.DistributionChannel = _DistrChnl.DistributionChannel and _DistrChnl.Language = $session.system_language
[0..1] I_DivisionText _Divn $projection.Division = _Divn.Division and _Divn.Language = $session.system_language
[0..1] I_SalesDistrictText _SalesDist $projection.SalesDistrict = _SalesDist.SalesDistrict and _SalesDist.Language = $session.system_language
[0..1] I_Plant _Plant $projection.Plant = _Plant.Plant
[0..1] I_CompanyCode _CompanyCode $projection.CompanyCode = _CompanyCode.CompanyCode
[0..1] I_Customer _Customer $projection.Customer = _Customer.Customer
[0..1] I_UnitOfMeasure _BaseUnit $projection.BaseUnit = _BaseUnit.UnitOfMeasure
[0..1] I_PurchasingOrganization _PurchasingOrganization $projection.PurchasingOrganization = _PurchasingOrganization.PurchasingOrganization and $projection.CompanyCode = _PurchasingOrganization.CompanyCode
[0..1] I_PurchasingGroup _PurchasingGroup $projection.PurchasingGroup = _PurchasingGroup.PurchasingGroup
[0..1] I_SupDmndAllDocSupTypeT _SupText $projection.AssignedSupplyType = _SupText.AssignedSupplyType and _SupText.Language = $session.system_language
[0..1] I_SupDmndAllDocSupSourceT _SupSrceText $projection.SupAssgmtSource = _SupSrceText.SupAssgmtSource and _SupSrceText.Language = $session.system_language
[0..1] I_SalesDocumentRjcnReasonText _SalesDocumentRjcnReasonT $projection.SalesDocumentRjcnReason = _SalesDocumentRjcnReasonT.SalesDocumentRjcnReason and _SalesDocumentRjcnReasonT.Language = $session.system_language
[0..1] I_SDDocumentReasonText _SDDocumentReasonT $projection.SDDocumentReason = _SDDocumentReasonT.SDDocumentReason and _SDDocumentReasonT.Language = $session.system_language

Annotations (16)

NameValueLevelField
ClientHandling.algorithm #SESSION_VARIABLE view
Analytics.dataCategory #CUBE view
Analytics.internalName #LOCAL view
VDM.viewType #COMPOSITE view
VDM.lifecycle.contract.type #PUBLIC_LOCAL_API view
AccessControl.authorizationCheck #CHECK view
AccessControl.personalData.blocking #REQUIRED view
AbapCatalog.sqlViewName ISUPDMNDADRETSOC view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XXL view
Metadata.allowExtensions true view
Metadata.ignorePropagatedAnnotations true view
EndUserText.label Cube View for Return Sales Orders Details view

Fields (57)

KeyFieldSource TableSource FieldDescription
KEY Material I_SupDmndAllDocRetSlsOrd Material
KEY Plant I_SupDmndAllDocRetSlsOrd Plant
KEY Batch I_SupDmndAllDocRetSlsOrd Batch
KEY StorageLocation I_SupDmndAllDocRetSlsOrd StorageLocation
KEY SupplyNumber I_SupDmndAllDocRetSlsOrd SupplyNumber Supply Document No.
KEY SupplyItem I_SupDmndAllDocRetSlsOrd SupplyItem Supply Document Item
KEY SupplyScheduleLine I_SupDmndAllDocRetSlsOrd SupplyScheduleLine Supply Schedule Line
KEY ProductAvailabilityDate I_SupDmndAllDocRetSlsOrd ProductAvailabilityDate Supply Delivery Date
KEY AssignedSupplyType I_SupDmndAllDocRetSlsOrd AssignedSupplyType Supply Type
RequestedDeliveryDate I_SupDmndAllDocRetSlsOrd RequestedDeliveryDate
TotalQuantity I_SupDmndAllDocRetSlsOrd TotalQuantity Total Supply Quantity
AssignedQuantityInBaseUnit P_ARunAssgmtSup AssignedQuantityInBaseUnit Total Assigned Quantity
NormalAssignedQuantityInBsUnt P_ARunAssgmtSup NormalAssignedQuantityInBsUnt Normal Assigned Quantity
PreviewAssignedQuantityInBsUnt P_ARunAssgmtSup PreviewAssignedQuantityInBsUnt Preview Assigned Quantity
ARunTmpAssignedQuantityInBsUnt P_ARunAssgmtSup ARunTmpAssignedQuantityInBsUnt Temporary Assigned Quantity
BaseUnit I_SupDmndAllDocRetSlsOrd BaseUnit
CalendarYear I_ARunCalendarDate CalendarYear Year
CalendarMonth I_ARunCalendarDate CalendarMonth Month
CalendarMonthName I_CalendarMonthName CalendarMonthName Month
CalendarWeek Week
CalendarDay I_ARunCalendarDate CalendarDay Day
MaterialGroup I_SupDmndAllDocRetSlsOrd MaterialGroup
MaterialType MaterialType Product Type
SupAssgmtSource I_SupDmndAllDocRetSlsOrd SupAssgmtSource Supply Source
CrossPlantConfigurableProduct I_SupDmndAllDocRetSlsOrd CrossPlantConfigurableProduct Generic Article
StockSegment I_SupDmndAllDocRetSlsOrd StockSegment
SalesOrganization
DistributionChannel
Division
SalesDistrict
Customer
CompanyCode
PurchasingOrganization
PurchasingGroup I_SupDmndAllDocRetSlsOrd PurchasingGroup
SalesDocumentRjcnReason I_SupDmndAllDocRetSlsOrd SalesDocumentRjcnReason
SDDocumentReason I_SupDmndAllDocRetSlsOrd SDDocumentReason
ReturnReasonName _SDDocumentReasonT SDDocumentReasonText
SupAssgmtAggrgQtyUnit
NetPriceAmount I_SupDmndAllDocRetSlsOrd NetPriceAmount
DocumentCurrency I_SupDmndAllDocRetSlsOrd DocumentCurrency
ActlAmt
_ProductText _ProductText
_ProductGroupText _ProductGroupText
_ProductTypeText _ProductTypeText
_SupSrceText _SupSrceText
_SalesOrgText _SalesOrgText
_DistrChnl _DistrChnl
_Divn _Divn
_SalesDist _SalesDist
_Plant _Plant
_CompanyCode _CompanyCode
_Customer _Customer
_BaseUnit _BaseUnit
_PurchasingOrganization _PurchasingOrganization
_PurchasingGroup _PurchasingGroup
_SalesDocumentRjcnReasonT _SalesDocumentRjcnReasonT
_SupText _SupText
@ClientHandling.algorithm: #SESSION_VARIABLE
@Analytics: {
  dataCategory: #CUBE,
  internalName:#LOCAL
}
@VDM: {
  viewType: #COMPOSITE,
  lifecycle.contract.type: #PUBLIC_LOCAL_API
}
@AccessControl: {
  authorizationCheck: #CHECK,
  personalData.blocking: #REQUIRED
}
@AbapCatalog: {
  sqlViewName: 'ISUPDMNDADRETSOC',
  compiler.compareFilter: true,
  preserveKey:true
 }
@ObjectModel: {
   usageType: {
     dataClass:      #MIXED,
     serviceQuality: #D,
     sizeCategory:   #XXL
   }
}
@Metadata:{
  allowExtensions:              true,
  ignorePropagatedAnnotations:  true
}
@EndUserText.label: 'Cube View for Return Sales Orders Details'
define view I_SupDmndAllDocRetSlsOrdC
  as select from    I_SupDmndAllDocRetSlsOrd as Supply
    inner join      I_SupDmndOvwPlant        as Plant            on Supply.Plant = Plant.Plant
    left outer join P_ARunAssgmtSup          as Assgmt           on  Supply.SupplyNumber       = Assgmt.SupplyNumber
                                                                 and Supply.SupplyItem         = Assgmt.SupplyItem
                                                                 and Supply.SupplyScheduleLine = Assgmt.SupplyScheduleLine
                                                                 and Supply.Plant              = Assgmt.Plant
                                                                 and Supply.Material           = Assgmt.Material
                                                                 and Supply.StorageLocation    = Assgmt.StorageLocation
                                                                 and Supply.Batch              = Assgmt.Batch
                                                                 and Supply.AssignedSupplyType = Assgmt.AssignedSupplyType
    left outer join I_ARunCalendarDate       as CalDate          on Supply.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 [0..1] to I_ProductText                 as _ProductText              on  $projection.Material  = _ProductText.Product
                                                                                   and _ProductText.Language = $session.system_language
  association [0..1] to I_ProductGroupText            as _ProductGroupText         on  $projection.MaterialGroup  = _ProductGroupText.MaterialGroup
                                                                                   and _ProductGroupText.Language = $session.system_language
  //Should it be replaced with I_MaterialGroupText as ProductGroup has status Deprecated?

  association [0..1] to I_ProductTypeText             as _ProductTypeText          on  $projection.MaterialType  = _ProductTypeText.ProductType
                                                                                   and _ProductTypeText.Language = $session.system_language
  association [0..1] to I_SalesOrganizationText       as _SalesOrgText             on  $projection.SalesOrganization = _SalesOrgText.SalesOrganization
                                                                                   and _SalesOrgText.Language        = $session.system_language
  association [0..1] to I_DistributionChannelText     as _DistrChnl                on  $projection.DistributionChannel = _DistrChnl.DistributionChannel
                                                                                   and _DistrChnl.Language             = $session.system_language
  association [0..1] to I_DivisionText                as _Divn                     on  $projection.Division = _Divn.Division
                                                                                   and _Divn.Language       = $session.system_language
  association [0..1] to I_SalesDistrictText           as _SalesDist                on  $projection.SalesDistrict = _SalesDist.SalesDistrict
                                                                                   and _SalesDist.Language       = $session.system_language
  association [0..1] to I_Plant                       as _Plant                    on  $projection.Plant = _Plant.Plant
  association [0..1] to I_CompanyCode                 as _CompanyCode              on  $projection.CompanyCode = _CompanyCode.CompanyCode
  association [0..1] to I_Customer                    as _Customer                 on  $projection.Customer = _Customer.Customer

  association [0..1] to I_UnitOfMeasure               as _BaseUnit                 on  $projection.BaseUnit = _BaseUnit.UnitOfMeasure

  association [0..1] to I_PurchasingOrganization      as _PurchasingOrganization   on  $projection.PurchasingOrganization = _PurchasingOrganization.PurchasingOrganization
                                                                                   and $projection.CompanyCode            = _PurchasingOrganization.CompanyCode
  association [0..1] to I_PurchasingGroup             as _PurchasingGroup          on  $projection.PurchasingGroup = _PurchasingGroup.PurchasingGroup
  association [0..1] to I_SupDmndAllDocSupTypeT       as _SupText                  on  $projection.AssignedSupplyType = _SupText.AssignedSupplyType
                                                                                   and _SupText.Language              = $session.system_language
  association [0..1] to I_SupDmndAllDocSupSourceT     as _SupSrceText              on  $projection.SupAssgmtSource = _SupSrceText.SupAssgmtSource
                                                                                   and _SupSrceText.Language       = $session.system_language
  association [0..1] to I_SalesDocumentRjcnReasonText as _SalesDocumentRjcnReasonT on  $projection.SalesDocumentRjcnReason = _SalesDocumentRjcnReasonT.SalesDocumentRjcnReason
                                                                                   and _SalesDocumentRjcnReasonT.Language  = $session.system_language
  association [0..1] to I_SDDocumentReasonText        as _SDDocumentReasonT        on  $projection.SDDocumentReason = _SDDocumentReasonT.SDDocumentReason
                                                                                   and _SDDocumentReasonT.Language  = $session.system_language
{
       @ObjectModel.text.association: '_ProductText'
  key  Supply.Material,
       @ObjectModel.text.association: '_Plant'
  key  Supply.Plant,
  key  Supply.Batch,
  key  Supply.StorageLocation,
       @EndUserText.label: 'Supply Document No.'
  key  Supply.SupplyNumber,
       @EndUserText.label: 'Supply Document Item'
  key  Supply.SupplyItem,
       @EndUserText.label: 'Supply Schedule Line'
  key  Supply.SupplyScheduleLine,
       @EndUserText.label: 'Supply Delivery Date'
  key  Supply.ProductAvailabilityDate,
       @ObjectModel.text.association: '_SupText'
       @EndUserText.label: 'Supply Type'
  key  Supply.AssignedSupplyType,
       Supply.RequestedDeliveryDate,
       @EndUserText.label: 'Total Supply Quantity'
       @DefaultAggregation: #SUM
       @Semantics.quantity.unitOfMeasure: 'SupAssgmtAggrgQtyUnit'
       Supply.TotalQuantity,
       @EndUserText.label: 'Open Supply Quantity'
       @DefaultAggregation: #SUM
       @Semantics.quantity.unitOfMeasure: 'SupAssgmtAggrgQtyUnit'
       ( Supply.OpenSupplyQuantity
         - coalesce( Assgmt.AssignedQuantityInBaseUnit , 0 )
       )                                                                                       as OpenSupplyQuantity,
       @EndUserText.label: 'Total Assigned Quantity'
       @DefaultAggregation: #SUM
       @Semantics.quantity.unitOfMeasure: 'SupAssgmtAggrgQtyUnit'
       Assgmt.AssignedQuantityInBaseUnit,
       @EndUserText.label: 'Normal Assigned Quantity'
       @DefaultAggregation: #SUM
       @Semantics.quantity.unitOfMeasure: 'SupAssgmtAggrgQtyUnit'
       Assgmt.NormalAssignedQuantityInBsUnt,
       @EndUserText.label: 'Preview Assigned Quantity'
       @DefaultAggregation: #SUM
       @Semantics.quantity.unitOfMeasure: 'SupAssgmtAggrgQtyUnit'
       Assgmt.PreviewAssignedQuantityInBsUnt,
       @EndUserText.label: 'Temporary Assigned Quantity'
       @DefaultAggregation: #SUM
       @Semantics.quantity.unitOfMeasure: 'SupAssgmtAggrgQtyUnit'
       Assgmt.ARunTmpAssignedQuantityInBsUnt,
       @ObjectModel.foreignKey.association: '_BaseUnit'
       Supply.BaseUnit,
       @EndUserText.label: 'Year'
       @Semantics.calendar.year: true
       CalDate.CalendarYear,
       @EndUserText.label: 'Month'
       @Semantics.calendar.month: true
       @ObjectModel.text.element: 'CalendarMonthName'
       CalDate.CalendarMonth,
       @Semantics.text: true
       @EndUserText.label: 'Month'
       CalMonth.CalendarMonthName,
       @EndUserText.label: 'Week'
       @Semantics.calendar.week: true
       concat_with_space( ARunDisplayTimeUnitText, CalDate.CalendarWeek, 1)                    as CalendarWeek,
       @EndUserText.label: 'Day'
       @Semantics.calendar.dayOfMonth: true
       CalDate.CalendarDay,
       @ObjectModel.text.association: '_ProductGroupText'
       Supply.MaterialGroup,
       @ObjectModel.text.association: '_ProductTypeText'
       @EndUserText.label: 'Product Type'
       MaterialType,
       @EndUserText.label: 'Supply Source'
       @ObjectModel.text.association: '_SupSrceText'
       Supply.SupAssgmtSource,
       @EndUserText.label: 'Generic Article'
       Supply.CrossPlantConfigurableProduct,
       Supply.StockSegment,
       @ObjectModel.text.association: '_SalesOrgText'
       coalesce( Supply.SalesOrganization, coalesce( Plant.SalesOrganization, '' ) )           as SalesOrganization,
       @ObjectModel.text.association: '_DistrChnl'
       coalesce( Supply.DistributionChannel, coalesce( Plant.DistributionChannel, '') )        as DistributionChannel,
       @ObjectModel.text.association: '_Divn'
       coalesce( Supply.Division, coalesce( Plant.Division, '') )                              as Division,
       @ObjectModel.text.association: '_SalesDist'
       coalesce( Supply.SalesDistrict, coalesce( Plant.SalesDistrict, '') )                    as SalesDistrict,
       @ObjectModel.text.association: '_Customer'
       coalesce( Supply.Customer, coalesce( Plant.PlantCustomer, '') )                         as Customer,
       @ObjectModel.text.association: '_CompanyCode'
       coalesce( Supply.CompanyCode, coalesce( Plant.CompanyCode, '') )                        as CompanyCode,
       @ObjectModel.text.association: '_PurchasingOrganization'
       coalesce( Supply.PurchasingOrganization, coalesce( Plant.PurchasingOrganization, '' ) ) as PurchasingOrganization,
       @ObjectModel.text.association: '_PurchasingGroup'
       Supply.PurchasingGroup,
       @ObjectModel.text.association: '_SalesDocumentRjcnReasonT'
       Supply.SalesDocumentRjcnReason,
       @ObjectModel.text.element: ['ReturnReasonName']
       Supply.SDDocumentReason,
       _SDDocumentReasonT.SDDocumentReasonText                                                 as ReturnReasonName,
       @Semantics.unitOfMeasure: true
       cast( ' ' as meins )                                                                    as SupAssgmtAggrgQtyUnit,
       @Semantics.amount.currencyCode: 'DocumentCurrency'
       Supply.NetPriceAmount,
       @Semantics.currencyCode: true
       Supply.DocumentCurrency,
       @Semantics.amount.currencyCode: 'DocumentCurrency'
       cast ( Supply.OpenSupplyQuantity * NetPriceAmount as netwr )                            as ActlAmt,
       //Associations

       _ProductText,
       _ProductGroupText,
       _ProductTypeText,
       @ObjectModel.association.boundFields.dataMatchesSourceAndTargetTypes: true
       _SupSrceText,
       _SalesOrgText,
       _DistrChnl,
       _Divn,
       _SalesDist,
       _Plant,
       _CompanyCode,
       _Customer,
       _BaseUnit,
       _PurchasingOrganization,
       _PurchasingGroup,
       _SalesDocumentRjcnReasonT,
       @ObjectModel.association.boundFields.dataMatchesSourceAndTargetTypes: true
       _SupText
}
where
  TotalQuantity > 0
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_ARUNCALENDARDATE",
"I_ARUNTIMEUNITTEXT",
"I_CALENDARMONTHNAME",
"I_SDDOCUMENTREASONTEXT",
"I_SUPDMNDALLDOCRETSLSORD",
"I_SUPDMNDOVWPLANT",
"P_ARUNASSGMTSUP"
],
"ASSOCIATED":
[
"I_COMPANYCODE",
"I_CUSTOMER",
"I_DISTRIBUTIONCHANNELTEXT",
"I_DIVISIONTEXT",
"I_PLANT",
"I_PRODUCTGROUPTEXT",
"I_PRODUCTTEXT",
"I_PRODUCTTYPETEXT",
"I_PURCHASINGGROUP",
"I_PURCHASINGORGANIZATION",
"I_SALESDISTRICTTEXT",
"I_SALESDOCUMENTRJCNREASONTEXT",
"I_SALESORGANIZATIONTEXT",
"I_SDDOCUMENTREASONTEXT",
"I_SUPDMNDALLDOCSUPSOURCET",
"I_SUPDMNDALLDOCSUPTYPET",
"I_UNITOFMEASURE"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/