on 05-27-2009 8:47 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
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.