I_SamplingHeader

DDL: I_SAMPLINGHEADER SQL: ISDEFHEAD Type: view BASIC

Sampling Definition - Header

I_SamplingHeader is a Basic CDS View that provides data about "Sampling Definition - Header" in SAP S/4HANA. It reads from 1 data source (ehenvd_sdef_head) and exposes 16 fields with key field SamplingHeaderUUID. It has 4 associations to related views.

Data Sources (1)

SourceAliasJoin Type
ehenvd_sdef_head head from

Associations (4)

CardinalityTargetAliasCondition
[1..1] I_SamplingDefinitionRoot _SamplingDefinitionRoot head.parent_key = _SamplingDefinitionRoot.SamplingDefinitionUUID
[0..1] I_User _CreatedByUser $projection.CreatedByUser = _CreatedByUser.UserID
[0..1] I_User _LastChangedByUser $projection.LastChangedByUser = _LastChangedByUser.UserID
[0..1] I_UnitOfMeasure _UnitText $projection.UnitOfMeasure = _UnitText.UnitOfMeasure

Annotations (8)

NameValueLevelField
AbapCatalog.sqlViewName ISDEFHEAD view
VDM.viewType #BASIC view
EndUserText.label Sampling Definition - Header view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.dataClass #MASTER view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #M view
AccessControl.authorizationCheck #NOT_REQUIRED view

Fields (16)

KeyFieldSource TableSource FieldDescription
KEY SamplingHeaderUUID ehenvd_sdef_head db_key UUID
SamplingDefinitionUUID ehenvd_sdef_head parent_key UUID
CreationDateTime
CreatedByUser ehenvd_sdef_head user_id_cr Created By
_CreatedByUser _CreatedByUser
LastChangeDateTime
LastChangedByUser ehenvd_sdef_head user_id_ch Changed By
_LastChangedByUser _LastChangedByUser
SamplingHeaderTitle ehenvd_sdef_head title View Title
SamplingChemicalProperty ehenvd_sdef_head chem_property Chem. Property
SamplingAnalyteType ehenvd_sdef_head analyte_type Subject Type
SamplingAnalyteUUID ehenvd_sdef_head analyte_key Subject
EHSSamplingHeaderID ehenvd_sdef_head id WorklistID
SamplingDefMigrationSource _SamplingDefinitionRoot SamplingDefMigrationSource
UnitOfMeasure
_UnitText _UnitText

Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.

-- Derived SQL interpretation of CDS view I_SamplingHeader.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.
-- SQL view name: ISDEFHEAD

CREATE VIEW I_SamplingHeader AS
SELECT
  head.db_key AS SamplingHeaderUUID,
  head.parent_key AS SamplingDefinitionUUID,
  cast( head.datetime_cr as ehfnd_datetime_cr preserving type ) AS CreationDateTime,
  head.user_id_cr AS CreatedByUser,
  cast( head.datetime_ch as ehfnd_datetime_ch preserving type ) AS LastChangeDateTime,
  head.user_id_ch AS 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 AS SamplingDefMigrationSource,
  cast( head.unit as ehfnd_unit_code_nce preserving type ) AS UnitOfMeasure
FROM ehenvd_sdef_head AS head
LEFT OUTER JOIN I_SamplingDefinitionRoot AS _SamplingDefinitionRoot ON head.parent_key = _SamplingDefinitionRoot.SamplingDefinitionUUID  -- association [1..1]
LEFT OUTER JOIN I_User AS _CreatedByUser ON CreatedByUser = _CreatedByUser.UserID  -- association [0..1]
LEFT OUTER JOIN I_User AS _LastChangedByUser ON LastChangedByUser = _LastChangedByUser.UserID  -- association [0..1]
LEFT OUTER JOIN I_UnitOfMeasure AS _UnitText ON UnitOfMeasure = _UnitText.UnitOfMeasure  -- association [0..1]
;