C_EHSTaskInstanceQuery

DDL: C_EHSTASKINSTANCEQUERY Type: view CONSUMPTION Package: EHFND_CNS_TASK_MANAGEMENT

EHS Task Instance - Query

C_EHSTaskInstanceQuery (Consumption)

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

Cross Applications

C_EHSTaskInstanceQuery is a Consumption CDS View that provides data about "EHS Task Instance - Query" in SAP S/4HANA. It reads from 1 data source (I_EHSTaskInstanceCube) and exposes 61 fields with key fields EHSPlannedTaskUUID, EHSMainLocationID, EHSLocClassifierID, TaskFollowRefObjUUID. Part of development package EHFND_CNS_TASK_MANAGEMENT.

SAP Help Documentation

CategoryCDS Views for Tasks
Data CategoryQuery
StatusStatus of task workflow
Corresponding DataSource2СCEHSTSKINSTQUERY
Purpose
This CDS view retrieves and counts the number of task instances. It allows filtering by task characteristics and by related objects, such as location, compliance scenario, incident, deviation incident and compliance requirement. 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
This query receives its data from CDS view EHS Task Instance - Cube ( I_EHSTaskInstanceCube ). This query can be used in the KPI Design app and the Create Reports app. 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 ) Incident Management - Manage Deviation Incidents ( SAP_EHS_BC_ENV_MNG_DEV_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. EHSLocClassifiersText : This field is used to filter by the concatenated name of the location classifier. 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 c

View on SAP Help Portal →

SAP API Hub

CategoryConsumption
StateC1
Line of BusinessCross Applications
Application ComponentEHS-SUS-FND-EHS
CapabilitiesAnalytical Query
Extensible (Key User)No
Extensible (Developer)No
Release State (Key User)Released
Release State (Developer)Not Released
PackageCross Applications for SAP S/4HANA Cloud Public Edition
Description <p>This CDS view retrieves and counts the number of task instances. It allows filtering by task characteristics and by related objects, such as location, compliance scenario, incident, deviation incident and compliance requirement.</p> 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 (1)

SourceAliasJoin Type
I_EHSTaskInstanceCube I_EHSTaskInstanceCube from

Parameters (2)

NameTypeDefault
P_Date sydatum
P_Language sylangu

Annotations (13)

NameValueLevelField
AbapCatalog.sqlViewName CEHSTSKINSTQUERY view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #PRIVILEGED_ONLY view
EndUserText.label EHS Task Instance - Query view
Analytics.query true view
VDM.viewType #CONSUMPTION view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.modelingPattern #ANALYTICAL_QUERY view
Metadata.ignorePropagatedAnnotations true view

Fields (61)

KeyFieldSource TableSource FieldDescription
KEY EHSPlannedTaskUUID EHSPlannedTaskUUID Planned Task UUID
KEY EHSMainLocationID EHSMainLocationID Location ID
KEY EHSLocClassifierID EHSLocClassifierID BCO ID
KEY TaskFollowRefObjUUID TaskFollowRefObjUUID UUID of Follow-Up Object of Task
EHSPlannedTaskID EHSPlannedTaskID Planned Task ID
EHSTaskDueDate EHSTaskDueDate Due Date of a Planned Task
EHSTaskStartDate EHSTaskStartDate Start Date of a Planned Task
EHSTaskInstceCompletionDate EHSTaskInstceCompletionDate Completion Date of a Planned Task
EHSTaskIsRecurrent EHSTaskIsRecurrent Recurrence
EHSTaskHasWorkflow EHSTaskHasWorkflow Workflow Exists
EHSTaskHasDeviation EHSTaskHasDeviation EHS Task has deviation
EHSTaskStatus EHSTaskStatus Status of Task Instance (Without Conversion Exit)
WorkflowTaskStatus WorkflowTaskStatus Processing Status of a Work Item
EHSTaskOwnerBP EHSTaskOwnerBP Owner
EHSTaskOwnerUserName EHSTaskOwnerUserName User Description
EHSTaskDefinitionUUID EHSTaskDefinitionUUID Task Definition
EHSTaskTitle EHSTaskTitle Task Title
EHSTaskPriority EHSTaskPriority Task Definition - Priority
EHSTaskPriorityName EHSTaskPriorityName Short Text for Fixed Values
EHSTaskDefinitionStatus EHSTaskDefinitionStatus Task Status
EHSTaskAssignedUser EHSTaskAssignedUser Assignee
EHSTaskAssignedUserName EHSTaskAssignedUserName User Description
EHSTaskApprovingUser EHSTaskApprovingUser Approver
EHSTaskApprovingUserName EHSTaskApprovingUserName User Description
EHSSemanticObject EHSSemanticObject Semantic Object
EHSTaskDefinitionType EHSTaskDefinitionType Task Type
EHSTaskDefinitionTypeName EHSTaskDefinitionTypeName Description of the Task Type
TaskFollowCategoryCode TaskFollowCategoryCode Follow Up Category
EHSTriggerCategoryDesc EHSTriggerCategoryDesc Description (Extra Short)
CmplRqVersUUID CmplRqVersUUID Compliance Requirement UUID
ComplianceRequirement ComplianceRequirement Compliance Requirement
CmplRqVersName CmplRqVersName Compliance Requirement Version Name
CmplRqVersParagraphID CmplRqVersParagraphID Compliance Requirement Paragraph ID
CmplRqVersParagraphName CmplRqVersParagraphName Paragraph Name
CmplRqType CmplRqType Compliance Requirement Type
CmplRqTypeName CmplRqTypeName Short Text for Fixed Values
EHSComplianceScenarioRootUUID EHSComplianceScenarioRootUUID NodeID
EHSComplianceScenarioName EHSComplianceScenarioName Common Data Element for Translation
DeviationUUID DeviationUUID NodeID
IncidentRefUUID IncidentRefUUID Incident Key
IncidentID IncidentID Incident ID
EHSLocationName EHSLocationName Location
EHSLocationType EHSLocationType Location Type
EHSLocationTypeText EHSLocationTypeText Location Type Name
Country Country Venue: Ctry/Reg
CountryName CountryName Country/Region Name
Region Region Venue Region
RegionName RegionName Description
Plant Plant Valuation Area
PlantName PlantName Plant Name
OrganizationalUnit OrganizationalUnit Organizational Unit ID
OrganizationalUnitName OrganizationalUnitName Short Text of Organizational Unit
ControllingArea ControllingArea Controlling Area
ControllingAreaName ControllingAreaName Controlling Area Name
CostCenter CostCenter Cost Center
CostCenterName CostCenterName Cost Center Name
CompanyCode CompanyCode Receiver Company Code
CompanyCodeName CompanyCodeName Name of Company Code or Company
EHSLocationID EHSLocationID Location ID
EHSLocClassifiersText EHSLocClassifiersText List of Classifiers (Comma Separated) - short
NumberOfRecords NumberOfRecords Number of Records

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

CREATE VIEW C_EHSTaskInstanceQuery AS
SELECT
  EHSPlannedTaskUUID,
  EHSMainLocationID,
  EHSLocClassifierID,
  TaskFollowRefObjUUID,
  EHSPlannedTaskID,
  EHSTaskDueDate,
  EHSTaskStartDate,
  EHSTaskInstceCompletionDate,
  EHSTaskIsRecurrent,
  EHSTaskHasWorkflow,
  EHSTaskHasDeviation,
  EHSTaskStatus,
  WorkflowTaskStatus,
  EHSTaskOwnerBP,
  EHSTaskOwnerUserName,
  EHSTaskDefinitionUUID,
  EHSTaskTitle,
  EHSTaskPriority,
  EHSTaskPriorityName,
  EHSTaskDefinitionStatus,
  EHSTaskAssignedUser,
  EHSTaskAssignedUserName,
  EHSTaskApprovingUser,
  EHSTaskApprovingUserName,
  EHSSemanticObject,
  EHSTaskDefinitionType,
  EHSTaskDefinitionTypeName,
  TaskFollowCategoryCode,
  EHSTriggerCategoryDesc,
  CmplRqVersUUID,
  ComplianceRequirement,
  CmplRqVersName,
  CmplRqVersParagraphID,
  CmplRqVersParagraphName,
  CmplRqType,
  CmplRqTypeName,
  EHSComplianceScenarioRootUUID,
  EHSComplianceScenarioName,
  DeviationUUID,
  IncidentRefUUID,
  IncidentID,
  EHSLocationName,
  EHSLocationType,
  EHSLocationTypeText,
  Country,
  CountryName,
  Region,
  RegionName,
  Plant,
  PlantName,
  OrganizationalUnit,
  OrganizationalUnitName,
  ControllingArea,
  ControllingAreaName,
  CostCenter,
  CostCenterName,
  CompanyCode,
  CompanyCodeName,
  EHSLocationID,
  EHSLocClassifiersText,
  NumberOfRecords
FROM I_EHSTaskInstanceCube
;