Showing results for 
Search instead for 
Did you mean: 

Getting the user ID from Portal?

Former Member
0 Kudos

Hi all,

I need to get value of user id into my WDA application .

ie .How can i get the portal logon userid into my Webdynpro for abap application.....



Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos


First of all the USERID field should be attached with the web dynpro component link when its associated with the portal.

This is a joint task of the EP guy and the Basis.

When its done, you can code in HANDLEDEFAULT method of the MAIN WINDOW.

DATA: lv_userid TYPE string.

wdevent->get_data( exporting name = 'USERID' importing value = lv_userid ).

<read the context_node you define with USERID as an attribute of TYPE string and cardinality 1:1>

Then call a BAPI/code to get the user id from the url link which will be passed to the lv_userid.

In my case the url was of length 22, just check in your case.

Reward if Helpful.



Answers (1)

Answers (1)

Former Member
0 Kudos

HI Bhargava,

I think u should have the logon id in the system table field sy-uname. U can pass it to the context and use it in the WD4A application.

With Regards,