I_MRPPurchasingInfoRecord

DDL: I_MRPPURCHASINGINFORECORD SQL: IMRPPURGINFOREC Type: view BASIC

Basic InfoRecords for SOS

I_MRPPurchasingInfoRecord is a Basic CDS View that provides data about "Basic InfoRecords for SOS" in SAP S/4HANA. It reads from 3 data sources (eina, eine, eine) and exposes 47 fields.

Data Sources (3)

SourceAliasJoin Type
eina eina from
eine eine inner
eine eine inner

Annotations (11)

NameValueLevelField
AbapCatalog.sqlViewName IMRPPURGINFOREC view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #MANDATORY view
EndUserText.label Basic InfoRecords for SOS view
VDM.viewType #BASIC view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #MIXED view
ClientHandling.type #CLIENT_DEPENDENT view

Fields (47)

KeyFieldSource TableSource FieldDescription
ManufacturerMaterial eina matnr
Material mara matnr
Plant t024w werks
ValidityStartDate eina lifab
lifbiendasValidityEndDate
PreferredSupplier eina lifnr
umren3endendasMaterialMinLotSizeQuantity
umren3endendasMaterialMaxLotSizeQuantity
IsRelevantForAutomSrcg eine aut_source
PurgDocNetPriceAmount eine netpr
PurgDocTransactionCurrency eine waers
PurgDocNetPriceQuantity eine peinh
ActivePurchasingInfoRecord eina infnr
PurchasingOrganization eine ekorg
PurchasingInfoRecordCategory eine esokz
PurchasingGroup eine ekgrp
GoodsReceiptDuration marc webaz
PlannedDeliveryDuration eine aplfz
ProductionVersion eine verid
RoundingProfile eine rdprf
werkswhenthenelseXendasPurgDocHasPlant
ProductVariantGroup eina matkl
PurgDocHasRefPurchasingOrg
matnrasManufacturerMaterial
Material mara bmatn
Plant t024w werks
ValidityStartDate eina lifab
lifbiendasValidityEndDate
PreferredSupplier eina lifnr
umren3endendasMaterialMinLotSizeQuantity
umren3endendasMaterialMaxLotSizeQuantity
IsRelevantForAutomSrcg eine aut_source
PurgDocNetPriceAmount eine netpr
PurgDocTransactionCurrency eine waers
PurgDocNetPriceQuantity eine peinh
ActivePurchasingInfoRecord eina infnr
PurchasingOrganization eine ekorg
PurchasingInfoRecordCategory eine esokz
PurchasingGroup eine ekgrp
GoodsReceiptDuration marc webaz
PlannedDeliveryDuration eine aplfz
ProductionVersion eine verid
RoundingProfile eine rdprf
werkswhenthenelseXendasPurgDocHasPlant
ProductVariantGroup eina matkl
PurgDocHasRefPurchasingOrg
ManufacturerPartProfile mara mprof
@AbapCatalog.sqlViewName: 'IMRPPURGINFOREC'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #MANDATORY
@EndUserText.label: 'Basic InfoRecords for SOS'
@VDM.viewType:#BASIC
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.sizeCategory: #L
@ObjectModel.usageType.dataClass: #MIXED
@ClientHandling.type: #CLIENT_DEPENDENT
@AccessControl.personalData.blocking: #('TRANSACTIONAL_DATA')
define view I_MRPPurchasingInfoRecord as 
-- Standard Material / Internal Material  
  select from eina as eina
             inner join eine as eine on  eina.infnr = eine.infnr 
             left outer to one join t024w as t024w on t024w.ekorg = eine.ekorg and (t024w.werks = eine.werks or eine.werks = '' )
             left outer to one join marc as marc on  eina.matnr = marc.matnr and marc.werks = t024w.werks
             join mara as mara on eina.matnr = mara.matnr 
             left outer to one join lfa1 as lfa1 on  eina.lifnr = lfa1.lifnr
             left outer to one join lfm1 as lfm1 on  eina.lifnr = lfm1.lifnr and eine.ekorg = lfm1.ekorg                      
{
    eina.matnr  as ManufacturerMaterial,   
    mara.matnr  as Material,                          
    t024w.werks as Plant,
    eina.lifab  as ValidityStartDate,
    case eina.lifbi
      when '00000000' then '99991231'
      else eina.lifbi  
    end as ValidityEndDate, 
    eina.lifnr as PreferredSupplier,
    case eine.minbm
      when 0 then eine.minbm
      else
       case eina.umren 
         when 0 then eine.minbm
         else division((eine.minbm * eina.umrez), eina.umren, 3)
       end   
    end as MaterialMinLotSizeQuantity,
    case eine.bstma
      when 0 then cast('9999999999' as abap.dec(13,3)) 
      else
       case eina.umren 
         when 0 then eine.bstma
         else division((eine.bstma * eina.umrez), eina.umren, 3)
       end   
    end as MaterialMaxLotSizeQuantity,
    eine.aut_source as IsRelevantForAutomSrcg,
    eine.netpr as PurgDocNetPriceAmount,
    eine.waers as PurgDocTransactionCurrency,
    eine.peinh as PurgDocNetPriceQuantity, 
    eina.infnr as ActivePurchasingInfoRecord,
    eine.ekorg as PurchasingOrganization,
    eine.esokz as PurchasingInfoRecordCategory,
    eine.ekgrp as PurchasingGroup,
    marc.webaz as GoodsReceiptDuration,
    eine.aplfz as PlannedDeliveryDuration, 
    eine.verid as ProductionVersion,
    eine.rdprf as RoundingProfile,
    case eine.werks
      when '' then ''
      else 'X'
    end as PurgDocHasPlant,
    eina.matkl as ProductVariantGroup,
    
    '' as PurgDocHasRefPurchasingOrg,
    mara.mprof as ManufacturerPartProfile

}
where eina.loekz ='' and eine.loekz = '' and lfa1.loevm = '' and lfm1.loevm = ''  and lfa1.sperm = '' and lfm1.sperm = ''
and eina.matnr <> '' and mara.bmatn = '' //and ( lfa1.cvp_xblck <> 'X'   or lfa1.cvp_xblck = '' )


union all

-- MPN Material
select from eina as eina
             inner join eine as eine on  eina.infnr = eine.infnr 
             left outer to one join t024w as t024w on t024w.ekorg = eine.ekorg and (t024w.werks = eine.werks or eine.werks = '' )
             left outer to one join marc as marc on  eina.matnr = marc.matnr and marc.werks = t024w.werks
             left outer to one join mara as mara on eina.matnr = mara.matnr 
             left outer to one join lfa1 as lfa1 on  eina.lifnr = lfa1.lifnr
             left outer to one join lfm1 as lfm1 on  eina.lifnr = lfm1.lifnr and eine.ekorg = lfm1.ekorg                      
{
    eina.matnr  as ManufacturerMaterial,
    mara.bmatn  as Material,                          
    t024w.werks as Plant,
    eina.lifab  as ValidityStartDate,
    case eina.lifbi
      when '00000000' then '99991231'
      else eina.lifbi  
    end as ValidityEndDate, 
    eina.lifnr as PreferredSupplier,
    case eine.minbm
      when 0 then eine.minbm
      else
       case eina.umren 
         when 0 then eine.minbm
         else division((eine.minbm * eina.umrez), eina.umren, 3)
       end   
    end as MaterialMinLotSizeQuantity,
    case eine.bstma
      when 0 then cast('9999999999' as abap.dec(13,3)) 
      else
       case eina.umren 
         when 0 then eine.bstma
         else division((eine.bstma * eina.umrez), eina.umren, 3)
       end   
    end as MaterialMaxLotSizeQuantity,
    eine.aut_source as IsRelevantForAutomSrcg,
    eine.netpr as PurgDocNetPriceAmount,
    eine.waers as PurgDocTransactionCurrency,
    eine.peinh as PurgDocNetPriceQuantity, 
    eina.infnr as ActivePurchasingInfoRecord,
    eine.ekorg as PurchasingOrganization,
    eine.esokz as PurchasingInfoRecordCategory,
    eine.ekgrp as PurchasingGroup,
    marc.webaz as GoodsReceiptDuration,
    eine.aplfz as PlannedDeliveryDuration, 
    eine.verid as ProductionVersion,
    eine.rdprf as RoundingProfile,
    case eine.werks
      when '' then ''
      else 'X'
    end as PurgDocHasPlant,
    eina.matkl as ProductVariantGroup,
    
    '' as PurgDocHasRefPurchasingOrg,
    mara.mprof as ManufacturerPartProfile

}
where eina.loekz ='' and eine.loekz = '' and lfa1.loevm = '' and lfm1.loevm = ''  and lfa1.sperm = '' and lfm1.sperm = ''
and eina.matnr <> '' and mara.bmatn <> '' //and ( lfa1.cvp_xblck <> 'X'   or lfa1.cvp_xblck = '' )

/*+[internal] {
"BASEINFO":
{
"FROM":
[
"EINA",
"EINE",
"LFA1",
"LFM1",
"MARA",
"MARC",
"T024W"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/