cancel
Showing results for 
Search instead for 
Did you mean: 

FM GUI_GET_DESKTOP_INFO on ITS

Former Member
0 Kudos

Hi everyone,

(I'm using ITS version 6200.1010.41706.0, MS Internet Explorer v.6.0.2600.0000, and R/3 v.4.6C)

I'm using function module GUI_GET_DESKTOP_INFO in order to retrieve the Windows username that is running the session. No problem at SAP GUI, but when executing in ITS, the function returns nothing.

Similarly, I have tried to run FM WS_QUERY in order to retrieve the value of an environment variable, with no success.

Any idea? Thanks very much for your help. Best regards,

Alvaro Vidal-Abarca

Accepted Solutions (1)

Accepted Solutions (1)

former_member228142
Active Contributor
0 Kudos

Hi Alvaro,

GUI_GET_DESKTOP_INFO and WS_* function modules from function group GRAP are legacy and should not be used anymore. Instead you should use the class CL_GUI_FRONTEND_SERVICES. This class provides methods for almost all functionality that is offered by the legacy function modules.

CL_GUI_FRONTEND_SERVICES contains some methods that by design don't work in a web or java environment. Theses function modules raise an exception NOT_SUPPORTED_BY_GUI that have to be catched by the calling application. It is currently unfortunately not possible to retrieve the value of environment variables in a web environment.

Best regards,

Klaus

athavanraja
Active Contributor
0 Kudos

you can get the values by adding a script to the html template

check out this code.

<SCRIPT LANGUAGE="vbScript">

Dim X

set X = createobject("WSCRIPT.Network")

dim U

U=x.UserName

MsgBox "Logged In User is: " & U

</script>

Regards

Raja

former_member228142
Active Contributor
0 Kudos

Well, I think one should mention that this code only works

- on Windows

- within Internet Explorer 6.0 (IE 7.0 it will not work)

- if the security settings are weak on the client and allow to instantiate activeX objects

On should carefully decide if these limitations are fine.

Best regards,

Klaus

athavanraja
Active Contributor
0 Kudos

Thanks Klaus,

I should have mentioned these limitations. I will keep this mind.

Regards

Raja

Answers (0)