I_SamplingHeader
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)
| Source | Alias | Join Type |
|---|---|---|
| ehenvd_sdef_head | head | from |
Associations (4)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [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)
| Name | Value | Level | Field |
|---|---|---|---|
| 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)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| 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]
;
Learn More
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- CDS View Annotations — A Complete Guide
- What Is a CDS View in SAP S/4HANA?
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA
- BSEG to ACDOCA: The Universal Journal Migration
- Business Partner Migration: KNA1/LFA1 to BUT000
- Material Document Migration: MSEG/MKPF to MATDOC
- How to Find the Right CDS View for an SAP Table
- BW Extractor to CDS View Migration Guide
- S/4HANA CDS View Deprecation: What You Need to Know
- ABAP CDS View Tutorial — From Basics to Real-World Examples
- RAP and CDS Views — Building Transactional Apps in SAP S/4HANA
- Sales Document Status Migration: VBUP/VBUK Removal in S/4HANA
- CO Tables in S/4HANA: COEP, COBK, COSS, COSP to ACDOCA