P_SubstanceMigration

DDL: P_SUBSTANCEMIGRATION SQL: PSUBMIG Type: view COMPOSITE

P_SubstanceMigration is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (I_Substance, I_Substance) and exposes 7 fields.

Data Sources (2)

SourceAliasJoin Type
I_Substance I_Substance from
I_Substance I_Substance union

Annotations (9)

NameValueLevelField
AbapCatalog.sqlViewName PSUBMIG view
AbapCatalog.compiler.compareFilter true view
ClientHandling.algorithm #SESSION_VARIABLE view
AccessControl.authorizationCheck #NOT_ALLOWED view
ObjectModel.usageType.dataClass #MASTER view
ObjectModel.usageType.sizeCategory #M view
ObjectModel.usageType.serviceQuality #B view
VDM.viewType #COMPOSITE view
VDM.private true view

Fields (7)

KeyFieldSource TableSource FieldDescription
mandt I_Substance mandt
SubstanceUUID I_Substance SubstanceUUID
SubstanceInternalName I_Substance SubstanceInternalName
mandt
SubstanceUUID I_Substance SubstanceUUID
SubstanceInternalName I_Substance SubstanceInternalName
StatusField
@AbapCatalog.sqlViewName: 'PSUBMIG'
@AbapCatalog.compiler.compareFilter: true

@ClientHandling.algorithm: #SESSION_VARIABLE

@AccessControl.authorizationCheck: #NOT_ALLOWED

@ObjectModel:
{
  usageType:
  {
    dataClass: #MASTER,
    sizeCategory: #M,
    serviceQuality: #B
  }
}  

@VDM.viewType: #COMPOSITE
@VDM.private: true

-- View for the silent data migration for properties of Substance objects
-- It selects all Substance objects that do not have the necessary property root objects
define view P_SubstanceMigration

  -- Part One: Missing physical-chemical properties
  as select from I_Substance

    left outer to one join I_PhysicalChemicalProperty as PhysicalChemicalProperty on I_Substance.SubstanceUUID = PhysicalChemicalProperty.SubstanceUUID
{
  I_Substance.mandt,
  I_Substance.SubstanceUUID,
  I_Substance.SubstanceInternalName,
  '00'     as StatusField
}
where
       PhysicalChemicalProperty.PhysChmlPrptyUUID      is null

-- Part Two: Missing properties for ecotoxicological information
union select from I_Substance

    left outer to one join I_PCEctxProperty as PCEctxProperty on I_Substance.SubstanceUUID = PCEctxProperty.SubstanceUUID
{
  I_Substance.mandt,
  I_Substance.SubstanceUUID,
  I_Substance.SubstanceInternalName,
  '00'     as StatusField
}
where
       PCEctxProperty.PCEctxPrptyUUID     is null
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_PCECTXPROPERTY",
"I_PHYSICALCHEMICALPROPERTY",
"I_SUBSTANCE"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/