on 02-08-2010 2:30 PM
Hi,
I've developed an ABAP Web Dynpro for MSS, how can I pass it the pernr of an employee selected from the team viewer?
Regards,
Rob
Rob,
It's certainly possible with the WDJ Team Viewer from the MSS ERP2005 Business Package , have a look at note 1112733 for details.
The main limitation we have found with it is that your WebDynpro ABAP iView will only be passed the parameter once the user has clicked on an employee in the Team Viewer, whereas the equivalent WDJ iViews seem to get passed the parameter on initialisation.
The best we could come up with was to put some text like "Select an employee from the team viewer list" in the start screen of the WDA applications.
Cheers,
John
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi thanks for your responses.
My WD4A app isn't picking up the parameter.
I've set an importing parameter pernr on the app properties page. I've implemented code in the handledefault method of the default inbound plug but nothing is coming through.
There is another WD app being launched from the same place which I have copied the setup from and this is picking up the personnel number. This doesn't register to use any portal events so I'm assuming I don't need to either as I want it to behave in the same way.
Am I missing something here?
The iView is set to recieve webdynpro parameters and this is set up the same as the one that works.
Any help appreciated.
Rob
What sort of page do you have the iViews in?
Try putting them all in a normal portal page (i.e. not a Webdynpro Proxy page), if you haven't already done so.
You could also search through the SDN forums using keywords like "selection_changed portal event", as there have been quite a few posts about the same topic with various solutions.
Cheers,
John
Hi,
The link is in the Related Activities iView on the General Information page.
There is another custom WD4A launched via a link in the same iView and this is not using events. (at least the source code is not subscribing to any event)
I have tried putting the General Information page in a normal portal page but this has had no effect.
Rob
Hi,
you can do this by following: My assumption here is that in your portal page...you have two iviews: team viewer iview and your custom wda iview....so you want to get the selected employee...i mean when manager clicks on an employee you want to get their pernr.....you can achieve this by doing this:
1) go to your custom developed component and the first view...which will be shown the moment manager's click on an employee.....in the WDDOINITmethod of that view....write following code....
***********************************************************************************************************************************************
DATA lo_api_component type ref to if_wd_component.
DATA lo_portal_manager type ref to if_wd_portal_integration.
lo_api_component = wd_comp_controller->wd_get_api( ).
lo_portal_manager = lo_api_component->get_portal_manager( ).
DATA lo_api_controller type ref to if_wd_view_controller.
lo_api_controller ?= wd_this->wd_get_api( ).
CALL method lo_portal_manager->subscribe_event
exporting
portal_event_namespace = 'urn:com.sap.mss.employeesearch'
portal_event_name = 'selection_changed'
view = lo_api_controller
action = 'SET_MSS_FLAG'
***********************************************************************************************************************************************
as you can see we are subscribing to the event "selection_changed" this is the event get raised once manager click on an employee in team viewer.....make sure you type the "portal_event_namespace" and "portal_event_name" same as shown....with the smaller case.....
2) my action parameter in the above code...is an action...which i want to get trigger as soon as this event gets raised....I am just setting a flag here that....we are coming from MSS service....you can give any name you want to this action....for example..."GET_PERNR" or something on that line...but it does not matter what you call this action....
3)now for this action method....put the following code to extract the pernr......in my case what i did is extracted this pernr and store it in my node attribute....to share it with other views in my component....of course you need to create this node at component level so all the views in your wda component can see that....
**********************************************************************************************************************************************************
DATA lpernr TYPE string.
data len type i.
data local_pernr type pernr_d.
data l_offset type i.
wdevent->get_string(
EXPORTING
name = 'PORTAL_EVENT_PARAMETER'
receiving
value = lpernr ).
len = strlen( lpernr ).
l_offset = len - 8.
local_pernr = lpernr+l_offset(8).
data lo_nd_importing type ref to if_wd_context_node.
data lo_el_importing type ref to if_wd_context_element.
data ls_importing type wd_this->element_importing.
data lv_p_num like ls_importing-p_num.
lo_nd_importing = wd_context->get_child_node( name = wd_this->wdctx_importing ).
lo_el_importing = lo_nd_importing->get_element( ).
lo_el_importing->set_attribute(
exporting
value = local_pernr
name = `P_NUM`
).
***********************************************************************************************************************************************
this is how you extract pernr from teamviewer to your custom wda component....
Thanks...
AS....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rob,
Are you refering to the memory space "MSS01" ??
I am trying to launch custom WDA application from "Related Activities" view and listening to the portal event does not help as my WDA application opens in a new window from the "related activities" page.
I would appreciate if you can let the secret out about the Memory ID you are using.
Regards
Ashutosh
Hi,
you can make use of the parameters tab of the web dynpro application to pass parameters to a WD application when it is called from portal.
Thanks,
Abhishek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
when you embed your wd application in portal you can set it up to receive parameters. define a parameter in the parametes tab in wd appliction and use the same name in the portal to pass value to ur application.
to test: double click on the wd application in se80. on the right hand side you will see two tab. one of these are parameters. click on it and define a parameter pernr provide it a default value.
now go to the default inbound plug of your window and again define pernr as the importing parameter. put a break point here and excute ur application.
in debug check the value of pernr. it should be the default value defined by you.
now when this application will be embeded in portal the parameter passed from portal will override the default value.
please talk to the portal guy to get more idea on how the wd apps are embeded and how we define exporting parameter for any application.
Thanks,
Abhishek
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.