Fcdm_Keyfigures_Read_Custrq

DDL: FCDM_KEYFIGURES_READ_CUSTRQ SQL: V_FCDM_RD_CR Type: view

Read Customer Requirements for Forecast Demand Keyfigures

Fcdm_Keyfigures_Read_Custrq is a CDS View that provides data about "Read Customer Requirements for Forecast Demand Keyfigures" in SAP S/4HANA. It reads from 3 data sources (vbak, vbap, vbep) and exposes 9 fields with key fields matnr, werks, berid, vbeln, posnr.

Data Sources (3)

SourceAliasJoin Type
vbak vbak from
vbap vbap inner
vbep vbep inner

Annotations (7)

NameValueLevelField
AbapCatalog.sqlViewName V_FCDM_RD_CR view
EndUserText.label Read Customer Requirements for Forecast Demand Keyfigures view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #AUTOMATED view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #TRANSACTIONAL view

Fields (9)

KeyFieldSource TableSource FieldDescription
KEY matnr vbap matnr
KEY werks vbap werks
KEY berid vbap werks
KEY vbeln vbep vbeln
KEY posnr vbep posnr
KEY etenr vbep etenr
lgort vbap lgort
meins
thequantityisnowinMEINS
@AbapCatalog.sqlViewName: 'V_FCDM_RD_CR'
@EndUserText.label: 'Read Customer Requirements for Forecast Demand Keyfigures'
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.algorithm: #AUTOMATED
@ObjectModel.usageType: {serviceQuality: #X, sizeCategory: #XL, dataClass: #TRANSACTIONAL}
define view Fcdm_Keyfigures_Read_Custrq as select
   from vbak as vbak                  -- order header
   inner join vbap as vbap            -- order items
        on  vbak.vbeln = vbap.vbeln 
   inner join vbep as vbep            -- schedule lines
        on  vbap.vbeln = vbep.vbeln
        and vbap.posnr = vbep.posnr
    {
    key vbap.matnr,
    key vbap.werks,
    key vbap.werks  as berid,
    key vbep.vbeln,
    key vbep.posnr,
    key vbep.etenr,    
    vbap.lgort,
    case when vbap.abgru = '' and vbep.umvkn = 0 then vbep.cmeng
         when vbap.abgru = '' and vbep.umvkn <> 0       -- if not cancelled take requested quantity, else the already delivered quantity
         then division( vbep.cmeng                      -- we do not take directly the requested quantity (WMENG) but rather the rounded quantiy CMENG. it is in sales unit 
                       * vbep.umvkz, vbep.umvkn, 3 )             -- conversion factors
         else 0 
    end                                as quantity,    -- converted to base unit
    @Semantics.unitOfMeasure: true
    vbep.meins,       -- the quantity is now in MEINS, not in VRKME
    vbep.mbdat                         as mbdat        -- requested date scheduled when the material should be provided
    }
 where vbak.vbtyp = 'C'       -- only customer orders
   and vbep.lfrel = 'X'       -- only  delivery relevant items