cancel
Showing results for 
Search instead for 
Did you mean: 

windows user name in webdynpro abap

Former Member
0 Kudos

Hi Guys,

I need to verify windows user before running my webdynpro application,

i have tried method cl_gui_frontend_services=>get_user_name

& function module gui_get_desktop_info.

but none of them is returning the value, due to reason being called from a web frontend.

please advise.

regards

Siddharth

Accepted Solutions (0)

Answers (3)

Answers (3)

abhimanyu_lagishetti7
Active Contributor
0 Kudos

cl_gui_frontend_services=>get_user_name

is SAP GUI specific calls, run at client machine and fetch the username, browser can not execute this.

Abhi

Former Member
0 Kudos

Hi Abhi,

thanks for the reply buddy, then what is the alternative to get the windows user id for my wendynpro application.

regards

Siddharth

abhimanyu_lagishetti7
Active Contributor
0 Kudos

as i already suggested there is a way out..

You can code it in BSP and after yuo get the Username you can call web dynpro using URL parameter

java script code snippet.

http://www.pctools.com/guides/scripting/detail/108/?act=reference

Abhi

Former Member
0 Kudos

I tried that in BSP, but gave me the error:

ActiveX component can't create object: 'WSCRIPT.Network'

How to get through that?

Former Member
0 Kudos

Hi Charlie

I also got similiar problem

you need to change the security settings in the internet explorer.

tools->internet option->security->custom level ->active x controls and plug in -> initialise and activate activ x controls not marked as safe -> enabled.

this will work and return you the user name.

but still its not a sugested way of doing this as it will disturb the security policy of any compnay.

i am still lokking for a suitable solution possibly a client side ASP to run through bsp and give result.

Regards

siddharth

Former Member
0 Kudos

I found the same thing. I was able to make the security policy change in IE and make this work. But it doesn't seems to be a way since not secure.

Is there a way to "mark" this code safe? or perhaps another way?

abhimanyu_lagishetti7
Active Contributor
0 Kudos

Hi Charlie,

generally Enterprise Portal user base is configured to use the LDAP system where all the users accounts are maintained.

In short the user account for portal login is same as the windows account, you can pass the userid to web dynpro application using iView parameters.

Abhimanyu L

vivekananthan_sellavel
Active Participant
0 Kudos

hi Abhimanyu Lagishetti ,

ya correct user detail is maintaned in LDAP.

But how will u get the Data from LDAP to Iview.

Regards

Vivekananthan.S

abhimanyu_lagishetti7
Active Contributor
0 Kudos

as i already mentioned,

Enterprise Portal user base is configured to use the LDAP system,

http://help.sap.com/saphelp_nwce10/helpdata/en/0b/d82c4142aef623e10000000a155106/frameset.htm

Abhi

Former Member
0 Kudos

Hi Siddharth,

... Removed by Moderator

Greetings

Prashant

Note from moderator: Sorry, but the information provided was completely wrong, so rather than lead to possible confusion I decided to remove it. Abhi is correct in saying that such function modules and classes listed are tied to the SAPGUI. They need to communicate direclty with the SAPGUI via the control interface and the SAPGUI provides the information. In Web Dynpro you have no connection to the SAPGUI because you are running in a browser. It doesn't matter where you place such calls, they simply aren't going to work from Web Dynpro.

Edited by: Thomas Jung on Mar 12, 2009 8:11 AM

Former Member
0 Kudos

Hi,

Did anybody find any FM or Method to get Windows User Name?

Can anybody help me?

Thanks

abhimanyu_lagishetti7
Active Contributor
0 Kudos

You can not write Javascript in Web Dynpro, I don't think it is possible directly.

You can code it in BSP and after yuo get the Username you can call web dynpro using URL parameter

Abhi.