cancel
Showing results for 
Search instead for 
Did you mean: 

Data transfer from EPCF events

Former Member
0 Kudos

I have a regular(non-web dynpro) iView which is firing event & sending data using client data bag. It uses EPCF to send the event.

EPCM.raiseEvent(bla bla bla);

EPCM.storeClientData( XYX);

I have 2 more listener iViews on the same page. One of the iViews is a regular iView which uses JavaScript & subscribe to the event. Then gets the data using

EPCM.loadClientData("XYZ","ABC");

Everything is working fine on this iView. I get the event as well as parameters from sender iView.

I have another iView which a web dynpro iView. This web dynpro iView also subscribes to the same event & tries to read the data. Inside my web dynpro iView, I am able to get the event but the IWDCustomEvent event object does not contain the data/parameters transferred by the Sender iView. How can I read the data stored in the client data bag inside my web dynpro iView? If it's not possible then is there a workaround which DOES NOT REQUIRE CHANGING THE SENDER iView?

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos
Former Member
0 Kudos

When u raise event from the sender Use the following syntax:

EPCM.raiseEvent(namespace,eventname,dataObject);

Here this dataObject is the parameter u want to pass to the webdynpro.

From webdynpro side u can access the parameter in the eventhandler which u create while subscribing the event.

This dataObject will be automatically passed to the eventhandler... so u can access that.

Try it out and please let me know the status.

Thanks & Regards,

Sirisha.R.S.

Former Member
0 Kudos

Hi, Sam:

There is a solution.

in your web dynpro, you can define an action with a parameter "dataObject". Remember, the name of parameter must be "dataObject". and type is String

then you can subscribe this action.

In you non-web dynpro iview,you can use EPCM.raiseEvent(namespace, name, dataObject) to call this action, the 3rd parameter of EPCM.raiseEvent is the data you will transfer to the web dynpro iview.

When EPCM raise event, it can pass the dataObject to web dynpro

Former Member
0 Kudos

How does the dataObject workaround work? Is this the ONLY way SAP supports data trasfer between regular iView & web dynpro application or this is just a back door???

Former Member
0 Kudos

Sach:

Currently, this is the only way i know

Former Member
0 Kudos

Yes Sach this is the way we have to do..

R u able to do it?? or r u facing any problem in that?? if so let me know..

Thanks & Regards,

Sirisha.R.S