MLDOC_UCB_ALL
MLDOC with joined UCB all records
MLDOC_UCB_ALL is a CDS View that provides data about "MLDOC with joined UCB all records" in SAP S/4HANA. It reads from 8 data sources and exposes 138 fields with key fields docref, curtp, ucb_method, mlcct, svrel. Part of development package FCML4H_UCB.
Data Sources (8)
Annotations (6)
| Name | Value | Level | Field |
|---|---|---|---|
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| EndUserText.label | MLDOC with joined UCB all records | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| ObjectModel.usageType.serviceQuality | #X | view | |
| ObjectModel.usageType.sizeCategory | #S | view | |
| ObjectModel.usageType.dataClass | #MIXED | view |
Fields (138)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | docref | mldoc | docref | |
| KEY | curtp | mldoc | curtp | |
| KEY | ucb_method | mldocucb | ucb_method | |
| KEY | mlcct | |||
| KEY | svrel | mldocucb | svrel | |
| rldnr | mldoc | rldnr | ||
| kalnr | mldoc | kalnr | ||
| jahrper | mldoc | jahrper | ||
| jahrper_wip | mldoc | jahrper_wip | ||
| xabr | mldoc | xabr | ||
| vgart | mldoc | vgart | ||
| runref | mldoc | runref | ||
| posart | mldoc | posart | ||
| categ | mldoc | categ | ||
| ptyp | mldoc | ptyp | ||
| bvalt | mldoc | bvalt | ||
| process | mldoc | process | ||
| pkalnr | mldoc | pkalnr | ||
| waers | mldoc | waers | ||
| meins | mldoc | meins | ||
| xkdm_nact | mldoc | xkdm_nact | ||
| quant | mldoc | quant | ||
| stval | mldoc | stval | ||
| prd | mldoc | prd | ||
| kdm | mldoc | kdm | ||
| markup | mldoc | markup | ||
| xtprel | mldoc | xtprel | ||
| xplrel | mldoc | xplrel | ||
| plqty | mldoc | plqty | ||
| timestamp | mldoc | timestamp | ||
| cyclenr | mldoc | cyclenr | ||
| aufnr | mldoc | aufnr | ||
| tot | ||||
| fix | ||||
| KEY | curtp | mldoc | curtp | |
| KEY | ucb_method | mldocucb | ucb_method | |
| KEY | mlcct | |||
| KEY | svrel | mldocucb | svrel | |
| rldnr | mldoc | rldnr | ||
| kalnr | mldoc | kalnr | ||
| jahrper | mldoc | jahrper | ||
| jahrper_wip | mldoc | jahrper_wip | ||
| xabr | mldoc | xabr | ||
| vgart | mldoc | vgart | ||
| runref | mldoc | runref | ||
| posart | mldoc | posart | ||
| categ | mldoc | categ | ||
| ptyp | mldoc | ptyp | ||
| bvalt | mldoc | bvalt | ||
| process | mldoc | process | ||
| pkalnr | mldoc | pkalnr | ||
| waers | mldoc | waers | ||
| meins | mldoc | meins | ||
| xkdm_nact | mldoc | xkdm_nact | ||
| quant | mldoc | quant | ||
| stval | mldoc | stval | ||
| prd | mldoc | prd | ||
| kdm | mldoc | kdm | ||
| markup | mldoc | markup | ||
| xtprel | mldoc | xtprel | ||
| xplrel | mldoc | xplrel | ||
| plqty | mldoc | plqty | ||
| timestamp | mldoc | timestamp | ||
| cyclenr | mldoc | cyclenr | ||
| aufnr | mldoc | aufnr | ||
| quant_tot | ||||
| quant_fix | ||||
| KEY | curtp | mldoc | curtp | |
| KEY | ucb_method | mldocucb | ucb_method | |
| KEY | mlcct | mldocucb | mlcct | |
| KEY | svrel | mldocucb | svrel | |
| rldnr | mldoc | rldnr | ||
| kalnr | mldoc | kalnr | ||
| jahrper | mldoc | jahrper | ||
| jahrper_wip | mldoc | jahrper_wip | ||
| xabr | mldoc | xabr | ||
| vgart | mldoc | vgart | ||
| runref | mldoc | runref | ||
| posart | mldoc | posart | ||
| categ | mldoc | categ | ||
| ptyp | mldoc | ptyp | ||
| bvalt | mldoc | bvalt | ||
| process | mldoc | process | ||
| pkalnr | mldoc | pkalnr | ||
| waers | mldoc | waers | ||
| meins | mldoc | meins | ||
| xkdm_nact | mldoc | xkdm_nact | ||
| quant | mldoc | quant | ||
| stval | mldoc | stval | ||
| prd | mldoc | prd | ||
| kdm | mldoc | kdm | ||
| markup | mldoc | markup | ||
| xtprel | mldoc | xtprel | ||
| xplrel | mldoc | xplrel | ||
| plqty | mldoc | plqty | ||
| timestamp | mldoc | timestamp | ||
| cyclenr | mldoc | cyclenr | ||
| aufnr | mldoc | aufnr | ||
| quant_tot | mldocucb | quant_tot | ||
| quant_fix | mldocucb | quant_fix | ||
| tot | ||||
| fix | ||||
| KEY | curtp | mldoc | curtp | |
| KEY | ucb_method | mldocucb | ucb_method | |
| KEY | mlcct | mldocucb | mlcct | |
| KEY | svrel | mldocucb | svrel | |
| rldnr | mldoc | rldnr | ||
| kalnr | mldoc | kalnr | ||
| jahrper | mldoc | jahrper | ||
| jahrper_wip | mldoc | jahrper_wip | ||
| xabr | mldoc | xabr | ||
| vgart | mldoc | vgart | ||
| runref | mldoc | runref | ||
| posart | mldoc | posart | ||
| categ | mldoc | categ | ||
| ptyp | mldoc | ptyp | ||
| bvalt | mldoc | bvalt | ||
| process | mldoc | process | ||
| pkalnr | mldoc | pkalnr | ||
| waers | mldoc | waers | ||
| meins | mldoc | meins | ||
| xkdm_nact | mldoc | xkdm_nact | ||
| quant | mldoc | quant | ||
| stval | mldoc | stval | ||
| prd | mldoc | prd | ||
| kdm | mldoc | kdm | ||
| markup | mldoc | markup | ||
| xtprel | mldoc | xtprel | ||
| xplrel | mldoc | xplrel | ||
| plqty | mldoc | plqty | ||
| timestamp | mldoc | timestamp | ||
| cyclenr | mldoc | cyclenr | ||
| aufnr | mldoc | aufnr | ||
| quant_tot | mldocucb | quant_tot | ||
| quant_fix | mldocucb | quant_fix | ||
| tot | mldocucb | tot | ||
| fix | mldocucb | fix | ||
| persisted |
@AbapCatalog.viewEnhancementCategory: [#NONE]
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'MLDOC with joined UCB all records'
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.usageType:{
serviceQuality: #X,
sizeCategory: #S,
dataClass: #MIXED
}
define view entity MLDOC_UCB_ALL
as
// Reference UCB records, CURTP-independent
select from mldoc as doc inner join mldocucb as ucb
on doc.pdocref = ucb.docref
// and doc.curtp = '10'
and ucb.curtp = ''
{
key doc.docref as docref,
key doc.curtp as curtp,
key ucb.ucb_method as ucb_method,
key ucb.ucb_component as ucb_component,
key cast('V' as ml4h_mlcct preserving type) as mlcct,
key ucb.svrel as svrel,
doc.rldnr as rldnr,
doc.kalnr as kalnr,
doc.jahrper as jahrper,
doc.jahrper_wip as jahrper_wip,
doc.xabr as xabr,
doc.vgart as vgart,
doc.runref as runref,
doc.posart as posart,
doc.categ as categ,
doc.ptyp as ptyp,
doc.bvalt as bvalt,
doc.process as process,
doc.pkalnr as pkalnr,
doc.waers as waers,
doc.meins as meins,
doc.xkdm_nact as xkdm_nact,
@Semantics.quantity.unitOfMeasure: 'meins'
doc.quant as quant,
@Semantics.amount.currencyCode: 'waers'
doc.stval as stval,
@Semantics.amount.currencyCode: 'waers'
doc.prd as prd,
@Semantics.amount.currencyCode: 'waers'
doc.kdm as kdm,
@Semantics.amount.currencyCode: 'waers'
doc.markup as markup,
doc.xtprel as xtprel,
doc.xplrel as xplrel,
@Semantics.quantity.unitOfMeasure: 'meins'
doc.plqty as plqty,
doc.timestamp as timestamp,
doc.cyclenr as cyclenr,
doc.aufnr as aufnr,
ucb.quantity_unit as quantity_unit,
@Semantics.quantity.unitOfMeasure: 'quantity_unit'
cast(round( ucb.quant_tot_ps / ucb.scale_denominator * doc.quant, 3 ) -
round((ucb.quant_tot_ps - ucb.quant_tot) / ucb.scale_denominator * doc.quant, 3 ) as fucb_quantity)
as quant_tot,
@Semantics.quantity.unitOfMeasure: 'quantity_unit'
cast(round( ucb.quant_fix_ps / ucb.scale_denominator * doc.quant, 3 ) -
round((ucb.quant_fix_ps - ucb.quant_fix) / ucb.scale_denominator * doc.quant, 3 ) as fucb_quantity)
as quant_fix,
@Semantics.amount.currencyCode: 'waers'
cast('0' as ml4h_total) as tot,
@Semantics.amount.currencyCode: 'waers'
cast('0' as ml4h_fix) as fix,
' ' as persisted
}
where doc.pdocref <> '00000000000000000000'
and ucb.scale_denominator <> 0
union all
// Reference UCB records, CURTP-dependent
select from mldoc as doc inner join mldocucb as ucb
on doc.pdocref = ucb.docref
and doc.curtp = ucb.curtp
{
key doc.docref as docref,
key doc.curtp as curtp,
key ucb.ucb_method as ucb_method,
key ucb.ucb_component as ucb_component,
key cast('V' as ml4h_mlcct preserving type) as mlcct,
key ucb.svrel as svrel,
doc.rldnr as rldnr,
doc.kalnr as kalnr,
doc.jahrper as jahrper,
doc.jahrper_wip as jahrper_wip,
doc.xabr as xabr,
doc.vgart as vgart,
doc.runref as runref,
doc.posart as posart,
doc.categ as categ,
doc.ptyp as ptyp,
doc.bvalt as bvalt,
doc.process as process,
doc.pkalnr as pkalnr,
doc.waers as waers,
doc.meins as meins,
doc.xkdm_nact as xkdm_nact,
doc.quant as quant,
doc.stval as stval,
doc.prd as prd,
doc.kdm as kdm,
doc.markup as markup,
doc.xtprel as xtprel,
doc.xplrel as xplrel,
doc.plqty as plqty,
doc.timestamp as timestamp,
doc.cyclenr as cyclenr,
doc.aufnr as aufnr,
ucb.quantity_unit as quantity_unit,
cast('0' as fucb_quantity) as quant_tot,
cast('0' as fucb_quantity) as quant_fix,
case ucb.scale_type
when 'A' then
cast(round( cast(ucb.tot_ps as fucb_scale_denominator) / ucb.scale_denominator * cast(doc.stval as fucb_scale_denominator), 2 ) -
round((cast(ucb.tot_ps as fucb_scale_denominator) - cast(ucb.tot as fucb_scale_denominator)) / ucb.scale_denominator * cast(doc.stval as fucb_scale_denominator), 2 ) as ml4h_total)
else
cast('0' as ml4h_total)
end as tot,
case ucb.scale_type
when 'A' then
cast(round( cast(ucb.fix_ps as fucb_scale_denominator) / ucb.scale_denominator * cast(doc.stval as fucb_scale_denominator), 2 ) -
round((cast(ucb.fix_ps as fucb_scale_denominator) - cast(ucb.fix as fucb_scale_denominator)) / ucb.scale_denominator * cast(doc.stval as fucb_scale_denominator), 2 ) as ml4h_fix)
else
cast('0' as ml4h_fix)
end as fix,
' ' as persisted
}
where doc.pdocref <> '00000000000000000000'
and ucb.scale_denominator <> 0
union all
// Persisted UCB records, CURTP-independent
select from mldoc as doc inner join mldocucb as ucb
on doc.docref = ucb.docref
// and doc.curtp = '10'
and ucb.curtp = ''
{
key doc.docref as docref,
key doc.curtp as curtp,
key ucb.ucb_method as ucb_method,
key ucb.ucb_component as ucb_component,
key ucb.mlcct as mlcct,
key ucb.svrel as svrel,
doc.rldnr as rldnr,
doc.kalnr as kalnr,
doc.jahrper as jahrper,
doc.jahrper_wip as jahrper_wip,
doc.xabr as xabr,
doc.vgart as vgart,
doc.runref as runref,
doc.posart as posart,
doc.categ as categ,
doc.ptyp as ptyp,
doc.bvalt as bvalt,
doc.process as process,
doc.pkalnr as pkalnr,
doc.waers as waers,
doc.meins as meins,
doc.xkdm_nact as xkdm_nact,
doc.quant as quant,
doc.stval as stval,
doc.prd as prd,
doc.kdm as kdm,
doc.markup as markup,
doc.xtprel as xtprel,
doc.xplrel as xplrel,
doc.plqty as plqty,
doc.timestamp as timestamp,
doc.cyclenr as cyclenr,
doc.aufnr as aufnr,
ucb.quantity_unit as quantity_unit,
ucb.quant_tot as quant_tot,
ucb.quant_fix as quant_fix,
cast('0' as ml4h_total) as tot,
cast('0' as ml4h_fix) as fix,
'X' as persisted
}
union all
// Persisted UCB records, CURTP-dependent
select from mldoc as doc inner join mldocucb as ucb
on doc.docref = ucb.docref
and doc.curtp = ucb.curtp
{
key doc.docref as docref,
key doc.curtp as curtp,
key ucb.ucb_method as ucb_method,
key ucb.ucb_component as ucb_component,
key ucb.mlcct as mlcct,
key ucb.svrel as svrel,
doc.rldnr as rldnr,
doc.kalnr as kalnr,
doc.jahrper as jahrper,
doc.jahrper_wip as jahrper_wip,
doc.xabr as xabr,
doc.vgart as vgart,
doc.runref as runref,
doc.posart as posart,
doc.categ as categ,
doc.ptyp as ptyp,
doc.bvalt as bvalt,
doc.process as process,
doc.pkalnr as pkalnr,
doc.waers as waers,
doc.meins as meins,
doc.xkdm_nact as xkdm_nact,
doc.quant as quant,
doc.stval as stval,
doc.prd as prd,
doc.kdm as kdm,
doc.markup as markup,
doc.xtprel as xtprel,
doc.xplrel as xplrel,
doc.plqty as plqty,
doc.timestamp as timestamp,
doc.cyclenr as cyclenr,
doc.aufnr as aufnr,
ucb.quantity_unit as quantity_unit,
ucb.quant_tot as quant_tot,
ucb.quant_fix as quant_fix,
ucb.tot as tot,
ucb.fix as fix,
'X' as persisted
}
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