cancel
Showing results for 
Search instead for 
Did you mean: 

MSS - General Information - Related Activities Links persnr.

Lee3
Active Participant
0 Kudos
167

Hi Experts,

We created an webdynpro abap and created an iview (addresses) for the webdynpro. We add the iview to the related links. When we choose an employee in the employee search and open de link, the persnr is not passed.

method WDDOINIT .

DATA L_API_COMPONENT TYPE REF TO IF_WD_COMPONENT.

DATA L_PORTAL_MANAGER TYPE REF TO IF_WD_PORTAL_INTEGRATION.

DATA L_WD_VIEW TYPE REF TO IF_WD_VIEW_CONTROLLER.

L_API_COMPONENT = WD_COMP_CONTROLLER->WD_GET_API( ).

L_PORTAL_MANAGER = L_API_COMPONENT->GET_PORTAL_MANAGER( ).

L_WD_VIEW ?= WD_THIS->WD_GET_API( ).

CALL METHOD L_PORTAL_MANAGER->SUBSCRIBE_EVENT

EXPORTING

PORTAL_EVENT_NAMESPACE = 'urn:com.sap.mss.employeesearch'

PORTAL_EVENT_NAME = 'selection_changed'

VIEW = L_WD_VIEW

ACTION = 'SUBSCRIBE_TO_EVENT'.

endmethod.

If the iview is on the same page as the empoyee search, then the persnr be passed. But we don't want the remployee search twice in the portal (once under general information and on the page link addresses)

Is it possbile to pass the persnr to the webdynpro iview?

gr

Joeri

Accepted Solutions (1)

Accepted Solutions (1)

siddharthrajora
Product and Topic Expert
Product and Topic Expert
0 Kudos

This is kinda tricky

You need to ensure all the steps mentioned in below doc is done

https://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=118423928

Lee3
Active Participant
0 Kudos

Hi Siddhart,

thanks for your reply.

The solution you mention is not really what we had in mind. The ABAP webdynpro must be displayed in the general activities as a link. What we want is that the employee number is passed to the link when we open the abap webdynpro.

gr

Joeri

MarkusKlein
Active Contributor
0 Kudos

Hello Joeri,

to integrate a WDA application into the related links area you have to perform the following tasks:

1.) The Service called from the related links area has to be a service/iview based on the WDJ application "sap.com/mss~hras/RelatedActivitiesLauncherApp". This iview has a property in category "Self Services" named "Service-ID". Here you pass the Homepage Framework Service ID from your custom WDA application.

2.) Your WDA application needs to retrieve the pernr the WDJ Starter application "sap.com/mss~hras/RelatedActivitiesLauncherApp" has stored in the ABAP memory in your Backend. You do this with the Functionmodules from Functionmodulegroup "HRASR00_WDA_SET_GET_DATA". The Pernr Memory Id is "MSS01" if i remember right.

Thats it. I hope it does help.

regards,

Markus

Lee3
Active Participant
0 Kudos

Hi Markus,

I will try and let you know the results next week.

thanks.

Joeri

Lee3
Active Participant
0 Kudos

Hi markus,

Can you describe the procedure?

gr

Joeri

Lee3
Active Participant
0 Kudos

Hi markus,

I create an RelatedActivitiesLauncherApp iview and add the Homepage Framework Service ID. I add the iview to the General information page. The WDA is changed. When I preview the General information page, the RelatedActivitiesLauncherApp iview is empty.

Can you describe the procedure?

gr

Joeri

MarkusKlein
Active Contributor
0 Kudos

>

> Hi markus,

>

> I create an RelatedActivitiesLauncherApp iview and add the Homepage Framework Service ID. I add the iview to the General information page. The WDA is changed. When I preview the General information page, the RelatedActivitiesLauncherApp iview is empty.

>

> Can you describe the procedure?

>

> gr

>

> Joeri

Hello Joeri,

thats ok that the RelatedActivitiesLauncherApp is empty. The only purpose of this application is to store the selected object from the OADP into the ABAP-Memory and to forward your request to your application.

But you do not add the "RelatedActivitiesLauncherApp iview" to the "General information page". Only the RelatedActivity Links Area which defines your Link Area has to be part of this page.

The RelatedActivitiesLauncherApp iview is the iview which gets called once you click on a service link in your RelatedActivity Links Area. This iview you have to pass the service id of the actual service you want to call, so the RelatedActivitiesLauncherApp knows which service it has to call.

I hope its more clear now.

regards,

Markus

Lee3
Active Participant
0 Kudos

Hi Markus,

thanks for your quick reply.

The link in the related activity is a link to an iview who starts the webdynpro, maybe that's my problem, am I right?

in the backend the service type is "Call a Portal page (PCD)". I can't find any procedure about a service type Webdynpro ABAP application.

gr

Joeri

MarkusKlein
Active Contributor
0 Kudos

>

> Hi Markus,

>

> thanks for your quick reply.

>

> The link in the related activity is a link to an iview who starts the webdynpro, maybe that's my problem, am I right?

> in the backend the service type is "Call a Portal page (PCD)". I can't find any procedure about a service type Webdynpro ABAP application.

>

>

> gr

>

> Joeri

Yes, the Link has to start the RelatedActivitiesLauncherApp which then calls your web dynpro abap. The service type PCD is basically ok, as long as you are in a portal environment and your field "URL to PCD..." in your ressource customizing is filled.

But there is no reason why you should not select Web Dynpro Java for RelatedActivitiesLauncherApp and Web Dynpro ABAP for your custom application as service type in the homepage framework customizing.

regards,

Markus

Lee3
Active Participant
0 Kudos

Hi Markus,

so in the "URL of PCD Page" I set the pcd location of the "RelatedActivitiesLauncherApp" iview (I already did but screen was blank, I will try it again). Maybe the configuration in the area, subarea etc is not complete.

I will let you know.

gr

Joeri

Lee3
Active Participant
0 Kudos

Hi Markus,

I created 2 services and 2 resources. The link in the related activities is the iview of the RelatedActivitiesLauncherApp , this iview contains the service id of the WDA.

The activity launcher services, has service type webdynpro for java and the resource key is the resource of the WDJ.

In the resource the "URL od PCD Page" is filled with the pcd loaction of the WDJ iview.

The WDA service, has service type PCD and link resource is the resource key of the resource of the WDA.

In the resource the "URL od PCD Page" is filled with the pcd loaction of the WDA iview.

The WBA is started but the RelatedActivitiesLauncherApp refreshed the general information screen and replace the screen with the RelatedActivitiesLauncherApp iview. When we refresh the screen the general information page is displayed again. How to occur this? So that the general information remains visible.

gr

Joeri

Former Member
0 Kudos

Hey Joeri ,
Can you mail me the document to. I also need to add custom WDA application in relative activities and pass the perner to that application at backed  for further processes.

regards,

Prajakta k

Lee3
Active Participant
0 Kudos

Hi Prajakta,

I can send you some information. can you give me your address?

gr

Joeri

Former Member
0 Kudos

Hi Joeri,
Thanks for your quick reply.

Below is my mail id
Prajakta.Khobaragade@lntinfotech.com
Prajakta_262@yahoo.in(if the size  o doc exceeds 11mb send on this id)

Answers (4)

Answers (4)

Lee3
Active Participant
0 Kudos

I solved my problem with the empty screen. The resource for the activity launcher has window property _blank and the webdynpro is empty.

ChrisPaine
Active Contributor
0 Kudos

One of the easiest ways to make any of the OADP links launching your WDA application pass the employee information easily is to use the proxy class of the related service - you can append the URL parameters you want to consume in your WDA application in this manner. There are multiple SAP standard implementations of the proxy class that do this - for example for MBO.

Lee3
Active Participant
0 Kudos

Hi Chris,

can you be more specific? What is the name of the proxy class of the related service? How can I pass the persnr from the Java Webdynpro?

gr

Joeri

Former Member
0 Kudos

Hi,

I got the same exact problem, have you found a way to retrieve the selected pernr?

Regards,

Pierre

Former Member
0 Kudos

Hello Joeri,

I created the following objects:

2 iViews:

- RelatedActivitiesLauncherApp: in this iView I added in 'Service-ID' the Service key of the my Web Dynpro ABAP.

- ZWeb Dynpro ABAP: this iView has my WDA Application.

2 Resources and 2 services like you describe in your Posted: Aug 31, 2010 9:58 AM.

These steps are ok.

When I execute the iView from the Portal (my RelatedActivitiesLauncherApp iView is a link into 'Related Activities' iView under 'Employee Search' iView), first appears the name of RelatedActivitiesLauncherApp iView and then my WDA.

From the SE80 I added your code into HANDLEDEFAULT method, but the external breakpoint in this method doesn't work. So, I can´t see if the function 'HR_ASR_WDA_GET_EMPLOYEE' is working or not.

I omitted other settings I should have done? Do you know why the external breakpoint in HANDLEDEFAULT does not work? Do I need to create more code in other WDA methods to see 'MSS01' in SAP memory?

Thank you for all your help.

Regards

Belé

Lee3
Active Participant
0 Kudos

Hi Belén,

as I said before I'm not a ABAP-er. The code works for us, so I can not tell you how you can solve your problem.

Sorry.

Joeri

Former Member
0 Kudos

Hi Joeri,

thanks you for help me.

I defined a resource (V_T7XSSSERRES) whit URL of PCD page and I defined a service (V_T7XSSSERSRV) with the 'Link resourse' and the service class: 'Web Dynpro Application ABAP'. I assigned this service to the subarea. These steps are OK.

In the Web Dynpro ABAP (in the Windows), I created 'DEFAULT' Plug Name (Interface = X; Plug Type = Startup). I copied your code in the Method HANDLEDEFAULT.

I'm debugging this function with an external breakpoint called from the Portal:

CALL FUNCTION 'HR_ASR_WDA_GET_EMPLOYEE'

EXPORTING

ID = 'MSS01'

IMPORTING

PERNR = lq_pernr.

When the function does this import the 'employee_tab' table is empty

IMPORT tab = employee_tab

FROM DATABASE indx(as)

TO indx_wa

CLIENT sy-mandt

ID id_int.

Do I have to implement another method to get the data or use another SAP memory area?

The lq_pernr in my wed dypro ABAP always is empty.

Thanks in advance.

Regards

Belé

Lee3
Active Participant
0 Kudos

Hi Belén,

did you also create a resource and service for your (abap) webdynpro? you need the service key for the appl iview. Like Markus described.

I can not give you advice about the code, because I'm not an ABAP-er.

gr

Joeri

Former Member
0 Kudos

Hi Joeri,

Could you solve this problem?

How can I add the iview to the related links and how can I get the persnr from the employee search to my webdynpro abap iView?

Thanks you very mutch

Regards

Lee3
Active Participant
0 Kudos

Hi Belén,

To add your iview to the related links:

Define a resource whit URL of PCD page the pcd location of your iview. Define a service Z_xxxxxxx and add the resource key in the 'Link recourse' field. Assign this service to the subarea MSS_HCM_SUB_RELATEDACTIVITY_ESS.

For the persnr:

http://help.sap.com/saphelp_nw04s/helpdata/en/42/c813b3d9cd6bb7e10000000a1553f6/content.htm

De quote:

Starting an Application

When a user calls the URL of a Web Dynpro application, the system generates and initializes an instance of the root component. Then the inbound plug of the interface view is called. When you call an application, you can use the event handler of the inbound plug to pass parameters. These parameters are defined as URL parameters

In the inboud plug :

method HANDLEDEFAULT .

  • The personnel number is stored in the memory space, put there by JAVA, retrievable only here.

  • Get the personnel number and put it into the componentcontroller

DATA: lv_id TYPE TEXT5.

DATA: lq_pernr TYPE pernr_d,

lv_pernr TYPE pernr_d.

DATA lo_nd_p0006 TYPE REF TO if_wd_context_node.

DATA lo_el_p0006 TYPE REF TO if_wd_context_element.

CALL FUNCTION 'HR_ASR_WDA_GET_EMPLOYEE'

EXPORTING

ID = 'MSS01'

IMPORTING

PERNR = lq_pernr.

lo_nd_p0006 = wd_context->get_child_node( name = wd_this->wdctx_p0006 ).

lo_el_p0006 = lo_nd_p0006->get_element( ).

lo_el_p0006->set_attribute(

name = 'PERNR'

value = lq_pernr ).

  • get single attribute

lo_el_p0006->get_attribute(

EXPORTING

name = `PERNR`

IMPORTING

value = lv_pernr ).

lo_nd_p0006 = wd_context->get_child_node( name = wd_comp_controller->wdctx_p0006 ).

lo_el_p0006 = lo_nd_p0006->get_element( ).

lo_el_p0006->set_attribute(

name = 'PERNR'

value = lq_pernr ).

endmethod.

But we have still a little problem, the first time you start your activity everything is fine. But if you select another employee and start the activity, the first persnr is still displayed. I am still looking for a solution.

Let me know if it works fine for you.

gr

Joeri