I_CalcDefResultHeader

DDL: I_CALCDEFRESULTHEADER SQL: ICDEFRESH Type: view BASIC

Calculation Definition - Result Header

I_CalcDefResultHeader is a Basic CDS View that provides data about "Calculation Definition - Result Header" in SAP S/4HANA. It reads from 1 data source (ehenvd_cdef_resh) and exposes 22 fields with key field CalculationResultHeaderUUID. It has 6 associations to related views.

Data Sources (1)

SourceAliasJoin Type
ehenvd_cdef_resh cdef_resh from

Associations (6)

CardinalityTargetAliasCondition
[1..1] I_EHSCalculationDefinitionRoot _EHSCalculationDefinitionRoot _EHSCalculationDefinitionRoot.CalculationRootUUID = cdef_resh.parent_key
[0..1] I_User _CreatedByUser $projection.CreatedByUser = _CreatedByUser.UserID
[0..1] I_User _LastChangedByUser $projection.LastChangedByUser = _LastChangedByUser.UserID
[0..1] I_UnitOfMeasure _UnitText $projection.UnitOfMeasureName = _UnitText.UnitOfMeasure
[1..1] I_EHSLocationRevision _EHSLocation $projection.EHSLocationUUID = _EHSLocation.EHSLocationUUID and( _EHSLocation.RevisionStartDate <= $session.system_date and _EHSLocation.RevisionEndDate >= $session.system_date )
[0..1] I_EHSDataPeriod _EHSDataPeriod $projection.DataUsagePeriodicity = _EHSDataPeriod.EHSDataPeriod

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName ICDEFRESH view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
VDM.viewType #BASIC view
EndUserText.label Calculation Definition - Result 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 (22)

KeyFieldSource TableSource FieldDescription
KEY CalculationResultHeaderUUID ehenvd_cdef_resh db_key UUID
CalculationRootUUID ehenvd_cdef_resh parent_key UUID
CreationDateTime ehenvd_cdef_resh datetime_cr Created On/At
CreatedByUser ehenvd_cdef_resh user_id_cr Created By
_CreatedByUser _CreatedByUser
LastChangeDateTime ehenvd_cdef_resh datetime_ch Changed On/At
LastChangedByUser ehenvd_cdef_resh user_id_ch Changed By
_LastChangedByUser _LastChangedByUser
CalculationResultHeaderID id WorklistID
CalculationResultHeaderName ehenvd_cdef_resh name Zone name
EHSCalculationSetupName _EHSCalculationDefinitionRoot EHSCalculationSetupName
CalculationResultHeaderTitle title View Title
DataUsagePeriodicity
EHSSubjectType subject_type_code Subject Type
EHSSubjectUUID subject_root_key_ref Subject Ref Key
EHSCalcMigrationSource _EHSCalculationDefinitionRoot EHSCalcMigrationSource
EHSLocationUUID
_EHSLocation _EHSLocation
UnitOfMeasureName unit UoM
_UnitText _UnitText
_EHSDataPeriod _EHSDataPeriod
_EHSCalculationDefinitionRoot _EHSCalculationDefinitionRoot

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_CalcDefResultHeader.
-- 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: ICDEFRESH

CREATE VIEW I_CalcDefResultHeader AS
SELECT
  cdef_resh.db_key AS CalculationResultHeaderUUID,
  cdef_resh.parent_key AS CalculationRootUUID,
  cdef_resh.datetime_cr AS CreationDateTime,
  cdef_resh.user_id_cr AS CreatedByUser,
  cdef_resh.datetime_ch AS LastChangeDateTime,
  cdef_resh.user_id_ch AS LastChangedByUser,
  id AS CalculationResultHeaderID,
  cdef_resh.name AS CalculationResultHeaderName,
  _EHSCalculationDefinitionRoot.EHSCalculationSetupName AS EHSCalculationSetupName,
  title AS CalculationResultHeaderTitle,
  cast ( cdef_resh.usage_period as ehfnd_calc_usage_period_nc preserving type ) AS DataUsagePeriodicity,
  subject_type_code AS EHSSubjectType,
  subject_root_key_ref AS EHSSubjectUUID,
  _EHSCalculationDefinitionRoot.EHSCalcMigrationSource AS EHSCalcMigrationSource,
  cast( cdef_resh.loc_root_key_ref as ehfnd_location_uuid_ref preserving type ) AS EHSLocationUUID,
  unit AS UnitOfMeasureName
FROM ehenvd_cdef_resh AS cdef_resh
LEFT OUTER JOIN I_EHSCalculationDefinitionRoot AS _EHSCalculationDefinitionRoot ON _EHSCalculationDefinitionRoot.CalculationRootUUID = cdef_resh.parent_key  -- 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 UnitOfMeasureName = _UnitText.UnitOfMeasure  -- association [0..1]
LEFT OUTER JOIN I_EHSLocationRevision AS _EHSLocation ON EHSLocationUUID = _EHSLocation.EHSLocationUUID AND( _EHSLocation.RevisionStartDate <= $session.system_date AND _EHSLocation.RevisionEndDate >= $session.system_date )  -- association [1..1]
LEFT OUTER JOIN I_EHSDataPeriod AS _EHSDataPeriod ON DataUsagePeriodicity = _EHSDataPeriod.EHSDataPeriod  -- association [0..1]
;