Skip to Content
author's profile photo Former Member
Former Member

Client side eventing between MSS teamviewer and BSP application

HI,

I'm trying to set up an eventing between standard MSS teamviewer and a BSP application in EP .6.0 SP2. The applications run on different servers but the two servers are on the same top level domain.

The standard MSS teamviewer is placed in the Dynamic navigation part of the page and the iView based on the BSP application is placed in the normal Page content and has isolation method "url"

The standard MSS teamviewer raises an event when clicking on an employee in the list (handleObjectChange). Here is an extract of the code

<script>

EPCM.relaxDocumentDomain();

function handleObjectChange(otype, concatenatedKey) {

HCMEP_setCookie("urn:com.sap.pct.hcm.orgmanagement:CurrentObject", concatenatedKey, null, "/");

setDataBags(otype, concatenatedKey);

raiseEvent(concatenatedKey);

}

function setDataBags(otype, concatenatedKey) {

EPCM.storeClientData( "urn:com.sap.pct.hcm.HCMCKey:CurrentObject", otype, concatenatedKey);

EPCM.storeClientData( "urn:com.sap.pct.hcm.HCMCKey:CurrentObject", 'A_ALL', concatenatedKey);

EPCM.storeClientData( "urn:com.sap.pct.hcm.HCMPlvar:CurrentObject", 'A_ALL', '01');

EPCM.storeClientData( "urn:com.sap.pct.hcm.HCMSystIdent:CurrentObject", 'A_ALL','SAP_R3_HumanResources');

}

function raiseEvent(concatenatedKey) {

<b>EPCM.raiseEvent( "urn:com.sap.pct.hcm.orgmanagement:CurrentObject", "objectChanged", concatenatedKey);

}</b>

function handleComponentEvent(eventObj) {

var cKey = window.HCMCKey;

if ((cKey != null) && (cKey != ""))

{ EPCM.raiseEvent( "urn:com.sap.pct.hcm.orgmanagement:CurrentObject", "objectFor" + eventObj.sourceId, cKey,"A_ALL" ); }

}

</SCRIPT>

So in my BSP iView that receives the event I wrote:

<html><head>

<SCRIPT src="/sap/public/bsp/sap/public/bc/htmlb/airbus/epcfproxy.js"></SCRIPT>

<script language=javascript>

// EPCM.relaxDocumentDomain();

function myreceiveEvent( eventObj ) {

alert(eventObj.dataObject);

}

<b>EPCMPROXY.subscribeEvent( 'urn:com.sap.pct.hcm.orgmanagement:CurrentObject', 'objectChanged', myreceiveEvent );</b></script>

</head>

<body>

</body>

</html>

When I put the two codes on the same server (WAS) and use EPCM instead of EPCMPROXY, everything works fine.

Do you know what is missing ? Is it something related to domain relaxing?

Thanks for your support,

Silvia.

Add a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on May 04, 2004 at 11:00 PM

    Did you see in the source code of the BSP iView, the

    presence of src link to EPCMPROXY object or to any

    file which contains that object ?

    What did you selected as the load method of the two

    iviews ? I believe it should be "Bybass the iView server".

    If it is the case of domain relaxation problem, you can

    figure it out by looking at the browser status bar (right

    hand side, lower). If it is any thing like 'unknown zone(

    mixed)', it is the problem. You may try to include the

    address of both the servers in the trusted sites list

    of the 'intranet' or 'internet' zone. Tools --> internet

    options --> security --> internet/intranet

    Hope this helps,

    --Prasad Nutalapati

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hello Prasad,

      I have a similar problem. I created an BSP application, with which I test the epcfproxy functions. The problem is that the WAS server is in a completly different domain than the Portal server, and they are connected through the internet. I cannot use the epcf functions, I always get the error "Permission denied". Could you please provide some help on this?.

      Dusan Skokanek.

  • author's profile photo Former Member
    Former Member
    Posted on Jun 11, 2004 at 04:10 PM

    Hi.

    I solve your problem.

    you hava problem at method name.

    you need to replace myreceiveEvent to <b>"myreceiveEvent";</b>

    when you subscribeEvent. I mean you need to add " to make correct methoname.

    EPCMPROXY.subscribeEvent( 'urn:com.sap.pct.hcm.orgmanagement:CurrentObject', 'objectChanged', <u><b><b>myreceiveEvent</b></b></u> );

    Best regards,

    Joonpyo Park

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Amy.

      I got it. You need to change your code like this.

      you need to add window object as parameter for calling EPCMPROXY.subscribeEvent function.

      Please change your code like this.

      EPCMPROXY.subscribeEvent( 'urn:com.sap.pct.hcm.orgmanagement:CurrentObject', 'objectChanged', <b>window,</b> 'myreceiveEvent' );

      Thanks,

      Best regards,

      Joon.

  • author's profile photo Former Member
    Former Member
    Posted on Nov 18, 2004 at 02:21 PM

    Hi,

    I have the same problem. I always get the error "permission denied" when I try to call the EPCMPROXY method, which just puts "parent." in front of the method called. Anyway, my BSP is on a different host than the portal, but within the same top level domain. Domain Relaxation is done and I tested that with 2 BSPs on different hosts.

    I created a page including the MSS teamviewer and my BSP. Can do what I want, I just can't fix it - alway "permission denied".

    Here is my code of the BSP:

    if ( document.domain.indexOf(".") > 0 ) document.domain = document.domain.substr(document.domain.indexOf(".")+1);

    function run() {

    EPCMPROXY.subscribeEvent( "urn:com.sap.pct.hcm.orgmanagement:CurrentObject", "objectChanged", window, "handleEvent");

    }

    function handleEvent( evt ) {

    alert(evt);

    }

    </script>

    <body onLoad="run();">

    </body>

    Hope anybody can help!

    Message was edited by: Sebastian Grabherr

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Sebastian,

      If you are using domain relaxation, why do you check it in your code as well?

      ==> (if ( document.domain.indexOf(".") > 0 ) document.domain = document.domain.substr(document.domain.indexOf(".")+1);

      Maybe you can remove it and try again...

      Cheers,

      Noel

  • author's profile photo Former Member
    Former Member
    Posted on Nov 25, 2004 at 09:36 AM

    Hi,

    I have also encountered the error (EPCMPROXY is undefined) when I have two different iViews on the same page subscribing to the MSS teamviewer. If I remove either one of the subscribing iView, then there will not be any runtime error.

    Anyone knows what is causing this problem?

    Part of my codes as followed:

    ...

    <SCRIPT src="epcfproxy.js"></SCRIPT>

    <script language=javascript>

    var lnDotPos = document.domain.indexOf( "." );

    if (lnDotPos >= 0) document.domain = document.domain.substr( lnDotPos + 1 );

    EPCMPROXY.subscribeEvent( 'urn:com.sap.pct.hcm.orgmanagement:CurrentObject', 'objectChanged', window, 'myreceiveEvent' );

    function myreceiveEvent( eventObj )

    {

    var dataKey=eventObj.dataObject;

    Emp1.EmpID.value = dataKey.substr(6,8);

    Emp1.submit();

    }

    </script>

    ...

    Regards,

    Seow Ting

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.