P_LastFallBackLeadTime
Demand Driven Product Lead Time From Material Master
P_LastFallBackLeadTime is a Consumption CDS View that provides data about "Demand Driven Product Lead Time From Material Master" in SAP S/4HANA. It reads from 3 data sources (I_MRPPlantControlParameter, I_MatlProcurementProfile, I_ProductPlantMRPArea) and exposes 7 fields with key fields Material, ProductionPlant, MRPArea. Part of development package PPH_DD_VDM_STLM.
Data Sources (3)
| Source | Alias | Join Type |
|---|---|---|
| I_MRPPlantControlParameter | _MRPControlParams | left_outer |
| I_MatlProcurementProfile | _prfl | left_outer |
| I_ProductPlantMRPArea | _ProductPlantMRPArea | from |
Annotations (4)
| Name | Value | Level | Field |
|---|---|---|---|
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| VDM.private | true | view | |
| VDM.viewType | #CONSUMPTION | view | |
| ObjectModel.usageType.serviceQuality | #C | view |
Fields (7)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | Material | I_ProductPlantMRPArea | Material | |
| KEY | ProductionPlant | I_ProductPlantMRPArea | Plant | |
| KEY | MRPArea | I_ProductPlantMRPArea | MRPArea | |
| MRPType | I_ProductPlantMRPArea | MRPType | ||
| MRPController | I_ProductPlantMRPArea | MRPController | ||
| IsBulkMaterial | I_ProductPlantMRPArea | IsBulkMaterial | ||
| IsPhantomItem | I_ProductPlantMRPArea | IsPhantomItem |
@AccessControl.authorizationCheck: #NOT_REQUIRED
@VDM.private: true
@VDM.viewType: #CONSUMPTION
@ObjectModel.usageType.serviceQuality: #C
define view entity P_LastFallBackLeadTime
as select from I_ProductPlantMRPArea as _ProductPlantMRPArea
left outer join I_MatlProcurementProfile as _prfl on _ProductPlantMRPArea.Plant = _prfl.Plant
and _ProductPlantMRPArea.MaterialProcurementProfile = _prfl.MaterialProcurementProfile
left outer join I_MRPPlantControlParameter as _MRPControlParams
on _ProductPlantMRPArea.Plant = _MRPControlParams.MRPPlant
{
key _ProductPlantMRPArea.Material as Material,
key _ProductPlantMRPArea.Plant as ProductionPlant,
key _ProductPlantMRPArea.MRPArea as MRPArea,
_ProductPlantMRPArea.MRPType,
_ProductPlantMRPArea.MRPController,
case
when _ProductPlantMRPArea.ProcurementType = 'F'
then
case
when _prfl.MaterialProcurementExtType = '7'
then 'T'
else
'B'
end
else
'M'
end as ReplenishmentType,
cast(
case
when _ProductPlantMRPArea.Plant != _ProductPlantMRPArea.MRPArea
or (_ProductPlantMRPArea.Plant = _ProductPlantMRPArea.MRPArea and _ProductPlantMRPArea.ProcurementType = 'F')
then
case
when _ProductPlantMRPArea.GoodsReceiptDuration > 0
then _ProductPlantMRPArea.PlannedDeliveryDurationInDays + _ProductPlantMRPArea.GoodsReceiptDuration + cast(_MRPControlParams.PurchasingProcessingDuration as abap.int1)
else
_ProductPlantMRPArea.PlannedDeliveryDurationInDays + cast(_MRPControlParams.PurchasingProcessingDuration as abap.int1)
end
else
case
when _ProductPlantMRPArea.GoodsReceiptDuration > 0
then _ProductPlantMRPArea.MaterialPlannedProductionDurn + _ProductPlantMRPArea.GoodsReceiptDuration
else
_ProductPlantMRPArea.MaterialPlannedProductionDurn
end
// case
// when _ProductPlantMRPArea.ProcurementType = 'F'
// then
// case
// when _ProductPlantMRPArea.GoodsReceiptDuration > 0
// then _ProductPlantMRPArea.PlannedDeliveryDurationInDays + _ProductPlantMRPArea.GoodsReceiptDuration
// else
// _ProductPlantMRPArea.PlannedDeliveryDurationInDays
// end
// else
// case
// when _ProductPlantMRPArea.GoodsReceiptDuration > 0
// then _ProductPlantMRPArea.MaterialPlannedProductionDurn + _ProductPlantMRPArea.GoodsReceiptDuration
// else
// _ProductPlantMRPArea.MaterialPlannedProductionDurn
// end
end
as pph_ind_lead_time) as IndividualLeadTime,
_ProductPlantMRPArea.IsBulkMaterial,
_ProductPlantMRPArea.IsPhantomItem
}
Learn More
- What Is a CDS View in SAP S/4HANA?
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- CDS View Annotations — A Complete Guide
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA