There are some special script files in WS that are entirely separate from the script files associated with the SAP dynpros. These script files are as follows.
The logon script runs at logon, as the name suggests. It contains anything that must be loaded or run at logon.
The session script is very similar to the logon script, but it will run each time you launch a new session. Anything that is specific to a session would be placed in this file.
You can place any functions that you wish to be universal to all transactions in the 'functionsSystem.sjs' script file.
Each of these script files will be explained in more detail in the following sections.