on 05-29-2007 10:55 PM
Hi All,
How can I access the user loged in a webdynpro, like when I access the sdn community, my name goes to the page top using the SAP SSO (single sign-on).
Thanks your attention,
Roberto Falk
In Web Dynpro ABAP you can always access the logged in user account ID via the system variable: SY-UNAME. To lookup the user account and read the full name use the BAPI, BAPI_USER_GET_DETAIL. The information you want will be in the ADDRESS parameter.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Look at the signature on the BAPI, there is an importing parameter for username. This way you can looking information on any user. However if you want information on the currently logged in user, just pass in the sy-uname to this parameter:
data return type standard table of bapiret2.
data ADDRESS TYPE BAPIADDR3
call function 'BAPI_USER_GET_DETAIL'
exporting
username = sy-uname
importing
address = address
tables
return = return.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.