SAP WebClient UI的會話重啟原理

i042416發表於2020-08-27

For each business role we can assign a technical profile to it.


SAP WebClient UI的會話重啟原理


Do you know the meaning of the Memory Threshold configured here?


SAP WebClient UI的會話重啟原理


If not, you can set a very low value to it for example 10MB, and go back to your system to observe the session restart behavior.

How the need of session restart is detected

Every time we switch among different work centers, the necessity of session restart is checked:


SAP WebClient UI的會話重啟原理


In handle_restart method, for Non-external navigation ( navigation between WebUI work centers ), BOL reset is by default considered as necessary – gv_bol_reset_requested is set as true in line 18.


SAP WebClient UI的會話重啟原理


Later on the navigation handling method this flag will be evaluated:


SAP WebClient UI的會話重啟原理


And the check about whether the current memory consumption has exceeded the threshold configured in technical profile is performed in line 23, method query_session_reset. The check logic done in below method:


SAP WebClient UI的會話重啟原理


Once it is determined to restart the current session, a flag gv_restart_cause is set with corresponding reset reason.


SAP WebClient UI的會話重啟原理


How the session restart is implemented

If the method is_session_restart_required discussed in previous chapter returns true, it is now ready to prepare Javascript code to restart the session.


SAP WebClient UI的會話重啟原理


Before restart, all current user data are stored via server side cookie. From the implementation of GET_RESTART_SCRIPT you can find the Javascript code for restart.


SAP WebClient UI的會話重啟原理


You can of course debug this JavaScript function in Chrome:


SAP WebClient UI的會話重啟原理


When a new session is successfully launched, all previous stored information are now restored:


SAP WebClient UI的會話重啟原理


How Memory Threshold set in Technical profile is loaded by UI framework

This is pretty easy to find, in constructor of CL_CRM_UI_MEMORY_UTILS.


SAP WebClient UI的會話重啟原理


How to view session restart log

Activate log setting in tcode SAAB, log point id: BSP_WD_MEM_TRACE After that once session restart and restore occurs, it will be recorded and displayed in SAAB:


SAP WebClient UI的會話重啟原理


要獲取更多Jerry的原創文章,請關注公眾號"汪子熙":

SAP WebClient UI的會話重啟原理


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/24475491/viewspace-2715059/,如需轉載,請註明出處,否則將追究法律責任。

相關文章