I_EHSTaskInstanceCube

DDL: I_EHSTASKINSTANCECUBE SQL: IEHSTASKINSTCUBE Type: view COMPOSITE

EHS Task Instance - Cube

I_EHSTaskInstanceCube (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_EHSTaskInstanceCube is a Composite CDS View (Cube) that provides data about "EHS Task Instance - Cube" in SAP S/4HANA. It reads from 2 data sources (I_EHSTaskDefinition, I_EHSTaskPlannedInstance) and exposes 75 fields with key fields EHSPlannedTaskUUID, EHSMainLocationID, EHSLocClassifierID, TaskFollowRefObjUUID. It has 13 associations to related views.

SAP Help Documentation

CategoryEHS Task Instance – Query
Data CategoryCube
StatusStatus of task workflow
Purpose
This CDS view provides the data to answer the following business questions: What data is available for tasks and related objects, such as location, compliance requirement, scenario, and others? 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 One of the following business catalogs needs to be assigned to a user to be able to use this CDS view: Incident Management - Monitor Tasks ( SAP_EHS_BC_IM_TASK_MON_PC ) Incident Management - Manage Incidents ( SAP_EHS_BC_IM_INC_MGMT_PC ) Environment Management - Manage Compliance Requirements ( SAP_EHS_BC_ENV_MNG_CMPLREQ_PC ) Environment Management - Manage Compliance Scenario ( SAP_EHS_BC_ENV_MNG_CSCEN_PC ) Users who want to use this CDS view must have a role that includes authorization based on at least one of the business catalogs listed above.

Structure
Parameters The parameters of the CDS view are as follows: P_Date : This parameter is used to calculate the relevant revision of locations and the location hierarchy, compliance requirements, compliance scenarios. By default, it is set to Today . P_Language : This parameter is used to used to specify the language in which translatable texts are shown. By default, it is set to the logon language of the user. Fields Used for Filtering The main filters are as follows: EHSTaskDueDate : This field is used to filter by the due date of the task instance. EHSTaskStartDate : This field is used to filter by the start date of the task instance. EHSTaskInstceCompletionDate : This field is used to filter by the completion date of the task instance. EHSPlannedTaskID : This field is used to filter by the identifier of the task instance. EHSLocClassifierID : This field is used to filter by the location classifiers assigned to the location. EHSMainLocationID : This field is used to filter by the identifier of the main location. EHSTaskIsRecurrent : This field is used to filter by the availability of recurrence for the task. EHSTaskHasWorkflow : This field is used to filter by the availability of a workflow for the task. EHSTaskHasDeviation : This field is used to filter by the availability of a deviation associated with the task. EHSTaskStatus : This field is used to filter by the status of the task instance. WorkflowTaskStatus : This field is used to filter by the status of the workflow of the task instance. EHSTaskDefinitionStatus : This field is used to filter by the status of the task definition. EHSTaskOwnerUser : This field is used to filter by the user who is the owner of the task instance. EHSTaskAssigneeUser : This field is used to filter by the user who is the assignee for the task instance. EHSTaskApprovingUser : This field is used to filter by the user who is the approver of the task instance. EHSTaskPriority : This field is used to filter by the priority of the task. EHSTaskDefinitionType : This field is used to filter by the type of the task. TaskFollowCategoryCode : This field is used to filter by the triggering category of the task in the context of a deviation. ComplianceRequirement : This field is used to filter by the compliance requirement that is associated with the task. CmplRqVersName : This field is used to filter by the compliance requirement version that is associated with the task. CmplRqVersParagraphID : This field is used to filter by the identifier of the compliance requirement paragraph that is associated with the task. CmplRqVersParagraphName : This field is used to filter by the name of the compliance requirement paragraph that is associated with the task. EHSComplianceScenarioRootUUID : This f

View on SAP Help Portal →

SAP API Hub

StateC1
Line of BusinessCross Applications
Application ComponentEHS-SUS-FND-EHS
CapabilitiesData Provider for Analytical Queries
PackageCross Applications for SAP S/4HANA Cloud Private Edition
Description This CDS view provides the data to answer the following business questions:<ul> <li><p>What data is available for tasks and related objects, such as location, compliance requirement, scenario, and others?</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_EHSTaskDefinition _EHSTaskDefinition inner
I_EHSTaskPlannedInstance EHSTaskPlannedInstance from

Parameters (2)

NameTypeDefault
P_Date sydatum
P_Language sylangu

Associations (13)

CardinalityTargetAliasCondition
[0..1] I_EHSLocationRoot _EHSLocationRoot _EHSTaskDefinition.EHSLocationUUID = _EHSLocationRoot.EHSLocationUUID
[0..*] I_EHSLocationForFiltering _EHSLocationForFiltering _EHSTaskDefinition.EHSLocationUUID = _EHSLocationForFiltering.EHSLocationUUID
[0..*] I_EHSLocationRevision _EHSLocation _EHSTaskDefinition.EHSLocationUUID = _EHSLocation.EHSLocationUUID
[0..*] I_DvtnIncdntTriggeringTask _EHSDeviationTriggeringTask _EHSTaskFollowUp.TaskFollowRefObjUUID = _EHSDeviationTriggeringTask.IncidentRefUUID and EHSTaskPlannedInstance.EHSPlannedTaskUUID = _EHSDeviationTriggeringTask.EHSPlannedTaskUUID
[0..*] I_EHSTaskTriggerCategoryText _EHSTaskTriggerCategoryText $projection.TaskFollowCategoryCode = _EHSTaskTriggerCategoryText.TaskFollowCategoryCode
[1..1] I_EHSCombinedTaskDefAndInstce _EHSCombinedTaskDefAndInstce EHSTaskPlannedInstance.EHSPlannedTaskUUID = _EHSCombinedTaskDefAndInstce.EHSPlannedTaskUUID
[0..*] I_CmplRqVersEnhanced _EHSCmplReq _EHSTaskDefinition.EHSTaskHostObjectInstanceUUID = _EHSCmplReq.CmplRqUUID
[0..*] I_CmplRqVersStructure _EHSCmplParagraph _EHSTaskDefReference.EHSTaskRelatedObjInstanceUUID = _EHSCmplParagraph.CmplRqUUID
[0..*] I_EHSCmplncScenRoot _EHSCmplScen _EHSTaskDefinition.EHSTaskHostObjectInstanceUUID = _EHSCmplScen.EHSCmplncScenOrignRootUUID
[0..*] I_EHSLocClassifier _EHSLocClassifier _EHSTaskDefinition.EHSLocationUUID = _EHSLocClassifier.EHSLocationUUID
[0..1] P_EHSLOCCLASSIFIERS _EHSLocClassifiers $projection.EHSLocationUUID = _EHSLocClassifiers.EHSLocationUUID
[0..1] I_EHSRiskControl _EHSRiskControl $projection.EHSTaskHostObjectInstanceUUID = _EHSRiskControl.EHSControlInstanceUUID
[0..1] I_EHSRiskAssessment _EHSRiskAssessment $projection.EHSTaskHostObjectInstanceUUID = _EHSRiskAssessment.EHSRiskAssessmentUUID

Annotations (16)

NameValueLevelField
AbapCatalog.sqlViewName IEHSTASKINSTCUBE view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #MANDATORY view
AccessControl.personalData.blocking #BLOCKED_DATA_EXCLUDED view
EndUserText.label EHS Task Instance - Cube view
Analytics.dataCategory #CUBE view
Analytics.internalName #LOCAL view
VDM.viewType #COMPOSITE view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.modelingPattern #ANALYTICAL_CUBE view
Metadata.ignorePropagatedAnnotations true view
Metadata.allowExtensions true view

Fields (75)

KeyFieldSource TableSource FieldDescription
KEY EHSPlannedTaskUUID I_EHSTaskPlannedInstance EHSPlannedTaskUUID Task Instance Key
KEY EHSMainLocationID Main Location ID
KEY EHSLocClassifierID Location Classifier ID
KEY TaskFollowRefObjUUID _EHSDeviationTriggeringTask TaskFollowRefObjUUID UUID of Follow-Up Object of Task
EHSPlannedTaskID I_EHSTaskPlannedInstance EHSPlannedTaskID Task Instance ID
EHSTaskDueDate I_EHSTaskPlannedInstance EHSTaskDueDate Due Date of a Planned Task
EHSTaskStartDate I_EHSTaskPlannedInstance EHSTaskStartDate Start Date of a Planned Task
EHSTaskInstceCompletionDate I_EHSTaskPlannedInstance EHSTaskInstceCompletionDate Completion Date of a Planned Task
EHSTaskOwnerBP I_EHSTaskPlannedInstance EHSTaskOwnerBP Task Owner
EHSTaskOwnerUserName User Description
EHSTaskDefinitionUUID I_EHSTaskDefinition EHSTaskDefinitionUUID Task Definition Key
EHSTaskTitle I_EHSTaskDefinition EHSTaskTitle Task Definition Title
EHSTaskPriority I_EHSTaskDefinition EHSTaskPriority Task Definition - Priority
EHSTaskPriorityName Task Definition Priority Name
EHSTaskDefinitionStatus Task Definition Status
EHSTaskAssignedUser I_EHSTaskPlannedInstance EHSTaskAssignedBP Task Assignee
EHSTaskAssignedUserName Task Assignee Name
EHSTaskApprovingUser I_EHSTaskPlannedInstance EHSTaskApprovingBP Task Approver
EHSTaskApprovingUserName Task Approver Name
EHSSemanticObject Semantic Object
EHSLocationUUID I_EHSTaskDefinition EHSLocationUUID Location Key
EHSTaskDefinitionType I_EHSTaskDefinition EHSTaskWorkflowEvent Task Definition Type
EHSTaskDefinitionTypeName Description of the Task Type
EHSTaskStatus Status of Task Instance (Without Conversion Exit)
WorkflowTaskStatus _EHSCombinedTaskDefAndInstce WorkflowTaskStatus Processing Status of a Work Item
EHSTaskRelatedObjInstanceUUID _EHSTaskDefReference EHSTaskRelatedObjInstanceUUID Task Host Object Instance Identifier
EHSLocationName Location Name
EHSLocationType Location Type
EHSLocationTypeText Location Type Description
Country Country/Region
CountryName Country/Region Name
Region Region
RegionName Region Name
Plant Plant ID
PlantName Plant Name
OrganizationalUnit Organizational Unit ID
OrganizationalUnitName Short Text of Organizational Unit
ControllingArea Controlling Area
ControllingAreaName Controlling Area Name
CostCenter Cost Center
CostCenterName Cost Center Name
CompanyCode Company Code
CompanyCodeName Name of Company Code or Company
EHSLocationStatus Location Status
EHSLocationAuthorizationGroup Location Authorization Group
BusinessArea Business Area
EHSLocationID _EHSLocationRoot EHSLocationID Location ID
EHSLocClassifiersText List of Classifiers (Comma Separated) - short
TaskFollowCategoryCode _EHSTaskFollowUp TaskFollowCategoryCode Category of Triggering Task
EHSTriggerCategoryDesc Category Name of Triggering Task
CmplRqVersUUID Compliance Requirement UUID
ComplianceRequirement Compliance Requirement ID
CmplRqVersName Compliance Requirement Version Name
CmplRqUUID Compliance Requirement
CmplRqType Compliance Requirement Type
CmplRqTypeName Compliance Requirement Type Name
CmplRqVersParagraphID _EHSCmplParagraph CmplRqVersParagraphID Compliance Requirement Paragraph ID
CmplRqVersParagraphName _EHSCmplParagraph CmplRqVersParagraphName Compliance Requirement Paragraph Name
EHSComplianceScenarioRootUUID Compliance Scenario Key
EHSComplianceScenarioName Common Data Element for Translation
DeviationUUID _EHSDeviationTriggeringTask DeviationUUID Deviation Incident Key
IncidentRefUUID _EHSDeviationTriggeringTask IncidentRefUUID Incident Key
IncidentID _EHSDeviationTriggeringTask IncidentID Incident ID
EHSTaskHostObjectInstanceUUID I_EHSTaskDefinition EHSTaskHostObjectInstanceUUID Task Host Object Instance Identifier
EHSTaskHostObjectInstance I_EHSTaskDefinition EHSTaskHostObjectInstance Instance Ident. in BOR Compat. Persistent Object References
IncdntTskRefAccessRestriction Restricted Access to Person Information
NumberOfRecords 0 Number of Records
_EHSTaskOwnerUser _EHSTaskOwnerUser
_EHSTaskAssigneeUser _EHSTaskAssigneeUser
_EHSTaskApprovingUser _EHSTaskApprovingUser
_IncidentAuthorizationFields I_EHSTaskDefinition _IncidentAuthorizationFields
_EHSRskAssessmentAuthznFields I_EHSTaskDefinition _EHSRskAssessmentAuthznFields
_EHSCtrlImplmtnAuthznFields I_EHSTaskDefinition _EHSCtrlImplmtnAuthznFields
_EHSCmplncScenAuthznFields I_EHSTaskDefinition _EHSCmplncScenAuthznFields
_CmplncRqmtAuthznFields I_EHSTaskDefinition _CmplncRqmtAuthznFields

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_EHSTaskInstanceCube.
-- 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: IEHSTASKINSTCUBE
-- Parameters: P_Date : sydatum, P_Language : sylangu

CREATE VIEW I_EHSTaskInstanceCube AS
SELECT
  EHSTaskPlannedInstance.EHSPlannedTaskUUID AS EHSPlannedTaskUUID,
  _EHSLocationForFiltering(P_Date: $parameters.P_Date).EHSParentLocationID AS EHSMainLocationID,
  _EHSLocClassifier._EHSClassifierRoot.EHSLocClassifierID AS EHSLocClassifierID,
  _EHSDeviationTriggeringTask.TaskFollowRefObjUUID AS TaskFollowRefObjUUID,
  EHSTaskPlannedInstance.EHSPlannedTaskID AS EHSPlannedTaskID,
  EHSTaskPlannedInstance.EHSTaskDueDate AS EHSTaskDueDate,
  EHSTaskPlannedInstance.EHSTaskStartDate AS EHSTaskStartDate,
  EHSTaskPlannedInstance.EHSTaskInstceCompletionDate AS EHSTaskInstceCompletionDate,
  EHSTaskPlannedInstance.EHSTaskOwnerBP AS EHSTaskOwnerBP,
  EHSTaskPlannedInstance._EHSTaskOwnerUser.PersonFullName AS EHSTaskOwnerUserName,
  _EHSTaskDefinition.EHSTaskDefinitionUUID AS EHSTaskDefinitionUUID,
  _EHSTaskDefinition.EHSTaskTitle AS EHSTaskTitle,
  _EHSTaskDefinition.EHSTaskPriority AS EHSTaskPriority,
  EHSTaskPlannedInstance._EHSTaskDefinition._EHSTaskPriority.EHSTaskPriorityName AS EHSTaskPriorityName,
  cast( _EHSTaskDefinition.EHSTaskDefinitionStatus as ehfnd_tdef_status_code ) AS EHSTaskDefinitionStatus,
  EHSTaskPlannedInstance.EHSTaskAssignedBP AS EHSTaskAssignedUser,
  EHSTaskPlannedInstance._EHSTaskAssigneeUser.PersonFullName AS EHSTaskAssignedUserName,
  EHSTaskPlannedInstance.EHSTaskApprovingBP AS EHSTaskApprovingUser,
  _EHSTaskPlannedInstance._EHSTaskApprovingUser.PersonFullName AS EHSTaskApprovingUserName,
  EHSTaskPlannedInstance._EHSTaskDefinition._EHSTaskAdapterClass.EHSSemanticObject AS EHSSemanticObject,
  _EHSTaskDefinition.EHSLocationUUID AS EHSLocationUUID,
  _EHSTaskDefinition.EHSTaskWorkflowEvent AS EHSTaskDefinitionType,
  EHSTaskPlannedInstance._EHSTaskDefinition._EHSTaskDefinitionType._EHSTaskDefinitionTypeText[1: Language = $parameters.P_Language].EHSTaskDefinitionTypeName AS EHSTaskDefinitionTypeName,
  cast( _EHSCombinedTaskDefAndInstce.EHSTaskStatusValueForSorting as ehfnd_task_sorting_status_nc preserving type ) AS EHSTaskStatus,
  _EHSCombinedTaskDefAndInstce.WorkflowTaskStatus AS WorkflowTaskStatus,
  _EHSTaskDefReference.EHSTaskRelatedObjInstanceUUID AS EHSTaskRelatedObjInstanceUUID,
  _EHSLocation[1:RevisionStartDate <= $parameters.P_Date and RevisionEndDate >= $parameters.P_Date ]._EHSLocationRevisionName[1: Language = $parameters.P_Language].EHSLocationName AS EHSLocationName,
  _EHSLocation[1:RevisionStartDate <= $parameters.P_Date and RevisionEndDate >= $parameters.P_Date ].EHSLocationType AS EHSLocationType,
  _EHSLocation[1:RevisionStartDate <= $parameters.P_Date and RevisionEndDate >= $parameters.P_Date ]._EHSLocationType._Text[1: Language = $parameters.P_Language].EHSLocationTypeText AS EHSLocationTypeText,
  _EHSLocation[1:RevisionStartDate <= $parameters.P_Date and RevisionEndDate >= $parameters.P_Date ].Country AS Country,
  _EHSLocation[1:RevisionStartDate <= $parameters.P_Date and RevisionEndDate >= $parameters.P_Date ]._Country._Text[1: Language = $parameters.P_Language].CountryName AS CountryName,
  _EHSLocation[1:RevisionStartDate <= $parameters.P_Date and RevisionEndDate >= $parameters.P_Date ].Region AS Region,
  _EHSLocation[1:RevisionStartDate <= $parameters.P_Date and RevisionEndDate >= $parameters.P_Date ]._Region._RegionText[1: Language = $parameters.P_Language].RegionName AS RegionName,
  _EHSLocation[1:RevisionStartDate <= $parameters.P_Date and RevisionEndDate >= $parameters.P_Date ].Plant AS Plant,
  _EHSLocation[1:RevisionStartDate <= $parameters.P_Date and RevisionEndDate >= $parameters.P_Date ]._Plant.PlantName AS PlantName,
  cast ( _EHSLocation[1:RevisionStartDate <= $parameters.P_Date and RevisionEndDate >= $parameters.P_Date ].OrganizationalUnit as ehfnd_org_unit_id_nc preserving type ) AS OrganizationalUnit,
  _EHSLocation[1:RevisionStartDate <= $parameters.P_Date and RevisionEndDate >= $parameters.P_Date ]._OrganizationalUnit._OrgUnitText[1: Language = $parameters.P_Language].OrganizationalUnitName AS OrganizationalUnitName,
  _EHSLocation[1:RevisionStartDate <= $parameters.P_Date and RevisionEndDate >= $parameters.P_Date ].ControllingArea AS ControllingArea,
  _EHSLocation[1:RevisionStartDate <= $parameters.P_Date and RevisionEndDate >= $parameters.P_Date ]._ControllingArea.ControllingAreaName AS ControllingAreaName,
  _EHSLocation[1:RevisionStartDate <= $parameters.P_Date and RevisionEndDate >= $parameters.P_Date ].CostCenter AS CostCenter,
  _EHSLocation[1:RevisionStartDate <= $parameters.P_Date and RevisionEndDate >= $parameters.P_Date ]._CostCenter[1: ValidityStartDate <= $parameters.P_Date and ValidityEndDate >= $parameters.P_Date]._Text[1: Language = $parameters.P_Language].CostCenterName AS CostCenterName,
  _EHSLocation[1:RevisionStartDate <= $parameters.P_Date and RevisionEndDate >= $parameters.P_Date ].CompanyCode AS CompanyCode,
  _EHSLocation[1:RevisionStartDate <= $parameters.P_Date and RevisionEndDate >= $parameters.P_Date ]._CompanyCode.CompanyCodeName AS CompanyCodeName,
  _EHSLocation[1:RevisionStartDate <= $parameters.P_Date and RevisionEndDate >= $parameters.P_Date ].EHSLocationStatus AS EHSLocationStatus,
  cast( _EHSLocation[1:RevisionStartDate <= $parameters.P_Date and RevisionEndDate >= $parameters.P_Date ].EHSLocationAuthorizationGroup as ehfnd_loc_auth_group_nc preserving type ) AS EHSLocationAuthorizationGroup,
  _EHSLocation[1:RevisionStartDate <= $parameters.P_Date and RevisionEndDate >= $parameters.P_Date ].BusinessArea AS BusinessArea,
  _EHSLocationRoot.EHSLocationID AS EHSLocationID,
  _EHSLocClassifiers(P_Mandt: $session.client, P_Langu: $parameters.P_Language).Classifiers AS EHSLocClassifiersText,
  _EHSTaskFollowUp.TaskFollowCategoryCode AS TaskFollowCategoryCode,
  _EHSTaskTriggerCategoryText[1: Language = $parameters.P_Language].EHSTriggerCategoryDesc AS EHSTriggerCategoryDesc,
  _EHSCmplReq[1:EffectiveDate <= $parameters.P_Date and CmplRqVersValidToDate >= $parameters.P_Date ].CmplRqVersUUID AS CmplRqVersUUID,
  _EHSCmplReq[1:EffectiveDate <= $parameters.P_Date and CmplRqVersValidToDate >= $parameters.P_Date ].ComplianceRequirement AS ComplianceRequirement,
  _EHSCmplReq[1:EffectiveDate <= $parameters.P_Date and CmplRqVersValidToDate >= $parameters.P_Date ]._CmplRqVersText[1: Language = $parameters.P_Language].CmplRqVersName AS CmplRqVersName,
  _EHSCmplReq[1:EffectiveDate <= $parameters.P_Date and CmplRqVersValidToDate >= $parameters.P_Date ].CmplRqUUID AS CmplRqUUID,
  _EHSCmplReq[1:EffectiveDate <= $parameters.P_Date and CmplRqVersValidToDate >= $parameters.P_Date ]._CmplncRqmtType.CmplRqType AS CmplRqType,
  _EHSCmplReq[1:EffectiveDate <= $parameters.P_Date and CmplRqVersValidToDate >= $parameters.P_Date ]._CmplncRqmtType._Text[1: Language = $parameters.P_Language].CmplRqTypeName AS CmplRqTypeName,
  _EHSCmplParagraph.CmplRqVersParagraphID AS CmplRqVersParagraphID,
  _EHSCmplParagraph.CmplRqVersParagraphName AS CmplRqVersParagraphName,
  _EHSCmplScen[1:RevisionStartDate <= $parameters.P_Date and RevisionEndDate >= $parameters.P_Date ].EHSComplianceScenarioRootUUID AS EHSComplianceScenarioRootUUID,
  _EHSCmplScen[1:RevisionStartDate <= $parameters.P_Date and RevisionEndDate >= $parameters.P_Date ]._EHSCmplncScenName[1: Language = $parameters.P_Language].EHSComplianceScenarioName AS EHSComplianceScenarioName,
  _EHSDeviationTriggeringTask.DeviationUUID AS DeviationUUID,
  _EHSDeviationTriggeringTask.IncidentRefUUID AS IncidentRefUUID,
  _EHSDeviationTriggeringTask.IncidentID AS IncidentID,
  _EHSTaskDefinition.EHSTaskHostObjectInstanceUUID AS EHSTaskHostObjectInstanceUUID,
  _EHSTaskDefinition.EHSTaskHostObjectInstance AS EHSTaskHostObjectInstance,
  _EHSTaskDefinition._IncidentTaskRefAccRestricted.IncidentHasAccessRestriction AS IncdntTskRefAccessRestriction,
  0 AS NumberOfRecords,
  _EHSTaskDefinition._IncidentAuthorizationFields AS _IncidentAuthorizationFields,
  _EHSTaskDefinition._EHSRskAssessmentAuthznFields AS _EHSRskAssessmentAuthznFields,
  _EHSTaskDefinition._EHSCtrlImplmtnAuthznFields AS _EHSCtrlImplmtnAuthznFields,
  _EHSTaskDefinition._EHSCmplncScenAuthznFields AS _EHSCmplncScenAuthznFields,
  _EHSTaskDefinition._CmplncRqmtAuthznFields AS _CmplncRqmtAuthznFields
FROM I_EHSTaskPlannedInstance AS EHSTaskPlannedInstance
INNER JOIN I_EHSTaskDefinition AS _EHSTaskDefinition ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_EHSLocationRoot AS _EHSLocationRoot ON _EHSTaskDefinition.EHSLocationUUID = _EHSLocationRoot.EHSLocationUUID  -- association [0..1]
LEFT OUTER JOIN I_EHSLocationForFiltering AS _EHSLocationForFiltering ON _EHSTaskDefinition.EHSLocationUUID = _EHSLocationForFiltering.EHSLocationUUID  -- association [0..*]
LEFT OUTER JOIN I_EHSLocationRevision AS _EHSLocation ON _EHSTaskDefinition.EHSLocationUUID = _EHSLocation.EHSLocationUUID  -- association [0..*]
LEFT OUTER JOIN I_DvtnIncdntTriggeringTask AS _EHSDeviationTriggeringTask ON _EHSTaskFollowUp.TaskFollowRefObjUUID = _EHSDeviationTriggeringTask.IncidentRefUUID AND EHSTaskPlannedInstance.EHSPlannedTaskUUID = _EHSDeviationTriggeringTask.EHSPlannedTaskUUID  -- association [0..*]
LEFT OUTER JOIN I_EHSTaskTriggerCategoryText AS _EHSTaskTriggerCategoryText ON TaskFollowCategoryCode = _EHSTaskTriggerCategoryText.TaskFollowCategoryCode  -- association [0..*]
LEFT OUTER JOIN I_EHSCombinedTaskDefAndInstce AS _EHSCombinedTaskDefAndInstce ON EHSTaskPlannedInstance.EHSPlannedTaskUUID = _EHSCombinedTaskDefAndInstce.EHSPlannedTaskUUID  -- association [1..1]
LEFT OUTER JOIN I_CmplRqVersEnhanced AS _EHSCmplReq ON _EHSTaskDefinition.EHSTaskHostObjectInstanceUUID = _EHSCmplReq.CmplRqUUID  -- association [0..*]
LEFT OUTER JOIN I_CmplRqVersStructure AS _EHSCmplParagraph ON _EHSTaskDefReference.EHSTaskRelatedObjInstanceUUID = _EHSCmplParagraph.CmplRqUUID  -- association [0..*]
LEFT OUTER JOIN I_EHSCmplncScenRoot AS _EHSCmplScen ON _EHSTaskDefinition.EHSTaskHostObjectInstanceUUID = _EHSCmplScen.EHSCmplncScenOrignRootUUID  -- association [0..*]
LEFT OUTER JOIN I_EHSLocClassifier AS _EHSLocClassifier ON _EHSTaskDefinition.EHSLocationUUID = _EHSLocClassifier.EHSLocationUUID  -- association [0..*]
LEFT OUTER JOIN P_EHSLOCCLASSIFIERS AS _EHSLocClassifiers ON EHSLocationUUID = _EHSLocClassifiers.EHSLocationUUID  -- association [0..1]
LEFT OUTER JOIN I_EHSRiskControl AS _EHSRiskControl ON EHSTaskHostObjectInstanceUUID = _EHSRiskControl.EHSControlInstanceUUID  -- association [0..1]
LEFT OUTER JOIN I_EHSRiskAssessment AS _EHSRiskAssessment ON EHSTaskHostObjectInstanceUUID = _EHSRiskAssessment.EHSRiskAssessmentUUID  -- association [0..1]
;