C_EHSRISK
EHS Risk
C_EHSRISK is a CDS View in S/4HANA. EHS Risk. It contains 41 fields. 3 CDS views read from this table.
CDS Views using this table (3)
| View | Type | Join | VDM | Description |
|---|---|---|---|---|
| C_EHSRiskAtMyLocation | view | from | CONSUMPTION | EHS Risk |
| C_EHSRiskForAssignRisks | view | from | CONSUMPTION | Consumption View for Risks for the Assign Risks App |
| C_EHSRisksForIdentifyRisks | view | from | CONSUMPTION | Consumption view for the existing and newly identified Risks |
Fields (41)
| Key | Field | CDS Fields | Used in Views |
|---|---|---|---|
| KEY | EHSRiskAssessmentUUIDHex | EHSRiskAssessmentUUIDHex | 1 |
| KEY | EHSRiskUUID | EHSRiskUUID | 1 |
| KEY | EHSRiskUUIDHex | EHSRiskUUIDHex | 1 |
| _BusinessArea | _BusinessArea | 1 | |
| _CompanyCode | _CompanyCode | 1 | |
| _ControllingArea | _ControllingArea | 1 | |
| _EHSAgent | _EHSAgent | 1 | |
| _EHSJob | _EHSJob | 1 | |
| _EHSLocation | _EHSLocation | 1 | |
| _EHSLocationAuthGroup | _EHSLocationAuthGroup | 1 | |
| _EHSMethodOfUse | _EHSMethodOfUse | 1 | |
| _EHSOperationalStatus | _EHSOperationalStatus | 1 | |
| _EHSRiskAssessment | _EHSRiskAssessment | 1 | |
| _EHSRiskAssessmentType | _EHSRiskAssessmentType | 1 | |
| _EHSRiskLevel | _EHSRiskLevel | 1 | |
| _EHSRiskRoot | _EHSRiskRoot | 1 | |
| _EHSRiskStatus | _EHSRiskStatus | 1 | |
| _Hazard | _Hazard | 1 | |
| _HazardCategory | _HazardCategory | 1 | |
| _OrganizationalUnit | _OrganizationalUnit | 1 | |
| _Plant | _Plant | 1 | |
| _StorageLocation | _StorageLocation | 1 | |
| BusinessArea | BusinessArea | 1 | |
| CompanyCode | CompanyCode | 1 | |
| ControllingArea | ControllingArea | 1 | |
| CostCenter | CostCenter | 1 | |
| EHSAgentUUID | EHSAgentUUID | 1 | |
| EHSJobUUID | EHSJobUUID | 1 | |
| EHSLocationAuthorizationGroup | EHSLocationAuthorizationGroup | 1 | |
| EHSLocationUUID | EHSLocationUUID | 2 | |
| EHSRiskAssessmentType | EHSRiskAssessmentType | 2 | |
| EHSRiskAssessmentUUID | EHSRiskAssessmentUUID | 1 | |
| EHSRiskLevel | EHSRiskLevel | 1 | |
| EHSRiskStatus | EHSRiskStatus | 1 | |
| Hazard | Hazard | 1 | |
| HazardCategory | HazardCategory | 1 | |
| MethodOfUse | MethodOfUse | 1 | |
| OperationalStatus | OperationalStatus | 1 | |
| OrganizationalUnit | OrganizationalUnit | 1 | |
| Plant | Plant | 1 | |
| StorageLocation | StorageLocation | 1 |
@EndUserText.label: 'EHS Risk'
@VDM.viewType: #CONSUMPTION
@ObjectModel.updateEnabled: false
@ObjectModel.createEnabled: false
@AccessControl.authorizationCheck: #CHECK
@AccessControl.privilegedAssociations: [ '_EHSRiskCommentText', '_OrganizationalUnit' ]
@UI: {
headerInfo: {
typeName: 'Risk',
typeNamePlural: 'Risks',
title: {
value: 'EHSRiskUUID'
}
}
}
@Consumption.semanticObject: 'EHSRisk'
@ObjectModel.representativeKey: 'EHSRiskUUID'
@AbapCatalog.sqlViewName: 'CEHSRSK'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey:true
// Client handling by session
@ClientHandling.algorithm: #SESSION_VARIABLE
// used for BOBF Master Data Object
@ObjectModel.usageType:{ serviceQuality: #C, // < 15 msec
sizeCategory: #XL, // < 100.000.000 // due to OTR access
dataClass: #MIXED }
@UI.presentationVariant.requestAtLeast: [ 'EHSRiskUUID', 'EHSRiskUUIDHex', 'EHSRiskAssessmentUUIDHex', 'EHSRiskAssessmentUUID' ]
/*+[hideWarning] { "IDS" : [ "KEY_CHECK" ] }*/
define view C_EHSRisk
as select from I_EHSRisk
association [1..1] to C_EHSRiskAssessment as _EHSRiskAssessment on $projection.EHSRiskAssessmentUUID = _EHSRiskAssessment.EHSRiskAssessmentUUID
association [0..1] to C_EHSAgent as _EHSAgent on $projection.EHSAgentUUID = _EHSAgent.EHSAgentUUID
association [0..1] to C_Hazard_InputHelp as _Hazard on $projection.Hazard = _Hazard.Hazard
association [0..1] to C_HazardCategoryValueHelp as _HazardCategory on $projection.HazardCategory = _HazardCategory.HazardCategory
association [0..1] to C_EHSRiskLevel as _EHSRiskLevel on $projection.EHSRiskLevel = _EHSRiskLevel.EHSRiskLevel
association [0..1] to I_EHSJob as _EHSJob on $projection.EHSJobUUID = _EHSJob.EHSJobUUID
association [1..1] to C_EHSLocation as _EHSLocation on $projection.EHSLocationUUID = _EHSLocation.EHSLocationUUID
association [0..*] to I_OTRText as _OTRText on _OTRText.Language = $session.system_language // TODO when there is a central view available change that
{
//--[ GENERATED:012:29JlHNUf7jY4oS0yl5vKTW
@Consumption.valueHelpDefinition: [
{ entity: { name: 'I_EHSRiskStdVH',
element: 'EHSRiskUUID' }
}]
// ]--GENERATED
@ObjectModel.text.element: [ 'EHSRiskDisplayDetailsText' ]
@UI: {
fieldGroup : { qualifier: 'RiskShortInfo',
type: #WITH_INTENT_BASED_NAVIGATION,
label: 'Risk',
semanticObjectAction: 'displayDetails' ,
position: 30 },
textArrangement: #TEXT_ONLY
}
@Consumption.semanticObject: 'EHSRisk'
key I_EHSRisk.EHSRiskUUID as EHSRiskUUID,
_EHSRiskRoot,
@UI.hidden: true
I_EHSRisk.EHSRiskRevisionUUID,
@UI.hidden: true
bintohex(I_EHSRisk.EHSRiskUUID) as EHSRiskUUIDHex,
@UI: {
textArrangement: #TEXT_LAST
}
@Consumption.semanticObject: 'EHSRisk'
EHSRiskID,
@UI: {
hidden: true
}
_OTRText[1: OnlnTxtRpstryConceptID = '005056AB02261ED2899A901A8ED6DE96'].Text as EHSRiskDisplayDetailsText, // "Display Details"
@ObjectModel.foreignKey.association: '_Hazard'
@UI: {
identification: { position: 30, importance: #HIGH },
fieldGroup : { qualifier: 'RiskHazardInfo', position: 30 },
textArrangement: #TEXT_ONLY
}
I_EHSRisk.Hazard,
_Hazard,
@UI: {
identification: { position: 40, importance: #HIGH },
fieldGroup : { qualifier: 'RiskHazardInfo', position: 40 },
selectionField.exclude: false,
textArrangement: #TEXT_ONLY
}
@ObjectModel.foreignKey.association: '_HazardCategory'
I_EHSRisk.HazardCategory,
_HazardCategory,
@ObjectModel.foreignKey.association: '_EHSAgent'
// Merge the "Agent" fields (Physical, Chemical and Airborne) into one single field
cast ( case
when I_EHSRisk.ChemicalUUID != hextobin( '00000000000000000000000000000000' )
then I_EHSRisk.ChemicalUUID
when I_EHSRisk.AirborneAgentUUID != hextobin( '00000000000000000000000000000000' )
then I_EHSRisk.AirborneAgentUUID
when I_EHSRisk.PhysicalAgentUUID != hextobin( '00000000000000000000000000000000' )
then I_EHSRisk.PhysicalAgentUUID
else hextobin( '00000000000000000000000000000000' )
end as ehhss_agent_combined_uuid_ref preserving type ) as EHSAgentUUID,
_EHSAgent,
// cast ( hextobin( '00000000000000000000000000000000' ) as ehhss_agent_combined_uuid_ref preserving type ) as zrs_test,
// seperate "agent types" due to performance reasons
@Consumption.valueHelpDefinition: [{ entity: { name: 'I_ChemicalStdVH', element: 'ChemicalUUID' }}]
I_EHSRisk.ChemicalUUID,
_Chemical,
@Consumption.valueHelpDefinition: [{ entity: { name: 'I_AirborneAgentStdVH', element: 'AirborneAgentUUID' }}]
I_EHSRisk.AirborneAgentUUID,
_AirborneAgent,
//--[ GENERATED:012:29JlHNUf7jY4oS0yl5vKTW
@Consumption.valueHelpDefinition: [
{ entity: { name: 'I_PhysicalAgentStdVH',
element: 'PhysicalAgentUUID' }
}]
// ]--GENERATED
I_EHSRisk.PhysicalAgentUUID,
_PhysicalAgent,
@UI: {
identification : {label: 'Location', position: 20, importance: #HIGH },
fieldGroup : { qualifier: 'RiskShortInfo', position: 20 },
lineItem: {label: 'Location', position: 30, importance: #HIGH },
selectionField: { exclude: true },
textArrangement: #TEXT_ONLY
}
I_EHSRisk.EHSLocationUUID,
_EHSLocation,
//--[ GENERATED:012:29JlHNUf7jY4oS0yl5vKTW
@Consumption.valueHelpDefinition: [
{ entity: { name: 'I_EHSJobStdVH',
element: 'EHSJobUUID' }
}]
// ]--GENERATED
@ObjectModel.foreignKey.association: '_EHSJob'
I_EHSRisk.EHSJobUUID,
_EHSJob,
I_EHSRisk.EHSJobStep,
@UI: {
fieldGroup : { qualifier: 'RiskShortInfo',
type: #WITH_INTENT_BASED_NAVIGATION,
label: 'Risk Assessment',
semanticObjectAction: 'editAssessmentProject' ,
//semanticObjectAction: 'displayDetails' ,
position: 40 },
textArrangement: #TEXT_ONLY
}
@ObjectModel.foreignKey.association: '_EHSRiskAssessment'
@Consumption.semanticObject: 'EHSRisk'
I_EHSRisk.EHSRiskAssessmentUUID as EHSRiskAssessmentUUID,
bintohex(I_EHSRisk.EHSRiskAssessmentUUID) as EHSRiskAssessmentUUIDHex,
@UI: {
lineItem: { label: 'Risk Assessment Project',
position: 50,
importance: #MEDIUM,
type: #WITH_INTENT_BASED_NAVIGATION,
//semanticObjectAction: 'displayDetails'
semanticObjectAction: 'editAssessmentProject'
},
selectionField: { exclude: true }
}
@Consumption.semanticObject: 'EHSRisk'
@Consumption.filter.hidden: true
_EHSRiskAssessment,
@UI: {
identification: { label: 'Type', position: 10 },
fieldGroup : { qualifier: 'RiskShortInfo', label: 'Type', position: 10 },
textArrangement: #TEXT_ONLY
}
EHSRiskAssessmentType,
_EHSRiskAssessmentType,
@ObjectModel.foreignKey.association: '_EHSRiskLevel'
@Consumption.valueHelp: '_EHSRiskLevel'
I_EHSRisk.EHSRiskLevel,
@UI.hidden: true
_EHSRiskLevel,
@UI: {
lineItem: {label: 'Status' , position: 70, importance: #LOW},
selectionField: { exclude: true }
}
I_EHSRisk.EHSRiskStatus,
I_EHSRisk._EHSRiskStatus,
I_EHSRisk.OperationalStatus,
I_EHSRisk._EHSOperationalStatus,
I_EHSRisk.MethodOfUse,
I_EHSRisk._EHSMethodOfUse,
EHSRiskCommentUUID,
_EHSRiskCommentText,
_EHSRiskImpact,
// the Location Revision specification is needed, otherwise there is influence of the cardinality
// (every record is multiplied by the number of the Revisions of the referrenced Location)
_EHSLocation.StorageLocation,
_EHSLocation._StorageLocation,
_EHSLocation.EHSLocationAuthorizationGroup,
_EHSLocation._EHSLocationAuthGroup,
//--[ GENERATED:012:29JlHNUf7jY4oS0yl5vKTW
@Consumption.valueHelpDefinition: [
{ entity: { name: 'I_BusinessAreaStdVH',
element: 'BusinessArea' }
}]
// ]--GENERATED
_EHSLocation.BusinessArea,
_EHSLocation._BusinessArea,
_EHSLocation.Plant,
_EHSLocation._Plant,
//--[ GENERATED:012:29JlHNUf7jY4oS0yl5vKTW
@Consumption.valueHelpDefinition: [
{ entity: { name: 'I_CostCenterStdVH',
element: 'CostCenter' },
additionalBinding: [{ localElement: 'ControllingArea',
element: 'ControllingArea' }]
}]
// ]--GENERATED
_EHSLocation.CostCenter,
// _EHSLocation._CostCenter,
//--[ GENERATED:012:29JlHNUf7jY4oS0yl5vKTW
@Consumption.valueHelpDefinition: [
{ entity: { name: 'I_CompanyCodeStdVH',
element: 'CompanyCode' }
}]
// ]--GENERATED
_EHSLocation.CompanyCode,
_EHSLocation._CompanyCode,
_EHSLocation.ControllingArea,
_EHSLocation._ControllingArea,
_EHSLocation.OrganizationalUnit,
_EHSLocation._OrganizationalUnit
}
// Filter by current risk revision
where
// Begin correction 2944671 - 06.07.2020 **************************
RevisionEndDate = '99991231'
// End correction 2944671 - 06.07.2020 ****************************
// Only consider active or inactive locations
// and(
// I_EHSRisk._EHSLocation [1 :RevisionStartDate <= $session.system_date and RevisionEndDate >= $session.system_date].EHSLocationStatus = '02'
// or I_EHSRisk._EHSLocation [1 :RevisionStartDate <= $session.system_date and RevisionEndDate >= $session.system_date].EHSLocationStatus = '03'
// )
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"C_EHSLOCATION",
"I_EHSRISK",
"I_OTRTEXT"
],
"ASSOCIATED":
[
"C_EHSAGENT",
"C_EHSLOCATION",
"C_EHSRISKASSESSMENT",
"C_EHSRISKLEVEL",
"C_HAZARDCATEGORYVALUEHELP",
"C_HAZARD_INPUTHELP",
"I_AIRBORNEAGENT",
"I_BUSINESSAREA",
"I_CHEMICAL",
"I_COMPANYCODE",
"I_CONTROLLINGAREA",
"I_EHSJOB",
"I_EHSLOCATIONAUTHZNGROUP",
"I_EHSMETHODOFUSE",
"I_EHSOPERATIONALSTATUS",
"I_EHSRISKASSESSMENTTYPE",
"I_EHSRISKIMPACT",
"I_EHSRISKROOT",
"I_EHSRISKSTATUS",
"I_EHSTEXTCOLLECTIONTEXT",
"I_ORGUNIT",
"I_OTRTEXT",
"I_PHYSICALAGENT",
"I_PLANT",
"I_STORAGELOCATION"
],
"BASE":
[
"C_EHSLOCATION",
"I_EHSRISK"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/