ml4h_cds_mv004
Mapping MLDOC at MV004
ml4h_cds_mv004 is a CDS View that provides data about "Mapping MLDOC at MV004" in SAP S/4HANA. It reads from 5 data sources (mldoc, ckmlhd, t001k, ckmllahd, t001w) and exposes 9 fields. Part of development package FCML4H_DOCUMENT.
Data Sources (5)
Parameters (4)
| Name | Type | Default |
|---|---|---|
| p_from | ml4h_jahrper | |
| p_to | ml4h_jahrper | |
| p_psa1 | ml4h_posart | |
| p_psa2 | ml4h_posart |
Annotations (7)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | V_ML4H_CDS_MV004 | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| ObjectModel.usageType.serviceQuality | X | view | |
| ObjectModel.usageType.sizeCategory | L | view | |
| ObjectModel.usageType.dataClass | TRANSACTIONAL | view | |
| EndUserText.label | Mapping MLDOC at MV004 | view |
@AbapCatalog.sqlViewName: 'V_ML4H_CDS_MV004'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ObjectModel.usageType.serviceQuality: 'X'
@ObjectModel.usageType.sizeCategory: 'L'
@ObjectModel.usageType.dataClass: 'TRANSACTIONAL'
@EndUserText.label: 'Mapping MLDOC at MV004'
define view ml4h_cds_mv004
with parameters
p_from : ml4h_jahrper,
p_to : ml4h_jahrper,
p_psa1 : ml4h_posart,
p_psa2 : ml4h_posart
as select from mldoc as d
left outer join ckmlhd as h on d.kalnr = h.kalnr
left outer join ckmllahd as l on d.kalnr = l.kalnr
left outer join t001w as w on l.werks = w.werks
inner join t001k as k on(
w.bwkey = k.bwkey
or h.bwkey = k.bwkey
)
{
d.kalnr as kalnr_inmat,
d.rldnr as rldnr,
d.curtp as curtp,
d.process as kalnr_prz,
case
when h.kalnr is null then 'LA'
else 'MB'
end as otyp_inmat,
'PR' as otyp_in,
case
when h.bwkey is null then w.bwkey
else h.bwkey
end as bwkey,
case
when l.werks is null then h.bwkey
else l.werks
end as werks,
h.matnr,
h.bwtar,
@Semantics.unitOfMeasure
d.meins as meinh,
@Semantics.quantity.unitOfMeasure: 'MEINH'
sum(d.quant) as in_menge
}
where
d.categ = 'VN'
and(
d.posart = 'UP'
or(
d.jahrper_wip between :p_from and :p_to
and d.ptyp = 'VF'
and(
d.posart = :p_psa1
or d.posart = :p_psa2
)
)
)
and d.jahrper between :p_from and :p_to
group by
d.kalnr,
d.process,
d.meins,
h.matnr,
h.bwkey,
w.bwkey,
h.bwtar,
h.kalnr,
l.werks,
d.rldnr,
d.curtp
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