@Named(value="com.sap.cloud.sdk.s4hana.onpremise.v2020.datamodel.odata.services.DefaultEnvironmentHealthAndSafetyIncidentService") public class DefaultEnvironmentHealthAndSafetyIncidentService extends Object implements EnvironmentHealthAndSafetyIncidentService
This service contains the basic information about an incident as the main entity, and persons involved, location, and attachments as dependent entities. For create operations, the information is sent in the request as a payload, except for attachment-related data. You can add attachments to the newly created incident in separate calls. Once the incident has been created, the incident data and global identification are sent in the response. For read operations, filter information can be sent according to the OData protocol. While creating an incident or retrieving incident data, the system performs checks for restricted values and authorization. If there are any issues, the system displays error messages in the response..
Reference: SAP API Business Hub
OData Service: | OP_API_EHS_REPORT_INCIDENT_SRV_0001 |
API Version: | 1 |
Minimum ERP Version: | 2020 |
Authentication Methods: | Basic, x509 |
Business Object: | EHS Incident business object |
DEFAULT_SERVICE_PATH
Constructor and Description |
---|
DefaultEnvironmentHealthAndSafetyIncidentService()
Creates a service using
EnvironmentHealthAndSafetyIncidentService.DEFAULT_SERVICE_PATH to send the
requests. |
Modifier and Type | Method and Description |
---|---|
DefaultEnvironmentHealthAndSafetyIncidentServiceBatch |
batch()
Instantiate a new FluentHelper instance for a single OData batch request.
|
AttachmentCreateFluentHelper |
createAttachment(Attachment attachment)
Create a new
Attachment entity and save it to the S/4HANA system. |
IncidentCreateFluentHelper |
createIncident(Incident incident)
Create a new
Incident entity and save it to the S/4HANA system. |
PersonCreateFluentHelper |
createPerson(Person person)
Create a new
Person entity and save it to the S/4HANA system. |
IncidentFluentHelper |
getAllIncident()
Fetch multiple
Incident entities. |
LocationFluentHelper |
getAllLocation()
Fetch multiple
Location entities. |
IncidentByKeyFluentHelper |
getIncidentByKey(UUID incidentUUID)
Fetch a single
Incident entity using key fields. |
LocationByKeyFluentHelper |
getLocationByKey(UUID locationUUID)
Fetch a single
Location entity using key fields. |
DefaultEnvironmentHealthAndSafetyIncidentService |
withServicePath(String servicePath)
Overrides the default service path and returns a new service instance with the specified service path.
|
public DefaultEnvironmentHealthAndSafetyIncidentService()
EnvironmentHealthAndSafetyIncidentService.DEFAULT_SERVICE_PATH
to send the
requests.@Nonnull public DefaultEnvironmentHealthAndSafetyIncidentService withServicePath(@Nonnull String servicePath)
EnvironmentHealthAndSafetyIncidentService
withServicePath
in interface EnvironmentHealthAndSafetyIncidentService
servicePath
- Service path that will override the default.@Nonnull public DefaultEnvironmentHealthAndSafetyIncidentServiceBatch batch()
batch
in interface BatchService<EnvironmentHealthAndSafetyIncidentServiceBatch>
@Nonnull public AttachmentCreateFluentHelper createAttachment(@Nonnull Attachment attachment)
EnvironmentHealthAndSafetyIncidentService
Attachment
entity and save it to the S/4HANA system.createAttachment
in interface EnvironmentHealthAndSafetyIncidentService
attachment
- Attachment
entity object that will be created in the S/4HANA system.Attachment
entity. To perform execution, call the
execute
method on the fluent helper object.@Nonnull public IncidentFluentHelper getAllIncident()
EnvironmentHealthAndSafetyIncidentService
Incident
entities.getAllIncident
in interface EnvironmentHealthAndSafetyIncidentService
Incident
entities. This fluent helper allows methods which modify the underlying query to be called
before executing the query itself. To perform execution, call the
execute
method on the fluent helper object.@Nonnull public IncidentByKeyFluentHelper getIncidentByKey(UUID incidentUUID)
EnvironmentHealthAndSafetyIncidentService
Incident
entity using key fields.getIncidentByKey
in interface EnvironmentHealthAndSafetyIncidentService
incidentUUID
- Incident Global Identification
Constraints: Not nullable
Incident
entity using key fields. This fluent helper allows methods which modify the underlying query to
be called before executing the query itself. To perform execution, call the
execute
method on the fluent helper object.@Nonnull public IncidentCreateFluentHelper createIncident(@Nonnull Incident incident)
EnvironmentHealthAndSafetyIncidentService
Incident
entity and save it to the S/4HANA system.createIncident
in interface EnvironmentHealthAndSafetyIncidentService
incident
- Incident
entity object that will be created in the S/4HANA system.Incident
entity. To perform execution, call the
execute
method on the fluent helper object.@Nonnull public LocationFluentHelper getAllLocation()
EnvironmentHealthAndSafetyIncidentService
Location
entities.getAllLocation
in interface EnvironmentHealthAndSafetyIncidentService
Location
entities. This fluent helper allows methods which modify the underlying query to be called
before executing the query itself. To perform execution, call the
execute
method on the fluent helper object.@Nonnull public LocationByKeyFluentHelper getLocationByKey(UUID locationUUID)
EnvironmentHealthAndSafetyIncidentService
Location
entity using key fields.getLocationByKey
in interface EnvironmentHealthAndSafetyIncidentService
locationUUID
- Location Global Identification
Constraints: Not nullable
Location
entity using key fields. This fluent helper allows methods which modify the underlying query to
be called before executing the query itself. To perform execution, call the
execute
method on the fluent helper object.@Nonnull public PersonCreateFluentHelper createPerson(@Nonnull Person person)
EnvironmentHealthAndSafetyIncidentService
Person
entity and save it to the S/4HANA system.createPerson
in interface EnvironmentHealthAndSafetyIncidentService
person
- Person
entity object that will be created in the S/4HANA system.Person
entity. To perform execution, call the
execute
method on the fluent helper object.Copyright © 2021 SAP SE. All rights reserved.