*Updates on this weblog:*
Christmas is over, hope you all had a good time with your families. Did you also get presents? Maybe even the ones you were waiting for? Just as much as you want your gifts to meet your wishes, you might want your BSP application to look a certain way, representing your company’s CI, ...
So, after several promises and even more delays I finally got around to save a few quiet minutes, sit down and write some lines to share my hands-on experience about custom designing BSP applications.
First let’s have a look how CSS is used in BSP applications, so we know where and how to implement our own style. If you have a look at the HTML source that is created when requesting a BSP application, this is what you get for the head section (ZPL_MVC_VPLANER being the application and FH_THEME1 the MIME folder):
For our current application in development I chose the way described as follows:
As I expected many changed and special design needs I decided to go with the good old "make a copy to modify" way. As you might know there are 5 themes present in your MIME repository (located in the folder /SAP/PUBLIC/BC/UR/Design2002/themes). I chose one of them (sap_chrome) to be the foundation for my own design. But how to copy, study and change this theme in an effective way?
So, after fighting through the basic stuff, all that is left is altering the theme style files the way you want your design to be. Here are some hints on how to accomplish that:
Once you got a tool, you only need to know where to apply it - this is how I find out what classes to modify:
Call the test application SBSPEXT_HTMLB in your browser, navigate to the example page for the element you want to change, and view the HTML source for the right frame. Let’s use htmlb:Tray for an example here and look at a part of the HTML code:
!1x1|width=1|src=1x1! | !1x1|width=1|src=1x1! |
|
After we got our design finished, it’s also important to keep in mind that with an SP upgrade of your system the BSP extension elements may change, and with them their style definitions. When moving from SP 42 to 44 there were several new files added to the theme folder, and the CSS files did change quite a lot. But from 44 to 46 there haven’t been any changes in the files I checked (only two added images). I don’t expect any big changes in upcoming 6.20 SPs, at least not for existing elements.
But the design thing is not to forget about when upgrading your system. I always keep a local copy of the basic theme I use, which I compare to the theme after applying new SP. If there are differences in the CSS files that I changed, I go through them one by one, and try to "merge" the new theme CSS file with my own, changed file. Nasty work to do if there are many differences, but as mentioned, move from 44 to 46 didn’t change anything there (for my changed files), so I’m quite positive about the future 🙂
While some of my examples may have helped you to save time, always remember that implementing a custom design is not a job you’re going to be finished with before lunch. If your marketing department is picky about details, designing web applications can become the least enjoyable thing to do. But if you are on your own (or have some very co-operative and understanding colleagues) then maybe you can find a good way to not totally altering the basic theme while still adding your note to it.
As you can read in the comment, Sergio Ferrari pointed out that there is a Theme Editor included in the EP or ready for download as Eclipse Theme Editor, which can be downloaded from SDN in the "Developer or Administration Tool" area.
He also states that
"+... it's really a well done tool. I installed it yesterday; it works in Netweaver Developer Studio but I'm not able to get it working in Eclipse.
There is a nice Preview interface and all the classes are grouped by HTMLB:object. Also PHTMLB elements are mapped.
It reads/writes from FileSystem and the directory structure is the same as expected by the SAP Web AS.
The guide is available at:
I didn't test it myself (EP is not used in our company yet), but if I get to work with the Theme Editor one time I will write some more about it (unless someone hasn't done so already by then).