e_mrp_mfg_comps

DDL: PPH_MRP_MFG_COMP SQL: V_MRP_MFG_COMPS Type: view

e_mrp_mfg_comps is a CDS View in SAP S/4HANA. It reads from 7 data sources.

Data Sources (7)

SourceAliasJoin Type
afko afk inner
afpo afp left_outer
sdm_msh_prof01 msh left_outer
mkal prv left_outer
v_mrp_reserv res inner
pph_cache_item udi left_outer
t006 uom left_outer

Annotations (6)

NameValueLevelField
AbapCatalog.sqlViewName V_MRP_MFG_COMPS view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #MIXED view
@AbapCatalog.sqlViewName: 'V_MRP_MFG_COMPS'
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType: {serviceQuality: #C, sizeCategory: #L, dataClass: #MIXED}
define view e_mrp_mfg_comps as
  select
    res.mandt,
    res.requirementtype as mrpelementcategory,
    res.reservation as mrpelement,
    res.reservationitem6 as mrpelementitem,
    res.material,
    res.plant as mrpplant,
    mat.mrparea,
    mat.mrpcontroller,
    res.storagelocation,
    res.inventoryspecialstocktype,
    res.requirementdate as mrpelementavailyorrqmtdate,
    res.requiredquantity as orderquantity,
    res.withdrawnquantity,
    res.requiredquantity - res.withdrawnquantity as mrpelementopenquantity,
    res.materialbaseunit,
    uom.andec as quantityprecision,
    uom.decan as targetquantityunitdisplaydcmls,
    mat.mrpplanningsegmenttype,
    mat.mrpplanningsegmentnumber,
    mat.mrpplanningsegmentid,
    mat.mrpplanningsegmentitem,
    mat.materialshortageprofile,
    msh.materialshortageprof_cnt,
    mat.materialsafetystockqty,
    mat.materialreplnmtleaddurnenddate,
    mat.totalreplnmtleaddurnenddate,
    mat.manualplanninghorizonenddate,
    mat.mrpsafetydurationenddate,
    case auk.autyp
      when '10' then 'FE'
      when '40' then 'BR'
    end as sourcemrpelementcategory,
    auk.aufnr as sourcemrpelement,
    udi.sourcemrpelementitem,
    udi.mrpelementtypeimportance,
    udi.mrpelementuncoveredquantity,
    udi.mrpelementdelayedquantity,
    udi.maximumdelaydate as maximumdelay,
    udi.maximumdelayindays,
    udi.maximumdelayinworkdays,
    udi.procurementprogressindicator,
    8 as demandtype,
    auk.auart as ordertype,
    coalesce(afp.matnr, '') as producedmaterial,
    auk.werks as productionplant,
    afk.fevor as productionsupervisor,
    coalesce(afp.verid, '') as productionversion,
    coalesce(prv.mdv01, '') as productionline
  from aufk as auk
    inner join afko as afk
      on auk.mandt = afk.mandt and
         auk.aufnr = afk.aufnr
    inner join v_mrp_reserv as res
      on afk.mandt = res.mandt and
         afk.rsnum = res.reservation and
         res.inventoryspecialstocktype <> 'P'
    left outer join ( v_mrp_materials as mat
      left outer join sdm_msh_prof01 as msh
        on mat.mandt = msh.mandt and
           mat.materialshortageprofile = msh.materialshortageprofile )
      on res.mandt    = mat.mandt and
         res.plant    = mat.mrpplant and
         res.material = mat.material and
         res.mrpplanningsegmenttype   = mat.mrpplanningsegmenttype and
         res.mrpplanningsegmentnumber = mat.mrpplanningsegmentnumber
    left outer join pph_cache_item as udi
      on res.mandt = udi.mandt and
         res.reservation = udi.mrpelement and
         res.reservationitem6 = udi.mrpelementitem and
         res.plant = udi.mrpplant and
         res.material = udi.material and
         msh.materialshortageprofile = udi.materialshortageprofile and
         msh.materialshortageprof_cnt = udi.materialshortageprof_cnt and
       ( udi.mrpelementcategory = 'AR' or
         udi.mrpelementcategory = 'SB' or
         udi.mrpelementcategory = 'SM' or
         udi.mrpelementcategory = 'SU' ) and
       ( udi.sourcemrpelementcategory = 'BR' or
         udi.sourcemrpelementcategory = 'FE' )
    left outer join afpo as afp
      on auk.mandt = afp.mandt and
         auk.aufnr = afp.aufnr and
         afp.posnr = '0001'
    left outer join mkal as prv
      on afp.mandt = prv.mandt and
         afp.matnr = prv.matnr and
         afp.pwerk = prv.werks and
         afp.verid = prv.verid
    left outer join t006 as uom
      on res.mandt            = uom.mandt and
         res.materialbaseunit = uom.msehi
  where ( auk.autyp = '10' or
          auk.autyp = '40' );
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"AFKO",
"AFPO",
"AUFK",
"MKAL",
"PPH_CACHE_ITEM",
"SDM_MSH_PROF01",
"T006",
"V_MRP_MATERIALS",
"V_MRP_RESERV"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/