@Named(value="com.sap.cloud.sdk.s4hana.datamodel.odata.services.DefaultEHSIncidentCreateService") public class DefaultEHSIncidentCreateService extends Object implements EHSIncidentCreateService
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: | API_EHS_REPORT_INCIDENT_SRV |
API Version: | 1 |
Communication Scenario: | Environment, Health and Safety - Incident Reporting Integration (SAP_COM_0369) |
Scope Items: | Lean Incident Management Reporting (3FP) |
Authentication Methods: | Basic, x509, OAuth2 |
Business Object: | EHSIncident |
DEFAULT_SERVICE_PATH
Constructor and Description |
---|
DefaultEHSIncidentCreateService()
Creates a service using
EHSIncidentCreateService.DEFAULT_SERVICE_PATH to send the requests. |
Modifier and Type | Method and Description |
---|---|
DefaultEHSIncidentCreateServiceBatch |
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. |
DefaultEHSIncidentCreateService |
withServicePath(String servicePath)
Overrides the default service path and returns a new service instance with the specified service path.
|
public DefaultEHSIncidentCreateService()
EHSIncidentCreateService.DEFAULT_SERVICE_PATH
to send the requests.@Nonnull public DefaultEHSIncidentCreateService withServicePath(@Nonnull String servicePath)
EHSIncidentCreateService
withServicePath
in interface EHSIncidentCreateService
servicePath
- Service path that will override the default.@Nonnull public DefaultEHSIncidentCreateServiceBatch batch()
batch
in interface BatchService<EHSIncidentCreateServiceBatch>
@Nonnull public AttachmentCreateFluentHelper createAttachment(@Nonnull Attachment attachment)
EHSIncidentCreateService
Attachment
entity and save it to the S/4HANA system.createAttachment
in interface EHSIncidentCreateService
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()
EHSIncidentCreateService
Incident
entities.getAllIncident
in interface EHSIncidentCreateService
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)
EHSIncidentCreateService
Incident
entity using key fields.getIncidentByKey
in interface EHSIncidentCreateService
incidentUUID
- NodeID
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)
EHSIncidentCreateService
Incident
entity and save it to the S/4HANA system.createIncident
in interface EHSIncidentCreateService
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()
EHSIncidentCreateService
Location
entities.getAllLocation
in interface EHSIncidentCreateService
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)
EHSIncidentCreateService
Location
entity using key fields.getLocationByKey
in interface EHSIncidentCreateService
locationUUID
- NodeID
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)
EHSIncidentCreateService
Person
entity
and save it to the S/4HANA system.createPerson
in interface EHSIncidentCreateService
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 © 2020 SAP SE. All rights reserved.