Human Capital Management Blogs by SAP
Get insider info on SAP SuccessFactors HCM suite for core HR and payroll, time and attendance, talent management, employee experience management, and more in this SAP blog.
cancel
Showing results for 
Search instead for 
Did you mean: 
Volker_Ruof
Product and Topic Expert
Product and Topic Expert
8,504
Hello,

update January 2023: - please note that this approach works since H2 2022 release with the new time sheet UI as well. Please check chapter 2 in this blog:

https://blogs.sap.com/2022/10/28/successfactors-time-management-new-features-in-h2-2022/

 

update on April 2022: - please be aware that this solution works in H1 2022 only with the "old" Time Sheet UI - as you can see from the screenshots below. We are working on enabling this possibility also for the new time sheet UI. Enablement is planned for H2 2022.

 

Customers often ask if our time sheet can be used just like CATS. No, it can´t. Our time sheet is not a cross application time sheet, it´s main focus is HR purpose, overtime and premium pay calculation to feed payroll and get the employees paid. But: there is a way how you can use the EC time sheet nevertheless for project time recording, but with some limitations.

CATS is a Cross Application Time Sheet that exists since many, many years. CATS has a big database and lots of interfaces to various sending and receiving systems like projects, financial, procurement and is first and formost used for recording of hours for billing, cost allocation or project planning processes. However, the hours recorded can also be send to a HR system for documentation of working time, overtime calculation, premium pay calculation and in general for payroll purpose.

So, HR is only one amongst other target applications for CATS.

For EC Time Sheet it is vice verca: EC Time Sheet runs in an HR system and exist solemly for HR reasons.

But what if you want to use our EC Time Sheet for Payroll and for a rather simple project time recording? Is there a way?

Yes, of course. However there are no pre-packaged integration scenarios.

If you want to use the EC Time Sheet for project time recording or WBS recording or whatever costing element, you need to replicate the information which project a user is allowed to choose in his time sheet. Normally this kind of assigment is done in the project system. Users are staffed to a project. And this information needs to be replicated to EC. And when an employee chooses a project code in EC Time Sheet and records his hours to this object, you need to extract this information and send it to the target system.

I don´t deal here with how to set up this integration scenarios - cause this is very customer specific. But I gonna explain here how you can achieve that a user can choose only those projects, where he is assigned to.

So, what do we want to achieve?

We want to achieve that the value help for a custom field (project) in EC Time Sheet is restricted to those, where he is assigned to.

For this we need following:

  1. Custom MDF object where the projects are stored

  2. A custom object for the user

  3. A valid when association from the project object to the user object

  4. A custom field in EC Time Sheet that reads this Custom MDF object and filters based on the user only the valid projects


Let´s start, step by step:

Create 2 Custom MDF objects:

You need 2 custom MDF objects. One for the project codes and another one for the users. Both are then linked with a valid-when association.

You create this object via Configure Object Definition, create new object defintion:

Create an object for your project codes:



 

Now create another custom object that we use as a container for the users. Be aware that this objects external code is of data type USER:

 

 



Now go back to your project code object and enter a reference to this user object as a valid-when association. You do this in the object definition (configure object definition, choose your previously created object and edit). Enter a name for the association (in my case: Allowed_users) and choose as destination object your second created object, the one that you use for the users (in my case the VR_user_filter object, label: Allowed Users for Projects). Choose as type "valid when" and multiplicity "one to many".

 



 



Almost done. We have now linked project code and user object.

Next step: Define a custom field for the Time Sheet Entry Object

Now, this is the crucial part. Go to configure object definition. Choose the Employee Time Sheet Entry object, edit. Create a custom field for the Projects code that an employee shall be able to fill in the time sheet.



Choose as data type of the custom field "Generic Object" and in the valid values source enter the name of your project code MDF object. This means the custom field refers now to your Project Code custom object.

But we are not yet done here, scroll down to the Field Criteria section.

The tricky thing is that we do not want to display all project codes that are listed in the objects. Cause usually a project got user assigned who are staffed to this project. If a user is not staffed, he is not allowed to record hours to this project. And this is what we want to achieve.

So, we want that only those projects come up in the value help where the time sheet user is assigned to in our custom project code object. Hence we need to create a field criteria for our time sheet custom field. And we need to use the association we have created for our custom field in the time sheet entry object which directs to the user-filter object. And from this object we use the field "external code"  Remember, the external code in that object is of type "user". Admitted, this is all a bit tricky and how this is done and why you need to do this is not really well documented. Just follow my steps and it will work ;-).

You need to type the information in the exact manner into the field. It is done like: association_name.fieldname.

My association was named "allowed_user". This I type at the beginning, than .externalCode. Why this?

The association points to the object "Allowed users for project" and from this object we need the field "external_code" which is of type user. Hence, we use the "externalCode" as extension of the association.

All in all this is how it looks like: cust_Allowed_user.externalCode

So we use more or less the information of the external code of the associated object (which contains the user) and map it to the to the time sheet user. This is done by entering "parent.UserId" into the "Destination field name" field. This points then to the user ID in the employee time sheet, which is the parent of Employee time sheet etnry. Hence this should look like this:



 

And we are done. Lets validate this.

First we need to enter some users in our user-filter object. This are the users that are allowed to record times on projects in general. Use manage data and create some entries in the object:



 

For testing purpose I just enter 2, Carl Dixon and Emma Dorn



 

Now we need to assign these users to a project code. I create two projects, Project A and Project B.

To project A I assign Carl and Emma, to Project B only Carl:



 



 

And lets check if this works in the time sheet. I log on as Carl Dixon:



And I get Project A and Project B in the value help.

Now I log on as Emma Dorn:



I am getting only Project A in the value help.

And now I am logging into the time sheet as a user that is not assigned at all to a project code:



 

And the value help is empty.

Works perfectly.

 

At the end some remarks on what this solution can offer and what can´t be offered:

  • due to the fact that there is no effective dated possibility the value help shows the content of the assigned user as it is today. Means, when you remove a user from Project A today he can´t record times to this project. Even when he navigates back to a date in the past where he has already recorded some times to project A. When he wants to edit this times, the value help does not show Project A anymore, cause the project code object is read with todays date.

  • As mentioned, there is no pre-configured integration scenario. You have import the projects into your custom object. Either via file upload or Odata Api call. If possible, already with user assignment, if not you need to import the users to a project as well.

  • There is no approval possibility on a project code level. The full time sheet is send to one approver


This was it. Happy project time recording.

Regards

Volker Ruof

 

 
20 Comments