Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
rorymurphy
Advisor
Advisor
4,853

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!2fplatfor...), 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.pc...

23 Comments
former_member182638
Active Contributor
0 Kudos
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?
Former Member
0 Kudos
A
rorymurphy
Advisor
Advisor
0 Kudos
Hi John, the SRA  / DSM should work as normal in this scenario - the problems only occur if the nested_window mode is not activated.
Former Member
0 Kudos
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)
rorymurphy
Advisor
Advisor
0 Kudos
Hi Yoav, thanks for the info!
hofmann
Active Contributor
0 Kudos
This kind of blog is exactly what helps to solve real world problems.
Thanks for sharing this information.

br, Tobias
Former Member
0 Kudos
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
hofmann
Active Contributor
0 Kudos
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
a_heut
Participant
0 Kudos
does your solution also work using iframe in MOSS to show UWL?
rorymurphy
Advisor
Advisor
0 Kudos
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.
Former Member
0 Kudos
hi,

Thanks for the info.  I've tried to use your method.  But when I test it by putting the updated url in IE, it just simply directs me to the portal home page (http://portal:port/irj/portl/interop), not the Bex report page.

Anything wrong?

Here is what i did in my BW portal
1. create alias
2. modify the url
rorymurphy
Advisor
Advisor
0 Kudos
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.
Former Member
0 Kudos
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?

rorymurphy
Advisor
Advisor
0 Kudos
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
Former Member
0 Kudos
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...

If i change it using http://portl:50000/irj/portal/interop?NavigationTarget=http://snadc80p.na.dir.bunge.com:50000/irj/se...

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
rorymurphy
Advisor
Advisor
0 Kudos
Hi Lillian,

The URL http://portl:50000/irj/portal/interop?NavigationTarget=http://snadc80p.na.dir.bunge.com:50000/irj/se...
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...
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
Former Member
0 Kudos
Hi,

Thanks for the info.

I open a new topic for it.

Thanks again for your help
Former Member
0 Kudos

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

rorymurphy
Advisor
Advisor
0 Kudos

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

Former Member
0 Kudos

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

rorymurphy
Advisor
Advisor
0 Kudos

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

Former Member
0 Kudos

Hey Rory,

Thanks for your reply.

I have raised support message with SAP

Meessage number is AJAX Framework page not working in SharePoint integration ( 915236 / 2013 )

I have raised my problem in sdn also but could not make any luck.

http://scn.sap.com/thread/3429249

I would request any one to help me out with this.

Thanks,

Tisha

Former Member
0 Kudos

Hi Rory,

one short question... :smile: 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