cancel
Showing results for 
Search instead for 
Did you mean: 

Fetching login details from portal and passing to web dynpro.How its done?

Former Member
0 Kudos

Hi All,

My web dynpro application is going to be integrated to the portal.

I have to take the login details say employee no. and pass it to my actual code and do some manipulations based on that. How do I accomplish this?

Please let me know.

Thanks in advance.

Regards

Archana

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Archana,

If your r/3 and portal user id are same then no need to take login details.If login person is employee then his user id must assigned to one pernr.So using the login user id you can get the pernr value by using function module below.

  • Function module to get employee details by passsing user name

CALL FUNCTION 'HR_GET_EMPLOYEES_FROM_USER'

EXPORTING

user = sy-uname

iv_with_authority = space

TABLES

ee_tab = lt_ee_tab.

IF lt_ee_tab[] IS NOT INITIAL.

  • Passing employee number to export parameter

READ TABLE lt_ee_tab INTO ls_ee_tab WITH KEY user = sy-uname.

IF sy-subrc = 0.

ev_pernr = ls_ee_tab-pernr.

ELSE.

ev_failed = gc_failed.

ENDIF.

ELSE.

ev_failed = gc_failed.

ENDIF.

Edited by: suman kumar chinnam on May 27, 2009 11:35 AM

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

Well i was talking about, how can we pass the parameters between different-different WD applications.

As far as portal is concern, i think your portal user must be mapped to R/3 user.

So, you can always use the sy-uname to get the current user and other user information.

As far as fetching from portal is concern, try out folloewing code but i m not very mucg sure about why do you want to get the portal user.

lv_uanme = wdr_task=>client_window->get_parameter( iv_user ).

Does this help?

Thanks,

Rahul

Former Member
0 Kudos

Yes thanks Rahul.

former_member393841
Participant
0 Kudos

Hi Rahul,

Could help me how did you achieve this i too facing the same problem.I have very urgent requirement.

Thank you,

Harsha

Former Member
0 Kudos

Hi,

You can use the refrence of WD application to get all the parameters. there is an constant "ALL_URL_PARAMETERS" which return all the parameters.

1. First declare the Application parameters in the Parameters tab of WD application

2. get the component reference:

data lo_component type ref to if_wd_component.

data lo_application type ref to if_wd_application.

lo_component = wd_comp_controller->wd_get_api( ).

lo_application = lo_component->get_application( ).

lo_application=>ALL_URL_PARAMETERS " to access all parameters.

Does this help?

Thanks,

Rahul

Former Member
0 Kudos

Hi Rahul,

Can you elaborate more on this as to what parameters I have to declare in the application and where are you fetching the parameters. I mean in which place are you coding for this? I am confused right now.

Former Member
0 Kudos

Hi,

1. You have to declare the application parameter's using parameter tab of the WD application. In your case it will be: user_name type string and INo type String. double click on WD application and select the parameter tab to declare these parameters.

2. During the run time fill these parameter with the help of code.

3. Now, when you are navigating from first application to Second application. Get the application parameter as i mentioned earlier.

With "ALL_URL_PARAMETER" you will get the string of parameter of name and value pair.

With the help of string operation get the user name and I no. out of parameter string.

Thanks,

Rahul

Edited by: Rahul Yadav on May 27, 2009 10:47 AM

Former Member
0 Kudos

Hi Rahul,

What do you mean by navigating from first application to second application? I am asking about how to get portal details and use it in my web dynpro code. Also your point is a bit clear to me but not that clear to solve my problem. It will be very nice of you if you could explain in specific terms.

Like just giving the parameter name or I should go from doing something in component controller via window then to application.

If I give a name in parameter column, then what is the value column for?

Please help me getting out of this confusing affair.

former_member40425
Contributor
0 Kudos

Hi,

Go thtrough this link.

I hope it helps.

Regards,

Rohit