SAP Knowledge Base Article - Public

2897536 - Quanitiy of Vacation of an Employee in UI Does not Match With Odata Query


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

  1. Go to Application and User Management work center
  2. Select OData services
  3. Select Custom OData services from the dropdow menu
  4. Select XXX (where XXX is your Custom Odata Service)
  5. Select Edit
  6. 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:

  1. Go to Time Administration workcenter
  2. Select Employee view
  3. Edit specific employee
  4. Go to Employee Times
  5. Add Row and enter record for any specific date
  6. 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:

  1. Go to Application and User Management - OData Services
  2. Select existing OData Service and Edit
  3. Select Function Imports tab
  4. Select Add Row
  5. Select Function import type Query
  6. Input Entity name EmployeeTimeCalendarPeriodItem and query name QueryByDate
  7. Select the required parameter
  8. Save

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


SAP Business ByDesign all versions