2005 Oct 31 4:32 PM
Hello.
Is there a user-exit (like FM SUSR_LOGON_USER_EXIT) that is executed each time a user logs out of the sap system?!
--MIKE
Hello.
Is there a user-exit (like FM SUSR_LOGON_USER_EXIT) that is executed each time a user logs out of the sap system?!
--MIKE
2005 Oct 31 7:38 PM
Hi Mike;
No there is not, but we use a work-around that may help you. In the log-on user exit that you reference, we store some information such as user-name, terminal, etc. from a function call to 'RFC_SYSTEM_INFO' in a custom table. Then, we call the function BP_EVENT_RAISE to trigger a periodic background job.
data: wf_rfcsi TYPE rfcsi.
* Get the system information, which will include the computer name and
* the IP address of the logon.
CALL FUNCTION 'RFC_SYSTEM_INFO' DESTINATION 'SAPGUI'
IMPORTING
rfcsi_export = wf_rfcsi.
* Then, store the user name and IP address and terminal name in custom table.
The background job then checks table usr41 with the information in that table to see if the user has logged off. It is certainly not a perfect solution, but it works in our case because we are just trying to trap any super-user log ons (such as DDIC) so we can report the transactions that were executed (SOX) and then lock the user once the log-out occurs.
<select data from custom table>
DO.
* Check tabe USR41 to see if this user has logged off the terminal.
SELECT SINGLE *
FROM usr41
INTO *usr41
WHERE bname = <username from table>
AND terminal = <terminal name from table>.
IF sy-subrc NE 0.
EXIT.
ELSE.
* Wait another minute if the user has not logged off.
WAIT UP TO 60 SECONDS.
ENDIF.
ENDDO.
Hope that helps,
John
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |