Windows-Taskbar tool to quickly add time events in SAP Fiori.
My employer uses a SAP Fiori tool to track our time events (working hours). That means that we have to open the appropiate website and clock in and out. Cause I found this relatively annoying I created this small tool for the (Windows) taskbar with which you can quickly clock in and out.
The tool is shown as a small icon in the taskbar. A right click opens a menu that let you perform some actions quickly.
- Arrive (clock in)
- Leave (clock out)
- Leave and shutdown the PC (sleep and hybernate are also possible)
- Start a pause
- Start a pause and shutdown the PC (sleep and hybernate are also possible)
- End a pause
- Show the time you are clocked in and the work time (clock in time minus pause time)
- Log a leave event: The clock out time is only logged and not submitted to SAP Fiori. This is useful, as an offset time can be added to the leave event and events in the future might be blocked.
- Log a leave event and shutdown (sleep and hybernate are also possible)
- Submit logged leave event and arrive afterwards
- Get the current work time from SAP Fiori
The tool does not need to be installed just run it.
When run for the first time, you will be asked weather to use Edge or Firefox.
On the first start, you also need to define the url for Fiori. Open a browser navigate to your Fiori website and copy the address into the shown window.
In order to start the tool with Windows, it needs to be put into the Startup directory. To open the Startup directory, hit the keys Win+R, type shell:startup
into the opened form (window) and click ok. Afterwards create a shortcut of the QuickFioriTimeEvents.exe (right click on the exe and select Create shortcut) and copy the just created shortcut to the Startup directory. From now on the tool will be started when Windows is started.
You mainly interact with the tool trough the taskbar icon . Right click on it and perform one of the actions.
Closes the application.
Adds an arrive or clock in event to your time events in Fiori. The time in [ArriveLeave]ArriveOffset will be added to the current time.
Adds a leave or clock out event to your time events in Fiori. The time in [ArriveLeave]LeaveOffset will be added to the current time.
Does the same as Leave and executes the [General]ShutdownCommand afterwards.
Adds a pause start event to your time events in Fiori. The time in [ArriveLeave]StartPauseOffset will be added to the current time.
Does the same as Start Pause and executes the [General]PauseStartCommand afterwards.
Adds a pause end event to your time events in Fiori. The time in [ArriveLeave]EndPauseOffset will be added to the current time.
Before doing the same as Arrive, the currently logged leave (or clock out) time is added to time events in Fiori. The added leave time is the logged leave time plus [ArriveLeave]LeaveLogOffset.
Log the current time as the leave (clock out) time but do not submit this to Fiori.
Does the same as Log Leave and executes the [General]ShutdownCommand afterwards.
Gets the current state (if you are logged in and the pause time) from Fiori.
Resets the icon to the default one.
Open the config.ini file.
Opens the pdf version of this documentation. (You are probably reading it)
Shows the time (hours:minutes:seconds) since you clocked in. It also shows the time since clock in minus the pause time. This is the time you have worked. By default this can be executed with a left click on the icon, if [General]ShowWorkTimeOnLeftClick is "True".
The current state is indicated by the taskbar icon. It can be in the following states:
-
Default icon.
-
You are clocked in and working.
-
You are clocked out.
-
A leave or clock out event has ben logged (but not submitted).
-
You are clocked in but currently in a pause (and not working).
-
An error has occured.
You can customize what is shown in the right click menu (see here) and other stuff.
Right now the application can only be configured via the config.ini file. The file is seperated into different sections. In order to change the settings of the application you have to edit the config.ini file. The settings of each section are described in the tables below.
Setting | Default value | Desciption |
---|---|---|
[ArriveLeave]Approve | True | A value indicating whether the event shall be approved. Only approved events are stored in fiori. Set to False to approve manually. |
[ArriveLeave]ArriveOffset | -5 | Minutes that will be added to the arrive time. Negative values are possible. |
[ArriveLeave]LeaveOffset | 0 | Minutes that will be added to the leave time. Negative values are possible. |
[ArriveLeave]LeaveLogOffset | 5 | Minutes that will be added to the leave time. Negative values are possible. |
[ArriveLeave]StartPauseOffset | 0 | Minutes that will be added to the pause start time. Negative values are possible. |
[ArriveLeave]EndPauseOffset | 0 | Minutes that will be added to the pause end time. Negative values are possible. |
Setting | Default value | Desciption |
---|---|---|
[General]MinLogLevel | The minimum level of log entries. CRITICAL = 50, ERROR = 40, WARNING = 30, INFO = 20, DEBUG = 10, NOTSET = 0 |
|
[General]ClearLog | True | A value indicating whether the log shall be deleted, each time the software starts. |
[General]WaitTimeAfterPageLoad | 10 | The time in seconds to wait after the initial page is loaded in the browser instance. |
[General]Url | The (base) url of Fiori. | |
[General]UrlHome | #Shell-home | The path to the 'Home' page. |
[General]UrlTime | ?appState=lean#TimeEntry-change | The path to the 'Time' page. |
[General]Driver | The browser (or driver) that is used to interact with SAP Fiori. Currently Edge or Firefox are supported. |
|
[General]ProfilePath | The path where the profile of the used browser (driver) is stored. | |
[General]BinaryPath | The path where the executable of the used browser (driver) us located. | |
[General]CheckProfilePath | True | A value whether to check if [General]ProfilePath is set. |
[General]ArriveEvent | P10 | The arrive event indentifier. |
[General]LeaveEvent | P20 | The leave event indentifier. |
[General]PauseStartEvent | P15 | The pause start event indentifier. |
[General]PauseEndEvent | P25 | The pause end event indentifier. |
[General]PauseStartCommand | shutdown.exe /h | The shutdown command. '/h' means hybernate instead of normal shutdown. |
[General]ShutdownCommand | shutdown.exe /h | The shutdown command. '/h' means hybernate instead of normal shutdown. |
[General]CloseInstance | True | A value indicating whether the browser instance should be quit after the event has been created. |
[General]ShowWorkTimeOnLeftClick | True | A value indicating whether a left click on the icon shows the current work time. |
[General]Order |
Quit|---|Arrive|Leave|LeaveAndShutdown|---|StartPause|StartPauseAndShutdown|EndPause|---|LeaveLoggedAndArrive|LogLeave|LogLeaveAndShutdown|---|GetCurrentState|SetDefaultIcon|OpenConfig|OpenReadme|---|ShowWorkTime |
The order of the elemnts in the right click menu of the icon. |
The following elements can be added to [General]Order to customize the right click menu.
---
A seperator lineQuit
QuitArrive
ArriveLeave
LeaveStartPause
StartPauseStartPauseAndShutdown
StartPauseAndShutdownEndPause
EndPauseShowWorkTime
ShowWorkTimeLeaveLoggedAndArrive
LeaveLoggedAndArriveLeaveAndShutdown
LeaveAndShutdownLogLeave
Log LeaveLogLeaveAndShutdown
LogLeaveAndShutdownGetCurrentState
GetCurrentStateSetDefaultIcon
SetDefaultIconOpenConfig
OpenConfigOpenReadme
OpenReadme
These settings doesn't need to be edited as they are only used to save the state of the application. So they will change on each run.
Setting | Default value | Desciption |
---|---|---|
[State]LastArriveDateTime | The date and time the arrive event was set the last time | |
[State]LastPing | The date and time of the last interaction with the software. | |
[State]IsPause | False | A value indicating whether you are currently in a pause. |
[State]LastPauseDateTime | The date and time of the last pause start event. | |
[State]AccumulatedPauseTime | 0 | The time in seconds the user has been in a pause. |
[State]LoggedLeaveDateTime | The date and time of the leave event that will be created when using LeaveAndArrive. |