P_AssgblDCForSuplr

DDL: P_ASSGBLDCFORSUPLR SQL: PASNDCFORSUPL Type: view CONSUMPTION

P_AssgblDCForSuplr is a Consumption CDS View in SAP S/4HANA. It reads from 3 data sources (I_Plant, I_ActiveLogisticalProduct, I_ProductPlant) and exposes 4 fields with key fields Material, DistributionCenter. It has 1 association to related views.

Data Sources (3)

SourceAliasJoin Type
I_Plant Plant cross
I_ActiveLogisticalProduct Product from
I_ProductPlant ProductPlant left_outer

Parameters (3)

NameTypeDefault
P_ValidityStartDate datum
P_ValidityEndDate datum
P_Supplier lifnr

Associations (1)

CardinalityTargetAliasCondition
[1..1] I_ActiveLogisticalProduct _ActiveLogisticalProduct $projection.Material = _ActiveLogisticalProduct.Product

Annotations (8)

NameValueLevelField
ClientHandling.algorithm #SESSION_VARIABLE view
AbapCatalog.sqlViewName PASNDCFORSUPL view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #PRIVILEGED_ONLY view
ObjectModel.usageType.serviceQuality #B view
VDM.viewType #CONSUMPTION view
VDM.private true view

Fields (4)

KeyFieldSource TableSource FieldDescription
KEY Material I_ActiveLogisticalProduct Product
KEY DistributionCenter I_Plant Plant
DistributionCenterName PlantName
_ActiveLogisticalProduct _ActiveLogisticalProduct
@ClientHandling.algorithm: #SESSION_VARIABLE
@AbapCatalog.sqlViewName: 'PASNDCFORSUPL'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #PRIVILEGED_ONLY
@ObjectModel.usageType.serviceQuality: #B
@VDM.viewType: #CONSUMPTION
@VDM.private: true

define view P_AssgblDCForSuplr
  with parameters
    P_ValidityStartDate : datum,
    P_ValidityEndDate   : datum,
    P_Supplier          : lifnr
  -- currently the parameters are not used for filtering purposes yet
  -- no check for specific supplier
  -- no checks for purchasing info records
  -- no checks for EKOrgs
  -- no WRF3 checks
  -- no time-dependant checks (neither purchasing info record nor WRF3 or other time-dependant table)
  as select from    I_ActiveLogisticalProduct as Product
    cross join      I_Plant                   as Plant
  -- Condition: If a MARC entry already exists, the respective product must be defined as 'external procurement'
    left outer join I_ProductPlant            as ProductPlant on  Product.Product = ProductPlant.Product
                                                              and Plant.Plant     = ProductPlant.Plant

  association [1..1] to I_ActiveLogisticalProduct as _ActiveLogisticalProduct on $projection.Material = _ActiveLogisticalProduct.Product

{
      @ObjectModel.foreignKey.association: '_ActiveLogisticalProduct'
  key Product.Product as Material,
  key Plant.Plant     as DistributionCenter,
      PlantName       as DistributionCenterName,

      /* Exposed associations */
      _ActiveLogisticalProduct
}
where
       Plant.PlantCategory                 = 'B' -- only DC
  and
  -- Source of Supply (MARC entry) optional, but if defined then external procurement
  (
       ProductPlant.SourceOfSupplyCategory is null -- no entry found
    or ProductPlant.SourceOfSupplyCategory = '1'
    or ProductPlant.SourceOfSupplyCategory = '3'
    or ProductPlant.SourceOfSupplyCategory = '4'
    or ProductPlant.SourceOfSupplyCategory = 'A'
    or ProductPlant.SourceOfSupplyCategory = 'B'
    or ProductPlant.SourceOfSupplyCategory = 'C'
    or ProductPlant.SourceOfSupplyCategory = 'D'
    or ProductPlant.SourceOfSupplyCategory = 'E'
    or ProductPlant.SourceOfSupplyCategory = 'F'
    or ProductPlant.SourceOfSupplyCategory = 'G'
    or ProductPlant.SourceOfSupplyCategory = 'H'
    or ProductPlant.SourceOfSupplyCategory = 'I'
  )
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_ACTIVELOGISTICALPRODUCT",
"I_PLANT",
"I_PRODUCTPLANT"
],
"ASSOCIATED":
[
"I_ACTIVELOGISTICALPRODUCT"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/