P_MSPWMOVABLEPRODUCT

CDS View

P_MSPWMOVABLEPRODUCT is a CDS View in S/4HANA. It contains 3 fields. 1 CDS views read from this table.

CDS Views using this table (1)

ViewTypeJoinVDMDescription
P_MSPWWorkItem view from BASIC

Fields (3)

KeyField CDS FieldsUsed in Views
KEY Product Product 1
KEY Store Store 1
KEY TargetStorageLocation TargetStorageLocation 1
@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":""
}
}*/