cancel
Showing results for 
Search instead for 
Did you mean: 

Logoff button not available in NWBC in HTML iFrame

fabio_bellocchio
Participant
0 Kudos

Dear SCN,

due to a requirement for external access in our client, our SRM NWBC platform has to be embedded in an iFrame, in a custom HTML page. All seems to be working fine, and the external requirements have been fulfilled.

However, the logoff button, at the upper right corner, has vanished!

Please, has someone faced such a situation ?

What could be the reason for this unexpected behaviour ?

Any guess will be appreciated!

Thank you.

Fabio

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Fabio,

The logout button is removed whenever you use the ~canvas segment in the URL and use the window=embedded or window=app options. If you use window=main you will get the logout button back but also the header and the menu etc... that perhaps you do not want in an embedded iFrame scenario like you are describing.

This is standard behaviour. To change it you would need to make an enhancement to the standard code.

Hth,
Simon

fabio_bellocchio
Participant
0 Kudos

Thank you Simon.

In my scenario, this does not seem to be exactly what happens.

I mean, at least as far as I can see, because when I force these "parameters" (~canvas, window=embedded or window=app), in the URL, it still works fine when it is not in an HTML iFrame. With exactly the same URL, the logout button disappears in the iFrame.

This is my URL: http://<host>.<domain>:8000/sap/bc/ui2/nwbc/~canvas;window=embedded/sitemap/

In the other hand, even when I use the plain URL (../sap/bc/ui2/nwbc/), without the options you mentioned, still the logout button is suppressed from the top bar (when within the iFrame).

All this makes me think the Enhancement, as you suggested, would be the way to go.

In this case, would you know which component, in SE80, I would have to search for ?

Thank you very much.

Fabio

Former Member
0 Kudos

Hi Fabio,

Ok, I think I understand. It must be that NWBC is detecting that it is being opened in a frame (rather than in the main browser window) and removing the logoff in those scenarios. I would probably start by looking at the JavaScript (using the browser debugging tools) and trying to see if there is anything that is removing the logoff. The hard bit will be that the JavaScripts for NWBC aren't actually stored as files on the server that are easily modified... see my reply here:

http://scn.sap.com/message/16025468#16025468

In SE80 the main NWBC classes are /UI2/CL_NWBC* the you should find the RUNTIME and HTML classes, sorry I am not in front of a system, so I can't give you the exact class names. But this should help you find them

Hth,
Simon

fabio_bellocchio
Participant
0 Kudos

Thank you Simon.

Indeed the easy solution lies within the ABAP Class /UI2/CL_NWBC_HTML (method RENDER_BRANDING_AREA).

Unfortunately there is no time in our Project for exploring the "black box" of the NWBC javascript layer (as I suggest it is from your post), or for seeking a more elegant solution.

What I did was replacing the original ID of the logoff button in the rendering routine, so the javascript (that hides the button) will not find it in the user browser. It did the trick, and all is working fine (despite the undesired roughness of the solution).

Thank you.

Answers (0)