Skip to Content
0
Former Member
Mar 25, 2004 at 09:18 PM

error in simple "eventing" code : 'EPCM' is undefined"

55 Views

Hi

i need to achieve the following and we are on EP 5.0

error : 'EPCM' is undefined"

=================================================================================

left page | right page

=================================================================================

tab1(view1) |

tab2(view2) | displays "View" depending on the selection in the left page

tab3(view3) |

=================================================================================

if I click a link in iView1, I need to display iView2 in the right side of a page.

i see that we need to use eventing. As am new to portals, I couldn't able to make Eventing work.

I looked at PDK demos of eventing at sdn.sap.com and came up with something like this

I created 2 Java iViews using iViewEditor and had put the 2 iViews in a Page.

left iView has got tabs which should pass the iView links to the right iView (right side page).

I am getting the following error. 'EPCM' is undefined"

even if EPCM works, i am not sure if the iVIew link path, i am passing is correct to be displayed in the right side. i stored iViews in a role and trying to use that link.

============

Sender Event

============

<script>

document.domain = 'domain.com';

function CallIView(pageID){

EPCM.raiseEvent('domain.events', 'CallIView', pageID);

}

function GoToIView(iView) {

window.alert("Go to iView: " + iView);

}

</script>

raising an event

============

Receiver Event

============

<script language="javascript">

document.domain = 'domain.com';

if ((typeof EPCM) != 'undefined') {

EPCM.subscribeEvent('domain.events', 'CallIView', window, 'CallIView');

}

function CallIView(pageID){

var strURL;

document.frmPost("TEMPLATE_ID").value = pageID;

strURL = '<SAP_BW_URL>';

window.navigate(strURL);

}

</script>

I am very much thankful if any one can help me to solve this issue as I got to submit this immediately. I appreciate if anyone give me a chance to talk to you to look at complete code and discuss more in detail so that I make sure that what am asking is making some sense in this forum.

awaiting your urgent help.

thanks

Veeru