cancel
Showing results for 
Search instead for 
Did you mean: 

Get GUI version *and* PL of currently logged in users

Former Member
0 Kudos

Hello,

does anyone know a method to get the SAP GUI version and the patchlevel of all currently logged in users? With transaction SM04 it is only possible to list all users on the current application server with the GUI version, but not with the patchlevel.

Regards,

Jann

Accepted Solutions (1)

Accepted Solutions (1)

RMW
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Jann,

a call to method GET_GUI_VERSION() of class CL_GUI_FRONTEND_SERVICES should return the information you are looking for.

Best regards

Rolf-Martin

Former Member
0 Kudos

OK, I'll tell an ABAP developer to code a small program to download the users and version/PL if I find one.

I thought there might be a possibility to do this without coding?!

Thank you anyway!

Regards,

Jann

RMW
Product and Topic Expert
Product and Topic Expert
0 Kudos

I am not aware of getting the exact gui version without extra coding, but maybe I am wrong.

See also last post of this old [thread|;.

markus_doehr2
Active Contributor
0 Kudos

We use the following program to write into an indx database:

REPORT  ZSAPGUI_VERSION.

data:
  sapgui_version(20),
  sapgui_pl(20),
  sapgui_type(20).

DATA: BEGIN OF USER_TBL OCCURS 100.
          INCLUDE STRUCTURE UINFO.
DATA: END OF USER_TBL.

data: begin of rec occurs 0,
      terminal like user_tbl-term,
      user     like user_tbl-bname,
      type     like sapgui_type,
      version  like sapgui_version,
      patch    like sapgui_pl,
      counter  type i,
      end of rec.

tables indx.

import rec from database indx(ui) id 'GUI_VERSION_TRACE' ACCEPTING PADDING.
clear rec.

call 'C_GUI_VERSION' id 'VERSION'    FIELD sapgui_version
                     id 'PATCHLEVEL' field sapgui_pl
                     id 'TYPE'       field sapgui_type.   "#EC CI_CCALL

call FUNCTION 'TH_USER_INFO'
     importing terminal = rec-terminal
               .

rec-type    = sapgui_type.
rec-version = sapgui_version.
rec-patch   = sapgui_pl.
rec-user    = sy-uname.
rec-counter = 1.

collect rec.

export rec to database indx(ui) id 'GUI_VERSION_TRACE'.

This is built into the login mechanism using EXIT_SAPLSUSF_00 so every logon is saved with user, terminal, gui version and patchlevel and number of logons.

Markus

markus_doehr2
Active Contributor
0 Kudos

...and then you can use the following report:

REPORT  ZSAPGUI_VERSION_REPORT                  .

data:
  sapgui_version(20),
  sapgui_pl(20),
  sapgui_type(20).

DATA: BEGIN OF USER_TBL OCCURS 100.
          INCLUDE STRUCTURE UINFO.
DATA: END OF USER_TBL.

data: begin of rec occurs 0,
      terminal like user_tbl-term,
      user     like user_tbl-bname,
      type     like sapgui_type,
      version  like sapgui_version,
      patch    like sapgui_pl,
      counter  type i,
*      date     like sy-datum,
*      HOSTADR  like user_tbl-HOSTADR,
      end of rec.

data: begin of sum occurs 0,
      type     like sapgui_type,
      version  like sapgui_version,
      patch    like sapgui_pl,
      terminals type i,
      counter  type i,
      end of sum.

tables indx.

import rec from database indx(ui) id 'GUI_VERSION_TRACE'.

sort rec.
loop at rec.
   clear sum. move-corresponding rec to sum. add 1 to sum-terminals.
collect sum.
endloop.

sort sum.
loop at sum.
*   write: / 'Typ', 'Version', 'Patch', 'Terminals', 'Zähler'.
   write: / sum-type, sum-version, sum-patch, sum-terminals, sum-counter.

   hide: sum-type, sum-version, sum-patch.
endloop.


at line-selection.

loop at rec.
   if rec-type = sum-type and rec-version = sum-version and rec-patch =
sum-patch.
*      write: / 'Terminal-ID', 'Benutzer-ID', 'Typ', 'Version', 'Patchlevel', 'Zähler'.
      write: / rec-terminal, rec-user, rec-type, rec-version, rec-patch,
 rec-counter.
   endif.
endloop.

top-of-page during line-selection.
  format color 1.
  write  text-002. uline.

Markus

Former Member
0 Kudos

Thank you Markus, this solved my problem!

Former Member
0 Kudos

...nearly.

I get a list with the type, version, patch, terminal and counter.

But in the "terminal" coloum is only a number shown. Is there any way to get the name of the terminal / user here? A number is useless in this case, because I cant identify the users with a non up-to-date GUI.

Thanks,

Jann

markus_doehr2
Active Contributor
0 Kudos

> But in the "terminal" coloum is only a number shown. Is there any way to get the name of the terminal / user here? A number is useless in this case, because I cant identify the users with a non up-to-date GUI.

Usually the first column is the terminal name - if you doubleclick...

Markus

Former Member
0 Kudos

Ah, doubleclick....

Thank you very, very much!

Answers (0)