P_DD_MAT_ADDLINFO
Demand Driven Material information
P_DD_MAT_ADDLINFO is a Basic CDS View that provides data about "Demand Driven Material information" in SAP S/4HANA. It reads from 5 data sources (pph_dd_bf_asg, pph_dbvm, mara, marc, mdlv) and exposes 3 fields with key fields matnr, werks, berid. Part of development package PPH_AMDP_READ.
Data Sources (5)
| Source | Alias | Join Type |
|---|---|---|
| pph_dd_bf_asg | _asg | inner |
| pph_dbvm | _dbvm | from |
| mara | _mara | inner |
| marc | _marc | inner |
| mdlv | _mdlv | inner |
Annotations (8)
| Name | Value | Level | Field |
|---|---|---|---|
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| EndUserText.label | Demand Driven Material information | view | |
| VDM.private | true | view | |
| VDM.viewType | #BASIC | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| ObjectModel.usageType.serviceQuality | #X | view | |
| ObjectModel.usageType.sizeCategory | #S | view | |
| ObjectModel.usageType.dataClass | #MIXED | view |
@AbapCatalog.viewEnhancementCategory: [#NONE]
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Demand Driven Material information'
@VDM.private: true
@VDM.viewType: #BASIC
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.usageType:{
serviceQuality: #X,
sizeCategory: #S,
dataClass: #MIXED
}
define view entity P_DD_MAT_ADDLINFO
as select from pph_dbvm as _dbvm
inner join marc as _marc on _marc.matnr = _dbvm.matnr
and _marc.werks = _dbvm.werks
inner join mdlv as _mdlv on _mdlv.berid = _dbvm.berid
inner join pph_dd_bf_asg as _asg on _asg.werks = _dbvm.werks
inner join mara as _mara on _mara.matnr = _dbvm.matnr
left outer to one join pph_dd_product as _ddproduct on
_ddproduct.matnr = _dbvm.matnr
and _ddproduct.werks = _dbvm.werks
and _ddproduct.berid = _dbvm.berid
left outer to one join pph_dd_bf_asg as _asgdef on _asg.werks = ''
left outer to one join mdma as _mdma on _mdma.matnr = _dbvm.matnr
and _mdma.werks = _dbvm.werks
and _mdma.berid = _dbvm.berid
and _mdma.loekz = ''
{
key _dbvm.matnr,
key _dbvm.werks,
key _dbvm.berid,
//_mdlv.berty,
case when _mdlv.berty = '03'
then case when _mdma.loekz = ''
then _mdma.dismm
else _marc.dismm
end
when _mdlv.berty = '02'
then _mdma.dismm
else _marc.dismm
end as dismm,
case when _mdma.dispo is null or _mdma.dispo = '' or
( _mdlv.berty = '03' and _mdma.loekz = 'X' )
then _marc.dispo
else _mdma.dispo
end as dispo,
//case statement to consider product table spike parameters,if all the three values are null in the product table then fall back to the profile assignment
// table's values, if values are not maitained at plant level also, fall back to default plant's spike parameters
case
when _ddproduct.spike_hrz_ls != 0 or _ddproduct.spike_hrz_lm != 0 or _ddproduct.spike_thld_fctr != 0
then cast(
ceil( _ddproduct.spike_hrz_ls +
coalesce(_ddproduct.decoupled_lead_time,_marc.wzeit) * _ddproduct.spike_hrz_lm ) as abap.int4 )
when _asg.spike_hrz_ls != 0 or _asg.spike_hrz_lm != 0 or _asg.spike_thld_fctr != 0
then cast( ceil( _asg.spike_hrz_ls +
coalesce(_ddproduct.decoupled_lead_time,_marc.wzeit) * _asg.spike_hrz_lm ) as abap.int4 )
else
cast( ceil( _asgdef.spike_hrz_ls +
coalesce(_ddproduct.decoupled_lead_time,_marc.wzeit) * coalesce( _asgdef.spike_hrz_lm , fltp_to_dec(1.0 as abap.dec(3,2) ) ) ) as abap.int4 )
end as spike_hrz_ls,
cast(ceil(coalesce( _ddproduct.decoupled_lead_time, _marc.wzeit )) as abap.int4 )
as decoupled_lead_time
}where
_dbvm.plscn = '000'
and _dbvm.sc_empty = ''
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