Skip to Content

Of course the SAP NetWeaver Enterprise Portal is the only portal framework you’ll ever need, but what if you have an existing website – based on a third-party or custom framework – and you want to embed content from your Enterprise Portal there (either the full EP page or a specific iview)? If using FPN isn’t an option for you, you might proceed like this: you determine an appropriate URL to launch the content (for instance, for a BW report, you use something like: http://portal.domain.com/irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fcom.sap.pct!2fplatform_add_ons!2fcom.sap.ip.bi!2fiViews!2fcom.sap.ip.bi.bex?QUERY=ZTEST ), and specify this URL as the source of an iframe. Then you call your webpage and … you encounter lots of difficulties. Difficulties like:

– if calling application integrator content (e.g. a BW report, BSP, or WebDynpro), you may see an error like ‘Application <X> will run with a  wrong client window id’. You may also experience session management issues.

– you may see javascript errors like ”EPCM.getSAPTop().gHistoryFrameworkObj’ is null or not an object’

– if you’re calling the EP content from SAP BusinessObjects InfoView, the content doesn’t return and the page stays loading.

These difficulties arise because the portal javascript code assumes by default that the portal is loaded in the top frame of the current window. Since EP6.0 SP13, the EPCM.getSAPTop() method was implemented to enable referencing the sap portal in an iframe or frame of another system. To configure this method, you need to carry out some simple configurations to ‘alert’ EP that it is does not own the window.

These steps are already documented in the guide

How To … Interoperate SAP Enterprise Portal and IBM WebSphere Portal Server

. The document is targeted at IMB WebSphere, but the relevant steps are applicable to all siutations where EP content is loaded in an external iframe. The requisite steps are described in particular in point 4.2.1.1.

As this document might not be easily found by someone facing such an issue, especially for a platform other than WebSphere, I want to highlight the relevant steps in this blog. Please note that integration of content from two different portals might present complexities across multiple points, and other issues like SSO, cross frame scripting, theme integration etc. are not considered by this configuration.

The general approach is to define a special URL alias for calling the portal, and maintain the parameter nested_window=1 for this alias. Then, when the portal is called using this alias, there is a changed behaviour in certain JavaScript methods that generally require the SAP EP to run in its own browser window.

Step 1. Define Your Alias

The alias must be set in the web.xml file, located in the directory \usr\sap\<SID>\<NO>\j2ee\cluster\server0\apps\sap.com\irj\servlet_jsp\irj\root\WEB-INF.

In the web.xml, make a copy of the init-param element whose param-name element has the value portal. In the copy, change the param-name value to portal/interop, and then append nested_window=1 to the value for param-value.

The following is an example of such a init-param element:

<init-param>

     <param-name>

          portal/interop

     </param-name>

     <param-value>

          anonymous=0,proxy=0,low_bandwidth=0,include_in_url=1, include_application_name_in_url=1,nested_window=1

     </param-value>

</init-param>

You need to restart the WAS Java after enabling the ‘interop’ link.

Step 2. Update Your Links

Secondly, you need to adapt the link which opens the EP content to include the the interop alias. Whenever you enter the portal with the URL http://portal.domain.com/irj/portal/interop, the portal works in nested mode. The best approach is to enter this alias in a URL using the NavigationTarget syntax, something like this:
http://portal.domain.com:50000/irj/portal/interop?NavigationTarget=pcd!3aportal_content!2fcom.sap.pct!2fplatform_add_ons!2fcom.sap.ip.bi!2fiViews!2fcom.sap.ip.bi.bex?QUERY=ZTEST

To report this post you need to login first.

23 Comments

You must be Logged on to comment or reply to a post.

  1. John Moy
    Rory, thanks for this blog.  It could be very useful.  Do you know if there is any impact on DSM (session termination) when taking this approach?
    (0) 
    1. Rory Murphy Post author
      Hi John, the SRA  / DSM should work as normal in this scenario – the problems only occur if the nested_window mode is not activated.
      (0) 
      1. Dennis Föllmer

        Hi Rory,

        one short question… 🙂 What do you mean with “nested_window” mode? Am I able to configure DSM that it works in iFrames also?

        Thanks for a short reply.

        Cheers,

        Dennis

        (0) 
  2. Yoav Cohen
    Hi guys!

    Nice blog! A small remark: notice that in the next release of the portal (7.3) we are delivering an ‘interop’ alias out of the box for exactly this scenario. To not be affected by our new alias I would recommend using a different alias.

    Cheers,
    Yoav (EP 7.3 Architect)

    (0) 
  3. Johannes Strittmatter
    Hi Rory
    This is a very valuable blog!
    For another topic related to configuration in the web.xml I am looking for documentation about the different variables i.e. the “proxy=0”. Documentation in help.sap.com does not explain what happens if you set other values.
    Regards Johannes
    (0) 
    1. Tobias Hofmann
      Johannes,
      sadly SAP Help is not explaining all parameters and their values. To know other values you can open an OSS message and ask them to clarify the possible parameter values.

      br, Tobias

      (0) 
    1. Rory Murphy Post author
      Hi Angélique, it should be the same – I haven’t tested it personally but the general steps are the same whenever a portal iview is loaded in an iframe owned by another framework.
      (0) 
    1. Rory Murphy Post author
      Hi Lillian,

      I assume you used the NavigationTarget syntax in the URL? Did you use the pcd location of the bex iview as in the log, or of another iview in a role? If you used a role iview, you need to ensure the role is assigned to the user in question. If you used the bex iview, you need to ensure that the user has permission to the iview (if you don’t have authentication in place, Everyone should have end-user permission to the iview and its associated system object, and the authscheme for the iview should be anonymous).

      Hope it helps.

      (0) 
  4. Lillian Mao
    Hi,

    Many thanks for the quick reply.

    Yes, i used the NavigationTarget Syntax and I tried both iview with no luck.

    Here is my question

    1. if I use bex iview, what kind of syntax i need to change?

    2. if i use the role iview, what kind of url I need to use?  Do i use the preview url and modify it?

    (0) 
    1. Rory Murphy Post author
      Hi Lillian,

      Whichever iview you use, you just have to enter its (URL-encoded) PCD Location in the NavigationTarget property. In the example, the PCD Location of the iView is pcd:portal_content/com.sap.pct/platform_add_ons/com.sap.ip.bi/iViews/com.sap.ip.bi.bex

      Regards, Rory

      (0) 
      1. Lillian Mao
        Rory,

        Many thanks.

        It worked on my role iviews now.  But not the Bex iview, the BW developer created from Bex.

        The url he gave to me is like this

        http://portal:50000/irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fcom.sap.pct!2fplatform_add_ons!2fcom.sap.ip.bi!2fiViews!2fcom.sap.ip.bi.bex?TEMPLATE=ZCFC_M01_W01&DUMMY=0

        If i change it using http://portl:50000/irj/portal/interop?NavigationTarget=http://snadc80p.na.dir.bunge.com:50000/irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fcom.sap.pct!2fplatform_add_ons!2fcom.sap.ip.bi!2fiViews!2fcom.sap.ip.bi.bex?TEMPLATE=ZCFC_M01_W01&DUMMY=0

        it leads me to the portal home page as it seems like portal does not know where it is in PCD.

        Anythingelse i need to do to make it work with Bex iview without create a role iview in PCD?

        Thanks again for your help.

        Lillian

        (0) 
        1. Rory Murphy Post author
          Hi Lillian,

          The URL http://portl:50000/irj/portal/interop?NavigationTarget=http://snadc80p.na.dir.bunge.com:50000/irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fcom.sap.pct!2fplatform_add_ons!2fcom.sap.ip.bi!2fiViews!2fcom.sap.ip.bi.bex?TEMPLATE=ZCFC_M01_W01&DUMMY=0
          doesn’t make any sense, the NavigationTarget is supposed to point to a PCD location, but you’ve included the protocol, host and port as well. Strip it down to the PCD location only:
          http://portl:50000/irj/portal/interop?NavigationTarget=pcd!3aportal_content!2fcom.sap.pct!2fplatform_add_ons!2fcom.sap.ip.bi!2fiViews!2fcom.sap.ip.bi.bex?TEMPLATE=ZCFC_M01_W01&DUMMY=0
          This is exactly like the URL I gave as an example in the blog.

          I hope it helps. In case of further questions, it would probably be best to open a forum topic, since this begins to depart from the subject of the blog towards basic use of the NavigationTarget syntax.

          Regards, Rory

          (0) 
  5. Tisha Banerjee

    Hello Rory,

    Thanks for the blog,it helps me in my current scenario.

    I have trying to integrate the whole portal with SharePoint.

    As now in 7.3 we have out of box Interop alias,and I am using that.

    Only change I have made is to remove the interop framework and adding Ajax framework

    but the problem is it doesn’t load the whole portal with tabs.

    But if I remove Ajax Framework and add Classic framework it works fine.

    Can you tell me where I am missing.

    Thanks,

    Twisha

    (0) 
    1. Rory Murphy Post author

      Hi Tisha, not sure if you already managed to resolve this issue but for what its worth … the more typical scenario is to load the page without the masthead and navigation, but your scenario should also work. Is it possible you use an incorrect URL to the portal, e.g. with NavMode=3 (should be e.g. NavMode=2 for your scenario).

      Regards, Rory

      (0) 
      1. Tisha Banerjee

        Thanks Rory for your reply.No I haven’t managed this yet.

        I have tried many permutations and combinations about masthead and navigation.

        I have tried NavMode=2 even without TLN only making DTN=0,this helped all the TLN ,to be inside DTN.This also did not help me.I tried creating a url iview of my dev portal in my sandbox portal and guess what same thing.Might be this is related to cross domain scripting,so browser blocks the AJAX script?I am not sure actually still giving a try to append http header with Access-Control-Allow-Origin=* . Today I will see the outcome in the server and if I get a positive outcome would let you know.

        Thanks,

        Tisha

        (0) 
        1. Rory Murphy Post author

          Hi Tisha, I should have tried it before responding. On a 7.30 portal I see the same behaviour as you with the AFP – the TLN and DTN iViews are never loaded once the portal is nested inside any kind of iFrame. It doesn’t look like a cross frame scripting error since the browser doesn’t raise any script error notifications. Seems like the JavaScript calls to trigger the loading of these iViews is simply never triggered once the AFP is called inside an iFrame. If you haven’t already done so I would suggest opening a support message to check whether this behaviour is intentional for the AFP inside iFrames.

          Regards, Rory

          (0) 

Leave a Reply