on 05-21-2019 10:08 AM
Hello Experts,
for a project, we need to access the work schedule of the employees in their time profile. It must be evaluated how many hours the employee should work on which day. I think that the Business Object "EmployeeTimeAgreement" is the rigth place to look for this information, but i did not finde it.
Can someone guide me where I can find this information exactly?
Thanks in advance,
Mario
Hi Mario,
I am not sure this id this is something you are looking :). Please find the sample code snippet below:
var lv_query_emp = Employee.QueryByIdentification;
var lv_params_emp = lv_query_emp.CreateSelectionParams();
foreach (var lv_emp in lv_result)
{
lv_params_emp.Add(lv_query_emp.UUID.content, "I", "EQ", lv_emp.EmployeeUUID.content);
}
var lt_employees = lv_query_emp.Execute(lv_params_emp);
if (lt_employees.Count() > 0)
{
foreach (var ls_employee in lt_employees)
{
foreach (var lv_working_hours in ls_employee.WorkingHours)
{
foreach (var lv_working_days in lv_working_hours.OperatingHours.RecurringDayProgramme)
{
foreach (var lv_operating_period in lv_working_days.RecurringDayProgrammeOperatingPeriod)
{
var lv_start_hour = Numeric.ParseFromString(lv_operating_period.TimePeriod.StartTime.GetHour());
var lv_start_minutes = Numeric.ParseFromString(lv_operating_period.TimePeriod.StartTime.GetMinute());
var lv_end_hour = Numeric.ParseFromString(lv_operating_period.TimePeriod.EndTime.GetHour());
var lv_end_minutes = Numeric.ParseFromString(lv_operating_period.TimePeriod.EndTime.GetMinute());
while (lv_start_hour < lv_end_hour)
{
}
}
}
}
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mario,
If you go to Employee in People WC, there is an TAB Working hours where you can maintain his Working Schedule as per selected Calendar. To read the information based on Employee read the relation as given below:
Employee->WorkingHours->RecurringDayProgrammeOperatingPeriod
Best Regards,
Monik Sharma
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Monik,
unfortunately, I was unable to follow your steps in SAP Business ByDesign or SAP Cloud Applications Studio. Let me make this clear, I need the location in the Repository Explorer from SAP Cloud Applications Studioto, to read these values via ABSL for programming.
I did not find out in which business object these values are exactly stored.
Best Regards,
Mario
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.