I_PurInfCndHelpr

DDL: I_PURINFCNDHELPR SQL: IPURINFCNDHLPRV Type: view BASIC

Helper View For CDS

I_PurInfCndHelpr is a Basic CDS View that provides data about "Helper View For CDS" in SAP S/4HANA. It reads from 5 data sources (a017, a018, a025, a028, I_PurgInfoRecdOrgPlantData) and exposes 9 fields with key fields knumhelseNULLendasConditionRecord, PurchasingInfoRecord, datsendasConditionValidityEndDate.

Data Sources (5)

SourceAliasJoin Type
a017 i_a017 left_outer
a018 i_a018 left_outer
a025 i_a025 left_outer
a028 i_a028 left_outer
I_PurgInfoRecdOrgPlantData inf_org inner

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName IPURINFCNDHLPRV view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #CHECK view
EndUserText.label Helper View For CDS view
VDM.viewType #BASIC view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #L view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
VDM.lifecycle.contract.type #SAP_INTERNAL_API view

Fields (9)

KeyFieldSource TableSource FieldDescription
KEY knumhelseNULLendasConditionRecord
KEY PurchasingInfoRecord inf_gen PurchasingInfoRecord
KEY datsendasConditionValidityEndDate
Supplier inf_gen Supplier
PurchasingOrganization I_PurgInfoRecdOrgPlantData PurchasingOrganization
Plant I_PurgInfoRecdOrgPlantData Plant
PurchasingInfoRecordCategory I_PurgInfoRecdOrgPlantData PurchasingInfoRecordCategory
datsendasConditionValidityStartDate
char4endasConditionTable
@AbapCatalog.sqlViewName: 'IPURINFCNDHLPRV'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Helper View For CDS'
@VDM.viewType: #BASIC
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.sizeCategory: #L
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType.dataClass: #TRANSACTIONAL
@VDM.lifecycle.contract.type: #SAP_INTERNAL_API
define view I_PurInfCndHelpr
  as select distinct from I_PurchasingInfoRecord     as inf_gen

    inner join            I_PurgInfoRecdOrgPlantData as inf_org on inf_org.PurchasingInfoRecord = inf_gen.PurchasingInfoRecord

    left outer join       a017                       as i_a017  on  i_a017.lifnr = inf_gen.Supplier
                                                                and i_a017.matnr = inf_gen.Material
                                                                and i_a017.ekorg = inf_org.PurchasingOrganization
                                                                and i_a017.werks = inf_org.Plant
                                                                and i_a017.esokz = inf_org.PurchasingInfoRecordCategory

    left outer join       a018                       as i_a018  on  i_a018.lifnr = inf_gen.Supplier
                                                                and i_a018.matnr = inf_gen.Material
                                                                and i_a018.ekorg = inf_org.PurchasingOrganization
                                                                and i_a018.esokz = inf_org.PurchasingInfoRecordCategory

    left outer join       a025                       as i_a025  on  i_a025.lifnr = inf_gen.Supplier
                                                                and i_a025.ekorg = inf_org.PurchasingOrganization
                                                                and i_a025.matkl = inf_gen.MaterialGroup
                                                                and i_a025.infnr = inf_gen.PurchasingInfoRecord
                                                                and i_a025.werks = inf_org.Plant
                                                                and i_a025.esokz = inf_org.PurchasingInfoRecordCategory

    left outer join       a028                       as i_a028  on  i_a028.lifnr = inf_gen.Supplier
                                                                and i_a028.ekorg = inf_org.PurchasingOrganization
                                                                and i_a028.matkl = inf_gen.MaterialGroup
                                                                and i_a028.infnr = inf_gen.PurchasingInfoRecord
                                                                and i_a028.esokz = inf_org.PurchasingInfoRecordCategory
{

  key case
  when inf_gen.Supplier <> '' and inf_gen.Material <> '' and inf_org.PurchasingOrganization <> '' and inf_org.Plant <> '' and  inf_org.PurchasingInfoRecordCategory <> ''
  then i_a017.knumh
  when inf_gen.Supplier <> '' and inf_gen.Material <> '' and inf_org.PurchasingOrganization <> '' and inf_org.PurchasingInfoRecordCategory <> ''
  then i_a018.knumh
  when inf_gen.Supplier <> '' and inf_org.PurchasingOrganization <> '' and inf_gen.MaterialGroup <> '' and inf_gen.PurchasingInfoRecord <> ''  and inf_org.Plant <> '' and inf_org.PurchasingInfoRecordCategory <> ''
  then i_a025.knumh
  when inf_gen.Supplier <> '' and inf_org.PurchasingOrganization <> '' and inf_gen.MaterialGroup <> '' and inf_gen.PurchasingInfoRecord <> ''  and inf_org.PurchasingInfoRecordCategory <> ''
  then i_a028.knumh
  else
  'NULL'
  end                  as ConditionRecord,

  key inf_gen.PurchasingInfoRecord,

  key case
  when inf_gen.Supplier <> '' and inf_gen.Material <> '' and inf_org.PurchasingOrganization <> '' and inf_org.Plant <> '' and  inf_org.PurchasingInfoRecordCategory <> ''
  then i_a017.datbi
  when inf_gen.Supplier <> '' and inf_gen.Material <> '' and inf_org.PurchasingOrganization <> '' and inf_org.PurchasingInfoRecordCategory <> ''
  then i_a018.datbi
  when inf_gen.Supplier <> '' and inf_org.PurchasingOrganization <> '' and inf_gen.MaterialGroup <> '' and inf_gen.PurchasingInfoRecord <> ''  and inf_org.Plant <> '' and inf_org.PurchasingInfoRecordCategory <> ''
  then i_a025.datbi
  when inf_gen.Supplier <> '' and inf_org.PurchasingOrganization <> '' and inf_gen.MaterialGroup <> '' and inf_gen.PurchasingInfoRecord <> ''  and inf_org.PurchasingInfoRecordCategory <> ''
  then i_a028.datbi
  else
  cast( '00000000' as abap.dats )
  end                  as ConditionValidityEndDate,

      inf_gen.Supplier as Supplier,
      inf_org.PurchasingOrganization,
      inf_org.Plant    as Plant,
      inf_org.PurchasingInfoRecordCategory,

      case
      when inf_gen.Supplier <> '' and inf_gen.Material <> '' and inf_org.PurchasingOrganization <> '' and inf_org.Plant <> '' and  inf_org.PurchasingInfoRecordCategory <> ''
      then i_a017.datab
      when inf_gen.Supplier <> '' and inf_gen.Material <> '' and inf_org.PurchasingOrganization <> '' and inf_org.PurchasingInfoRecordCategory <> ''
      then i_a018.datab
      when inf_gen.Supplier <> '' and inf_org.PurchasingOrganization <> '' and inf_gen.MaterialGroup <> '' and inf_gen.PurchasingInfoRecord <> ''  and inf_org.Plant <> '' and inf_org.PurchasingInfoRecordCategory <> ''
      then i_a025.datab
      when inf_gen.Supplier <> '' and inf_org.PurchasingOrganization <> '' and inf_gen.MaterialGroup <> '' and inf_gen.PurchasingInfoRecord <> ''  and inf_org.PurchasingInfoRecordCategory <> ''
      then i_a028.datab
      else
      cast( '00000000' as abap.dats )
      end              as ConditionValidityStartDate,


      case
      when inf_gen.Supplier <> '' and inf_gen.Material <> '' and inf_org.PurchasingOrganization <> '' and inf_org.Plant <> '' and  inf_org.PurchasingInfoRecordCategory <> ''
      then cast('A017'  as abap.char(4))
      when inf_gen.Supplier <> '' and inf_gen.Material <> '' and inf_org.PurchasingOrganization <> '' and inf_org.PurchasingInfoRecordCategory <> ''
      then cast ('A018' as abap.char(4))
      when inf_gen.Supplier <> '' and inf_org.PurchasingOrganization <> '' and inf_gen.MaterialGroup <> '' and inf_gen.PurchasingInfoRecord <> ''  and inf_org.Plant <> '' and inf_org.PurchasingInfoRecordCategory <> ''
      then cast ('A025' as abap.char(4))
      when inf_gen.Supplier <> '' and inf_org.PurchasingOrganization <> '' and inf_gen.MaterialGroup <> '' and inf_gen.PurchasingInfoRecord <> ''  and inf_org.PurchasingInfoRecordCategory <> ''
      then cast ('A028' as abap.char(4))
      else
      cast ('Annn' as abap.char(4))
      end              as ConditionTable
}                    
  
  
  
  
 /*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_PURCHASINGINFORECORD",
"I_PURGINFORECDORGPLANTDATA",
"A017",
"A018",
"A025",
"A028"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/