cancel
Showing results for 
Search instead for 
Did you mean: 

how to captuer portal userid and pwd in wdabap coding

Former Member
0 Kudos

Hi all

Here i need to capture the portal user id and password in WDABAP application for the user who has logged into Enterprise Portal.could you please help how to write the Code for this in wdabap.

Thank in Advance

Deepika

Edited by: deepika_indian on Feb 1, 2011 7:32 AM

Accepted Solutions (0)

Answers (1)

Answers (1)

gill367
Active Contributor
0 Kudos

Hello Deepika,

You can get the user id by using the following code, not sure about the password though.

data client_info_object type ref to if_wdr_client_info_object.
data lv_user type string.
data lv_pass type string.
client_info_object = wdr_task=>client_window->client_info_object.

lv_user = client_info_object->get_parameter( if_http_form_fields_sap=>sap_user ).
lv_pass = wdr_task=>client_window->get_parameter( if_http_form_fields_sap=>sap_password ).

thanks

sarbjeet singh

Former Member
0 Kudos

hi sarbjeet singh

do i need to create context attributes before use that code,if so where do i need do that and where i need to write code,help me to design this scenario.

Thanks & Regards

Deepika

gill367
Active Contributor
0 Kudos

You can write the code in the wddoinit of the comp controller and

then use the variables ls_user and pass for setting the attribute if you want.

thanks

sarbjeet

Former Member
0 Kudos

hi

i have created two attributes for userid and pwd in CC and used them under VC ,created a form and binded them to a form .

but still i am not getting any values in them for the portal user logged in.could plz rectify me where the problem is occuring .

Thanks & Regards

Deepika

gill367
Active Contributor
0 Kudos

R u running the application in an iview in portal.

That is necessary.

Just testing the application independently wont give you anything.

thanks

sarbjeet singh

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

There are a couple of problems with this code. It is reading the URL parameters for the user name and password. This will only work if you are not using SSO tickets and a trust relationship or certificates. Also this is the ABAP system user name (which can also be gotten just accessing SY-UNAME). Thanks to user mapping this may not even be the same user id as runs in the portal.

What exactly are you really trying to acomplish? You really shouldn't need the portal creditals and certainly not the password. Really you shouldn't ever move the password in such an insecure way.

Former Member
0 Kudos

Hi

THAT IVIEW I CALLED INTO EP BUT STILL IT IS NOT CAPTURING THE LOGIN USER OF EP,COULD U PLEASE LET KNOW WHERE MIGHT BE THE PROBLEM .more over for this portal user still there is no infotype created ,wether it is required compulsory ..

REGARDS

DEEPIKA

Edited by: deepika_indian on Feb 2, 2011 8:31 AM

Edited by: deepika_indian on Feb 7, 2011 9:54 AM

gill367
Active Contributor
0 Kudos

You need to configure SSO between portal and abap system.

check whether SSO is esablished and if it is not esablished then you can do it either by using logon tickets or

using the user mapping.

esablish SSO and then check it.

thanks

sarbjeet singh