If we want analyze SM20 logs for ABAP user or background user or Fiori login. Below are few details which can help.
In SAP SM20 logs, Type and Method define the nature and technical approach of a security event (like a logon or report execution). Type commonly indicates the session category (e.g., Dialog, RFC), while Method specifies how that interaction occurred (e.g., Password, Certificate), often appearing as pairs like type=E, method=A
Type=A (Dialog Logon)
Type=B (Background Job Start): Indicates the session is for a background process, not a manual dialog login.
Type E (Establishment): Indicates the establishment of a shared memory area or an internal call. (Mostly for Fiori login)
type=H: HTTP/HTTPS session (Web-based logon)
Method=P (Password) Password authentication (user explicitly entered credentials)
Method=A (Authorized/Internal): Signifies an internal system call, such as background processing, rather than an interactive user session.
In our case: we have given Message text as: Logon successful (type = A, method = P) to get he user login details
and Message text: User logoff to get the log out time and merged to get the time spent.
for fiori login, we use: Logon successful (type = H, method = P), but fiori logout we may not get, since no one will logout fiori, they just close the browser.
Audit Log - Event Description
The user has logged onto the system.
<ZU>Possible Types (= Access types):</>
A = Dialog logon (SAP GUI)
B = Background job start
H = HTTP logon
U = User switch (internal call)
' ' = Password check (API, internal call)
M = SMTP
P = ABAP Push Channel (APC)
E = Build of a shared object area (internal call)
O = AutoABAP (internal call)
T = Server startup procedure (internal call)
V = SAP start service (internal call)
J = JAVA virtual machine (internal call)
W = BGRFC watchdog (internal call)
<ZU>Possible methods (=authentication modes):</>
P = Password
T = Logon ticket
t = Assertion ticket
X = X.509 certificate
S = SNC
R = RFC ticket
A = Authorized impersonation (background processing)
E = External (EXTID)
U = User switch
s = HTTP security session
2 = SAML2
1 = SAML1
o = OAuth2
N = SPNego
a = APC session
B = SAML bearer
r = Reentrance ticket
D = OpenId connect (with interaction)
d = OpenId connect (no interaction)
If a user type or a method is not listed here, you might find more
information in SAP Note 320991.