cancel
Showing results for 
Search instead for 
Did you mean: 

Loged user in WebDynpro

roberto_falk
Participant
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

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.

roberto_falk
Participant
0 Kudos

Hi Thomas,

in this BAPI, it will use the SAP SSO or I must inform any import parameter to this works?

Thanks,

Roberto Falk

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

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.

roberto_falk
Participant
0 Kudos

What fast...

I undestood now. Thanks your help.

Roberto Falk

Answers (0)