P_DD_MAT_ADDLINFO
Demand Driven Material information
P_DD_MAT_ADDLINFO is a CDS View in S/4HANA. Demand Driven Material information. It contains 3 fields. 1 CDS views read from this table.
CDS Views using this table (1)
| View | Type | Join | VDM | Description |
|---|---|---|---|---|
| P_DD_MAT_ADDLINFO1 | view_entity | from | BASIC | Demand Driven Material information |
Fields (3)
| Key | Field | CDS Fields | Used in Views |
|---|---|---|---|
| KEY | berid | berid | 1 |
| KEY | matnr | matnr | 1 |
| KEY | werks | werks | 1 |
@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 = ''