P_MSPWMovableProduct

DDL: P_MSPWMOVABLEPRODUCT SQL: PMSPWMOVABLEPROD Type: view BASIC

P_MSPWMovableProduct is a Basic CDS View in SAP S/4HANA. It reads from 4 data sources (I_StorageLocation, P_MSPWProductStock, P_MSPWSellableProduct, P_MSPWStorePosStorageLocation) and exposes 6 fields with key fields Store, Product, TargetStorageLocation. It has 3 associations to related views.

Data Sources (4)

SourceAliasJoin Type
I_StorageLocation SourceStorageLocation inner
P_MSPWProductStock SourceStorageLocationStock inner
P_MSPWSellableProduct StoreProduct from
P_MSPWStorePosStorageLocation TargetStorageLocation inner

Associations (3)

CardinalityTargetAliasCondition
[1..1] I_Site _Store $projection.Store = _Store.Site
[1..1] I_Product _Product $projection.Product = _Product.Product
[1..1] I_StorageLocation _TargetStorageLocation $projection.Store = _TargetStorageLocation.Plant and $projection.TargetStorageLocation = _TargetStorageLocation.StorageLocation

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName PMSPWMOVABLEPROD view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #CHECK view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.viewType #BASIC view
VDM.private true view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #MIXED view

Fields (6)

KeyFieldSource TableSource FieldDescription
KEY Store P_MSPWSellableProduct Store
KEY Product P_MSPWSellableProduct Product
KEY TargetStorageLocation P_MSPWStorePosStorageLocation StorageLocation
_Store _Store
_Product _Product
_TargetStorageLocation _TargetStorageLocation
@AbapCatalog.sqlViewName: 'PMSPWMOVABLEPROD'

@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true

@AccessControl.authorizationCheck: #CHECK
@ClientHandling.algorithm: #SESSION_VARIABLE

@VDM.viewType: #BASIC
@VDM.private: true
@ObjectModel: {
    usageType: {
        serviceQuality: #C,
        sizeCategory: #L,
        dataClass: #MIXED
    }
}
define view P_MSPWMovableProduct
  as select from P_MSPWSellableProduct          as StoreProduct
//    as select from I_ProductsForSaleInRtlStore as StoreProduct

    inner join   P_MSPWStorePosStorageLocation  as TargetStorageLocation      on TargetStorageLocation.Store = StoreProduct.Store
    inner join   I_StorageLocation              as SourceStorageLocation      on  SourceStorageLocation.Plant = StoreProduct.Store
                                                                              and SourceStorageLocation.StorageLocation != TargetStorageLocation.StorageLocation
    inner join   P_MSPWProductStock as SourceStorageLocationStock on  SourceStorageLocationStock.Plant           = StoreProduct.Store
                                                                              and SourceStorageLocationStock.Material        = StoreProduct.Product
                                                                              and SourceStorageLocationStock.StorageLocation = SourceStorageLocation.StorageLocation

  association [1..1] to I_Site            as _Store                 on  $projection.Store = _Store.Site
  association [1..1] to I_Product         as _Product               on  $projection.Product = _Product.Product
  association [1..1] to I_StorageLocation as _TargetStorageLocation on  $projection.Store                 = _TargetStorageLocation.Plant
                                                                    and $projection.TargetStorageLocation = _TargetStorageLocation.StorageLocation
{
      @ObjectModel.foreignKey.association: '_Store'
  key StoreProduct.Store,
      @ObjectModel.foreignKey.association: '_Product'
  key StoreProduct.Product,
      @ObjectModel.foreignKey.association: '_TargetStorageLocation'
  key TargetStorageLocation.StorageLocation as TargetStorageLocation,

      _Store,
      _Product,
      _TargetStorageLocation
}
group by
  StoreProduct.Store,
  StoreProduct.Product,
  TargetStorageLocation.StorageLocation
having
  max(
    SourceStorageLocationStock.MatlWrhsStkQtyInMatlBaseUnit
  ) > 0
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_STORAGELOCATION",
"P_MSPWPRODUCTSTOCK",
"P_MSPWSELLABLEPRODUCT",
"P_MSPWSTOREPOSSTORAGELOCATION"
],
"ASSOCIATED":
[
"I_PRODUCT",
"I_SITE",
"I_STORAGELOCATION"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/