I_CurrentEHSParentLocationID

DDL: I_CURRENTEHSPARENTLOCATIONID SQL: ILOCANDPARID Type: view COMPOSITE

Current EHS Location and Parent ID

I_CurrentEHSParentLocationID (Composite)

Package: Explore, extend and adapt the SAP S/4HANA Cloud Private Edition with built-in and side-by-side extension capabilities.

Cross Applications

I_CurrentEHSParentLocationID is a Composite CDS View that provides data about "Current EHS Location and Parent ID" in SAP S/4HANA. It reads from 2 data sources (I_CurrentEHSLocationPath, I_SAPClient) and exposes 4 fields with key fields EHSLocationUUID, EHSSuperiorLocationUUID, EHSSuperiorLocationUUID. It has 2 associations to related views.

SAP Help Documentation

CategoryCDS Views for Environment, Health, and Safety
StatusReleased
Purpose
This CDS view retrieves the location ID of the current or parent location. This CDS view provides the data to answer the following business questions: Which are the location IDs in my location hierarchy? To help you decide which CDS view to use for your purposes, SAP has introduced the annotation ObjectModel.supportedCapabilities that indicates the most appropriate use cases for each CDS view. To find out what use cases are best supported by this CDS view, access the entry of the CDS view in the View Browser app and find the values for this annotation under the Annotation tab. For more information, see Supported Capabilities for CDS Views .

Prerequisites
Authorizations No special authorization is required to use this CSD View.

Structure
Fields used for filtering The main filters are as follows: Location ID ( EHSLocationID ) used to filter the records by ID.

View on SAP Help Portal →

SAP API Hub

StateC1
Line of BusinessCross Applications
Application ComponentEHS-SUS-FND-EHS
CapabilitiesData Source in SQL Select
PackageCross Applications for SAP S/4HANA Cloud Private Edition
Description <p>This CDS view retrieves the location ID of the current or parent location.</p> This CDS view provides the data to answer the following business questions:<ul> <li><p>Which are the location IDs in my location hierarchy?</p></li> </ul> <p>To help you decide which CDS view to use for your purposes, SAP has introduced the annotation ObjectModel.supportedCapabilities that indicates the most appropriate use cases for each CDS view. To find out what use cases are best supported by this CDS view, access the entry of the CDS view in the View Browser app and find the values for this annotation under the Annotation tab. For more information, see Supported Capabilities for CDS Views.</p>

Documentation

Data Sources (2)

SourceAliasJoin Type
I_CurrentEHSLocationPath I_CurrentEHSLocationPath from
I_SAPClient I_SAPClient union

Associations (2)

CardinalityTargetAliasCondition
[0..1] I_EHSLocationRoot _EHSLocationParentRoot $projection.EHSSuperiorLocationUUID = _EHSLocationParentRoot.EHSLocationUUID
[1..1] I_EHSLocationRoot _EHSLocationRoot $projection.EHSLocationUUID = _EHSLocationRoot.EHSLocationUUID

Annotations (11)

NameValueLevelField
EndUserText.label Current EHS Location and Parent ID view
VDM.viewType #COMPOSITE view
AccessControl.authorizationCheck #NOT_REQUIRED view
AbapCatalog.sqlViewName ILOCANDPARID view
AbapCatalog.compiler.compareFilter true view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #M view
ObjectModel.usageType.dataClass #MASTER view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.modelingPattern #NONE view

Fields (4)

KeyFieldSource TableSource FieldDescription
KEY EHSLocationUUID EHSLocationUUID Location
KEY EHSSuperiorLocationUUID EHSSuperiorLocationUUID Location
KEY EHSSuperiorLocationUUID Location
EHSLocationID Location ID

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_CurrentEHSParentLocationID.
-- 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: ILOCANDPARID

CREATE VIEW I_CurrentEHSParentLocationID AS
SELECT
  EHSLocationUUID,
  EHSSuperiorLocationUUID,
  '' AS EHSLocationID
FROM I_CurrentEHSLocationPath
LEFT OUTER JOIN I_EHSLocationRoot AS _EHSLocationParentRoot ON EHSSuperiorLocationUUID = _EHSLocationParentRoot.EHSLocationUUID  -- association [0..1]
LEFT OUTER JOIN I_EHSLocationRoot AS _EHSLocationRoot ON EHSLocationUUID = _EHSLocationRoot.EHSLocationUUID  -- association [1..1]
-- UNION with additional select branch(es): I_SAPClient
;