on 11-11-2011 3:04 PM
Hi experts,
According to OSS 1112733 MSS Employee Profile: Integrating other iView (https://service.sap.com/sap/support/notes/1112733), you can add other iViews to this Webdynpro Page (General Info for example) and when you click an employee you can catch the event subscribed selection_changed.
When you are accessing this page it is loaded info for a certain employee. Which are the criterias for loading this first employee? I need this information because I need to show my custom iview with the information regarding the employee that the system as already loaded for the standard iViews.
Thanks in advance.
Best regards,
AS
You can include the iviews as indicated here too
https://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=118423928
You can read here
call function 'HR_ASR_WDA_GET_EMPLOYEE'
exporting
id = 'MSS01' "ABAP Memory ID To get the PERNR Selected.
importing
pernr = gv_pernr.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Siddarth,
Thanks for your reply. I successfully added the new iview Webdynpro ABAP into to a new page where I added General Info WDJ standard page and my custom application is getting the subscribed event selection_changed and the PERNR on the parameter.
However FM 'HR_ASR_WDA_GET_EMPLOYEE' is not working for getting the first and automatically selected employee by defaut (PERNR is always initial) . Moreover when I try to do get PERNR using SE37 it also gives me an initial PERNR.
Do you have any suggestions?
Thanks in advance.
Best regards,
AS
Hi Siddhart,
Thanks for your reply.
I read this document but I didn't find out how to get the first employee that is automatically selected by the system.
To be clear I am showing you a screenshot of my issue. When this general info page is accessed one employee is automatically selected.
http://screencast.com/t/bBoNrhE8AlC
My custom application is working fine as soon as you click on one employee because I am getting the employee using the selection_changed event that is triggered once you click one employee.
Do you have any hints about how I could get this automatically selected employee?
Thanks in advance.
Best regards,
AS
Yes I do.
When you go to General Info standard page the system loads automatically info from one employee of the employeesearch list. To show the corresponding information for my customer iView I need to know the selection criteria that system is using for getting this first and automatically selected employee. This is only the remaining issue that I have to include my custom WD ABAP iView in this page.
Remaining screenshots:
http://screencast.com/t/YIriBPcGs
http://screencast.com/t/RtbUczyOn
http://screencast.com/t/PYw1DfgTV (custom iView loaded after selecting one employee on the table. It is initially loaded with no information because I didn't find out yet how to determine the first and automatically selected employee)
Thanks in advance.
Best regards,
AS
Edited by: André Sousa on Nov 15, 2011 5:52 PM
in the note above it said to do this
1) Create a new default portal page (must NOT be of type WD Pagebuilder
page)
2) Add the existing MSS employee profile portal page to this new page.
3) Add your new iView to the new page.
Now the exchange of events between the MSS employee search and your new
iView should work."
There are several factors that would influence the event working
mechanism. We kindly request you to check the following notes that would
help in troubleshooting the issue:
- 945516 WD ABAP in the portal environment
- 1225587 WD ABAP with load balancing in the Enterprise Portal
Please follow the recommendations in the note 945516.
Thanks Siddhart.
Sorry I think you are misunderstanding my issue. I have read this SAP note and I successfully integrated the iView. I just need to get the automatically selected employee.
Actually I have the same issue that this guy is reporting on his SDN post (unfortunatelly this post as no answers).
Quoting:
"
Hi,
I have added WDA Application iView that will live on the MSS TeamViewer page and subscribe to employee search events loading data in response to those events. Iu2019m using a SAP note -- https://service.sap.com/sap/support/notes/1112733 -- with Portal Eventing code to subscribe: Portal eventing is working fine.
subscribe_to_event("urn:com.sap.mss.employeesearch",
EVENT = "selection_changed",
PROBLEM: I get the event only when manually selecting an employee. I do not get the event when the page first loads and the first employee is displayed. I only get the event when an employee is manually selected in the Employee Search list. I also need an event for the loading of the page for when the first employee is loaded. Is there any other event for the page initialization that passes pernr? If so, what are the specs on the event?
Thanks in advance,
Ankur
"
can you let me know your reelease?
From EHP5 onwards, You can follow this
In case you would like to continue to use the Java based MSS service
and call the WD ABAP based ESS services the following 2 Notes
1578965 and 1577099 would be
of help that talks about how to configure Home Page Framework to call
WD ABAP services.
Solved. Solution explained on this topic.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
function Zfm_sw_xss_00037.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" VALUE(PERNR) TYPE PERNR_D OPTIONAL
*" VALUE(DATE) TYPE BEGDA DEFAULT SY-DATUM
*" EXPORTING
*" REFERENCE(FIRST_PERNR) TYPE PERNR_D
*"----------------------------------------------------------------------
data: lt_result_tab type table of swhactor,
lt_result_tab_aux type table of swhactor,
ls_result_tab type swhactor,
ls_pernr_table type hrpernr,
lv_pernr type pernr_d,
* lv_act_objid type hrp1001-objid,
lv_objid_pos type hrp1001-objid,
lt_hrp1001 type table of hrp1001,
ls_hrp1001 type hrp1001,
lv_objid_pernr type hrp1001-objid,
lv_objid type hrobjid,
lv_sobid type hrp1001-sobid,
lv_plvar type plvar,
lv_usrid type pa0105-usrid,
lv_current_user type pa0105-usrid,
lv_lines type i.
call function 'RH_GET_PLVAR'
importing
plvar = lv_plvar
exceptions
no_plvar = 1
others = 2.
if pernr is initial.
* select employee
select single pernr from pa0105 into lv_pernr
where usrid = sy-uname and begda le date and endda ge date.
else.
lv_pernr = pernr.
endif.
* Select user
select single usrid from pa0105 into lv_usrid
where pernr = lv_pernr and begda le date and endda ge date and subty = '0001'.
lv_current_user = sy-uname.
sy-uname = lv_usrid.
* Selecciona todas as posições da estrutura do empregado
lv_objid_pernr = lv_pernr.
select * from hrp1001 into table lt_hrp1001
where otype = 'P' and objid = lv_objid_pernr and plvar = lv_plvar
and sclas = 'S' and rsign = 'B' and relat = '008' and begda le date and endda ge date.
loop at lt_hrp1001 into ls_hrp1001.
lv_objid_pos = ls_hrp1001-sobid.
select single sobid from hrp1001 into lv_sobid
where otype = 'S' and objid = lv_objid_pos and plvar = lv_plvar
and sclas = 'S' and rsign = 'B' and relat = '002' and begda le date and endda ge date.
if sy-subrc = 0.
call function 'RH_STRUC_GET'
exporting
act_otype = 'S'
act_objid = lv_objid_pos
act_wegid = 'ZMSSDIR'
act_plvar = lv_plvar
act_begda = date
act_endda = date
tables
result_tab = lt_result_tab_aux
exceptions
no_plvar_found = 1
no_entry_found = 2
others = 3.
endif.
append lines of lt_result_tab_aux to lt_result_tab.
clear lt_result_tab_aux[].
clear lt_result_tab_aux.
endloop.
delete lt_result_tab where otype <> 'S'.
sort lt_result_tab by objid.
read table lt_result_tab into ls_result_tab index 1.
clear lt_hrp1001.
clear ls_hrp1001.
select * from hrp1001 into table lt_hrp1001
where plvar = lv_plvar and objid = ls_result_tab-objid and otype = 'S'
and relat = '008' and rsign = 'A' and sclas = 'P' and begda le date and endda ge date.
if sy-subrc = 0.
sort lt_hrp1001 by sobid.
read table lt_hrp1001 into ls_hrp1001 index 1.
first_pernr = ls_hrp1001-sobid.
endif.
sy-uname = lv_current_user.
endfunction.
Hi all.
I have now the same problem that André Sousa had with this issue. I've tried using FM HR_ASR_WDA_GET_EMPLOYEE to get the employee selected on search list but it doesn't work; and I cannot use the solution provided by André since my system hasn't ZMSSDIR evaluation path.
Does anybody know a solution to get the selected employee PERNR in a ZWDA??
Thanks in advance.
Regards.
If we use EPCF eventing, its the drawback, we will loose the initial event when we load the foarm.
So that is the reason why SAP came up FcObjectSelection dc, we need use this DCas used DC and get the selection value from the team viewer. This is for WDJ.
https://wiki.sdn.sap.com/wiki/display/profile/How-toaddacustomWebDynproiViewtotheMSSEmployeeProfile%28ECC+6.0%29
I am not sure what is the equivalent for it in WDA. Might be u can try to look at the other similar kind of WDA apps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
99 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.