You have created a Custom Odata Service XXX with BO EmployeeTime. After creating the service the Quantity for Vacation Hours is showing as 0.0000 hours for all employees while fetching data in OData GET collection.
SAP Business ByDesign
Reproducing the Issue
- Go to Application and User Management work center
- Select OData services
- Select Custom OData services from the dropdow menu
- Select XXX (where XXX is your Custom Odata Service)
- Select Edit
- Select EmployeeTimeItem
Query the URL in chrome
(Where YYYYYY is Tenant ID)
The EmployeeTimeItem entity shows the Quantity field, in case user has explicitly entered the Duration field while creating the Time Recording.
In cases where user is entering Start date, End date or Start time, End time combination then the Quantity field is valuated based on other Time Recording settings eg. Breaks. In this case, the data shows in EmployeeTimeCalendarPeriodItem entity.
You can check Quantity and Duration field below:
- Go to Time Administration workcenter
- Select Employee view
- Edit specific employee
- Go to Employee Times
- Add Row and enter record for any specific date
- Scroll down, you will see the Duration drop down text box and Quantity Field
Quantity field gets autofilled by manually entering Duration filed or valuated based on Start and End Time as stated above.
You can fetch the Quantity via creating new query on EmployeeTimeCalendarPeriodItem entity and QueryByDate query by the employee time recording date and filter the duration by filtering the EmployeeTimeItemUUID and EmployeeTimeItemTypeCode field.
Steps to create OData Query:
- Go to Application and User Management - OData Services
- Select existing OData Service and Edit
- Select Function Imports tab
- Select Add Row
- Select Function import type Query
- Input Entity name EmployeeTimeCalendarPeriodItem and query name QueryByDate
- Select the required parameter
Post above changes execute the query with the respective parameter, in this case by employee time recording date.
Odata Services, EmployeeTimeCalendarPeriodItem, EmployeeTimeItem, Duration, Quantity , KBA , SRD-HR-TLM , Time and Labour Management , Problem