@Named(value="com.sap.cloud.sdk.s4hana.datamodel.odata.services.DefaultWorkforceTimesheetService") public class DefaultWorkforceTimesheetService extends Object implements WorkforceTimesheetService
This service enables you to create, read, update, and delete (CRUD) data related to timesheet of a workforce (Employees or Contingent Workers) with the data provided in a payload, in an API call. This service also supports automatic posting of timesheet data to the controlling module synchronously.
Reference: SAP API Business Hub
OData Service: | API_MANAGE_WORKFORCE_TIMESHEET |
API Version: | 1 |
Communication Scenario: | Workforce Timesheet Integration (SAP_COM_0027) |
Scope Items: | Time Recording (1Q4), Time Recording - Project-Based Services (J12) |
Authentication Methods: | Basic, x509 |
DEFAULT_SERVICE_PATH
Constructor and Description |
---|
DefaultWorkforceTimesheetService()
Creates a service using
WorkforceTimesheetService.DEFAULT_SERVICE_PATH to send the requests. |
Modifier and Type | Method and Description |
---|---|
DefaultWorkforceTimesheetServiceBatch |
batch()
Instantiate a new FluentHelper instance for a single OData batch request.
|
TimeSheetEntryCreateFluentHelper |
createTimeSheetEntry(TimeSheetEntry timeSheetEntry)
Create a new
TimeSheetEntry entity and save it to the S/4HANA system. |
TimeSheetEntryFluentHelper |
getAllTimeSheetEntry()
Fetch multiple
TimeSheetEntry entities. |
TimeSheetEntryByKeyFluentHelper |
getTimeSheetEntryByKey(String personWorkAgreementExternalID,
String companyCode,
String timeSheetRecord)
Fetch a single
TimeSheetEntry entity using key fields. |
DefaultWorkforceTimesheetService |
withServicePath(String servicePath)
Overrides the default service path and returns a new service instance with the specified service path.
|
public DefaultWorkforceTimesheetService()
WorkforceTimesheetService.DEFAULT_SERVICE_PATH
to send the requests.@Nonnull public DefaultWorkforceTimesheetService withServicePath(@Nonnull String servicePath)
WorkforceTimesheetService
withServicePath
in interface WorkforceTimesheetService
servicePath
- Service path that will override the default.@Nonnull public DefaultWorkforceTimesheetServiceBatch batch()
batch
in interface BatchService<WorkforceTimesheetServiceBatch>
@Nonnull public TimeSheetEntryFluentHelper getAllTimeSheetEntry()
WorkforceTimesheetService
TimeSheetEntry
entities.getAllTimeSheetEntry
in interface WorkforceTimesheetService
TimeSheetEntry
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 TimeSheetEntryByKeyFluentHelper getTimeSheetEntryByKey(String personWorkAgreementExternalID, String companyCode, String timeSheetRecord)
WorkforceTimesheetService
TimeSheetEntry
entity using key fields.getTimeSheetEntryByKey
in interface WorkforceTimesheetService
personWorkAgreementExternalID
- Work Agreement External ID
Constraints: Not nullable, Maximum length: 20
companyCode
- The company code is an organizational unit within financial accounting.
Constraints: Not nullable, Maximum length: 4
timeSheetRecord
- The system assigns time sheet records a counter. The counter represents a record's unique database ID.
Constraints: Not nullable, Maximum length: 12
TimeSheetEntry
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 TimeSheetEntryCreateFluentHelper createTimeSheetEntry(@Nonnull TimeSheetEntry timeSheetEntry)
WorkforceTimesheetService
TimeSheetEntry
entity and save it to the S/4HANA system.createTimeSheetEntry
in interface WorkforceTimesheetService
timeSheetEntry
- TimeSheetEntry
entity object that will be created in the S/4HANA system.TimeSheetEntry
entity. To perform execution, call the
execute
method on the fluent helper object.Copyright © 2020 SAP SE. All rights reserved.