I_SAMPLINGHEADER

CDS View

Sampling Definition - Header

I_SAMPLINGHEADER is a CDS View in S/4HANA. Sampling Definition - Header. It contains 4 fields. 3 CDS views read from this table.

CDS Views using this table (3)

ViewTypeJoinVDMDescription
C_EHSSamplingHeaderDEX view_entity from CONSUMPTION Sampling Header Data Extraction
I_EHSAmountsForActivity view inner COMPOSITE Amounts for Activity
I_EHSDataSet view union COMPOSITE Data Sets

Fields (4)

KeyField CDS FieldsUsed in Views
KEY SamplingHeaderUUID EHSComplianceScenActivityUUID,SamplingHeaderUUID 2
EHSSamplingHeaderID EHSComplianceScenActivityID,EHSSamplingHeaderID 2
SamplingAnalyteType SamplingAnalyteType 1
SamplingHeaderTitle EHSClassifiedDataTitle,EHSComplianceScenActivityTitle,EHSSamplingHeaderTitle 3
@AbapCatalog.sqlViewName: 'ISDEFHEAD'
@VDM.viewType: #BASIC
@EndUserText.label: 'Sampling Definition - Header'

@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType.dataClass: #MASTER
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.sizeCategory: #M
@AccessControl.authorizationCheck: #NOT_REQUIRED

define view I_SamplingHeader
  as select from ehenvd_sdef_head as head
  
  association [1..1] to I_SamplingDefinitionRoot as _SamplingDefinitionRoot on head.parent_key = _SamplingDefinitionRoot.SamplingDefinitionUUID
  association [0..1] to I_User          as _CreatedByUser     on $projection.CreatedByUser = _CreatedByUser.UserID
  association [0..1] to I_User          as _LastChangedByUser on $projection.LastChangedByUser = _LastChangedByUser.UserID
  association [0..1] to I_UnitOfMeasure as _UnitText          on $projection.UnitOfMeasure = _UnitText.UnitOfMeasure

{
  key head.db_key        as SamplingHeaderUUID,
      head.parent_key    as SamplingDefinitionUUID,
      //admin fields

      cast( head.datetime_cr as ehfnd_datetime_cr preserving type ) as CreationDateTime,
      head.user_id_cr    as CreatedByUser,
      _CreatedByUser,
      cast( head.datetime_ch as ehfnd_datetime_ch preserving type ) as LastChangeDateTime,
      head.user_id_ch    as LastChangedByUser,
      _LastChangedByUser,

      head.title         as SamplingHeaderTitle,
      head.chem_property as SamplingChemicalProperty,
      head.analyte_type  as SamplingAnalyteType,
      head.analyte_key   as SamplingAnalyteUUID,
      head.id            as EHSSamplingHeaderID,
      _SamplingDefinitionRoot.SamplingDefMigrationSource,
      @Semantics.unitOfMeasure
      @ObjectModel.foreignKey.association: '_UnitText'
      cast( head.unit as ehfnd_unit_code_nce preserving type ) as UnitOfMeasure,
      _UnitText
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_SAMPLINGDEFINITIONROOT",
"EHENVD_SDEF_HEAD"
],
"ASSOCIATED":
[
"I_SAMPLINGDEFINITIONROOT",
"I_UNITOFMEASURE",
"I_USER"
],
"BASE":
[],
"ANNO_REF":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/