cancel
Showing results for 
Search instead for 
Did you mean: 

Web Dynpro ABAP Stylesheet - Portal Integration

Former Member
0 Kudos

We have a Web Dynpro ABAP being displayed through a Portal iView. The Portal server and the Web Dynpro ABAP server are separate. Our problem is in getting the Web Dynpro ABAP to use the stylesheet of the Portal.

We can make this work by forcing an external stylesheet (via application parameters, global Dynpro settings, or passed on the end of the URL), but we have to hard-code the full URI of the Portal stylesheet. This would be very hard to manage if we hard-code every iView's CSS location (or set every individual Web Dynpro's application parameters), and we want instead for the Portal to supply whatever the user's stylesheet is dynamically.

So what we want is: if we change the Portal stylesheet, the Portal would just pass the new stylesheet URI to our ABAP Web Dynpro iViews without manual modification of the iViews.

Here is an example of what works:

http://our-abap-server.com/sap/bc/webdynpro/sap/cprojects?sap-ep-themeroot=https://our-portal-server...

Shouldn't the Portal iView automatically pass sap-cssurl or sap-ep-themeroot to Web Dynpro ABAP? We have "Supply Portal Stylesheet" checked on the iView… it just doesn't pass anything to the Web Dynpro ABAP. Why wouldn't SAP pass this parameter dynamically to the Web Dynpro ABAPs? Is this a product error?

There seems to be a great deal of confusion about this on the SDN message forums... I think this may be the core issue.

We are using a 7.0 SP13 Portal with an ECC 6.0 SP12 backend.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Well,

this seems to be a bug in the WAS.

Look at note 1073498. This has a correction.

Regards

Answers (4)

Answers (4)

Former Member
0 Kudos

Now that you mention it, I ran into that exact same issue -- the application parameters didn't work for hard-coding the theme. The fix ended up being the web server semicolon thing I mentioned earlier (that was why the parameter didn't make it to the backend).

The themeroot is automatically sent to the backend from the portal, so you shouldn't really have to manually send it as a parameter anyways.

I'd suggest talking to your network guys. Also this could be the result of the SP you are on (we're on 13 for the portal and the backend system -- maybe this feature doesn't work in some earlier SP's?). There are also some options to force the theme as a WD application parameter on the backend side, which you could check into. Details on those are here:

[http://help.sap.com/saphelp_nw2004s/helpdata/en/7b/fb57412df8091de10000000a155106/frameset.htm]

Also you could look at the requests being made by installing HttpAnalyzer in your browser. You can inspect "post" parameters going from the portal to the backend system. One of those posts (the first one to the backend system) should contain the parameter sap-cssurl (same kind of thing as sp-ep-themeroot). This is where our problem turned up as this parameter was not being posted.

Lastly, make sure that your frontend portal and backend portal are in the same domain. For instance:

frontend.domain.com

backend.domain.com

If your backend and frontend are in different domains it messes all kinds of things up, including stylesheets I think. If you can't get around this, then read about domain relaxing (but I highly recommend getting the domains the same).

When we started, ours were:

portal.dx.company.com

sap.company.com

This created all kinds of problems. Putting our systems in the same domain with the same protocol and fixing our little semicolon web server problem fixed basically all of our portal complaints. Up until that time, we had also had many problems with session management (backend sessions were getting stuck until the HTTP timeout).

That's all I know. Good luck.

Former Member
0 Kudos

I forgot to answer the other part of your question. You can override the stylesheet via the themeroot parameter... for example:

https://www.eccserver.com/sap/bc/webdynpro/sap/cprojects?sap-ep-themeroot=https://www.portalserver.c...

Also you could apply a global default by running this backend program:

https://www.eccserver.com/sap/bc/webdynpro/sap/wd_global_setting/

I think that's available as of SP13...

Enjoy!

TomS2
Explorer
0 Kudos

hi and thanx for your input

i get this working all fine with sap-ep-themeroot in the url when i run the WDA-application directly, but when i run it from a WDA-iview in the portal i can't get it working. should this be possible?

i have tried both by setting the parameters in attributes "Application Parameters" and "Parameters Forwarded to Web Dynpro", and to add them directly to the url you get from the portal when running "preview" on the iview.

debugging CL_WDR_UCF tells me the request has no value for either parameters sap-ep-themeroot or sap-cssurl.

any input?

cheers

tom

Former Member
0 Kudos

Yes we did figure this out. Some time in the past, someone configured our web server to drop semicolons from the URL request, because they were not supported by the web server for some reason. This resulted in a lot of information being lost between the browser and the backend system, which included the stylesheet information.

In addition to that, we also needed to apply note 1073498.

If neither of those work, set a debug point in class CL_WDR_UCF, method DETERMINE_THEMEROOT and access the portal and you will see what the problem is. This is the code that determines which stylesheet to use. Then you can search for a stylesheet note in application area BC-WD-ABA... there are quite a few. I bet you'll find the one that fixes your problem.

Former Member
0 Kudos

We already have that note in place. The bug would seem to be on the portal side, because it is not telling the R/3 side what stylesheet to use. The code in the class that is specified in that SAP note indicates that a sap-ep-themeroot or sap-cssurl parameter must be sent by the portal for a an external stylesheet to get applied.

Any other ideas?

Former Member
0 Kudos

No, you definetly do not need to put that themeroot parameters when using directly in portal.

The problem you describe mostly occurs if the support package of the ABAP stack is higher than portal stack.

But maybe the version of your customer style sheet is older than the version of the ABAP standard theme.

Therefore try the parameter WDFORCEEXTERNALSTYLESHEET = X at the Web Dynpro Application.

TomS2
Explorer
0 Kudos

hi

did you solve this problem? we're getting the same.

another question along the same lines:

- how do you make the WDA application use a theme existing on the portal, but another one than the theme the portal are currently using? do you have to send the theme-root parameter?

cheers

tom