Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
ChrisSolomon
Active Contributor
    The iView Personalization feature is new as of EP7 (aka. EP7 NW04s .aka. NWP7….thanks once again SAP Marketing!) It simply allows a portal administrator (and even end-users!) to make several user interface changes to WebDynpros through an iView. You can change text labels for an input field such as changing “Preferred Name” to “known as”. You can change the text on labels such as changing “Submit Form” to simply “Submit”. You can hide unwanted fields as text. You can mark fields as required or read-only. You can rearrange the order of fields and elements on the screen. You can even add text to the screen (aka. “decorative” elements). It eliminates much of the tedious work performed by developers in the past. From the administrator’s perspective, the actual personalization settings are kept with the iView and are transportable as such. One of the nice effects of this is that we could actually have several different customized/personalized iViews for the same underlying WebDynpro! (find more info on iView Personalization here: help.SAP.com documentation)

But what do you do when the simple appearance type settings are not immediately exposed to you through the personalization settings? Well, if you are like me, you poke around here and there, fiddle with it a bit and come up with a hack to get to work for you. I'll call this one Solomon’s Style-ish Hack just cause it’s fun to name things after yourself. (haha)


This hack was born out of a forum question in the “ERP Employee Self-Service” forum by one “John Lennon” (real name?). He asked if anyone knew how to change the column colors on the CATW timesheet for Saturday and Sunday only. When he said he was on ECC 6 and EP7, I thought right off  “sure….this will be easy in iView Personalization!”, but I was wrong. To my surprise, there were no settings for column color or the like. So I started to poke around a bit…. (note: this assumes that our columns will always be in the same position. With timesheets, different profiles could have different column positions, but we will assume they will all be the same)

The standard WebDynpro screen for the timesheet appears as follows:






 

By selecting (clicking) the column header for Sunday (the dark brown header showing “SU 08/19”) and then starting personalization (ctrl + right-click), I could see the following parameters were available for the header of the column:

 



 

Now, from my web development past, I know that most of your appearance kind of settings (width, color, alignment, etc) are typically set in style sheets or directly in the “style” parameter. Furthermore, they have the appearance of:

                                       style=”(property):(value);(property):(value);….”

Simply, colons divide a property and it's value, and semi-colons divide properties from each other. Right off, I noticed the “width” parameter with a value of “6ex”. I guessed that SAP must placed the quotes around this field (and maybe even the ending/closing semi-colon). Much like a SQL Injection hack (another discussion), I simply thought I would expand the value by adding in my own style properties. So, for the “width” parameter, I entered,


                                                     6ex; background-color: red

 

(note: do NOT put a semi-colon on the end! )

as shown below:

 



 

When I applied and accepted the change, I was pleasantly surprised to see that it had my desired effect:

 



 

Next, I wanted to change the colors of the table cells in my column to match. This is where I hit a bit of a snag. I selected the first of my input columns and opened personalization as shown.  Here, I seemed to only have the “width of input field” parameter that might suffice. I entered,

                                                      ; background-color: red

By entering the semicolon at the beginning, I was in effect closing the setting for the width parameter and then adding my own into the “style” string.

 



 

Again, I applied and accepted the change. However, this had the unwanted impact of not changing the entire cell color as shown:

 



 

I tried and played with many of the available parameters but nothing seemed to work. This seemed ok to me however since why would I change the color of a cell if it accepted input? So, I decided to mark the field as “read-only” as shown:

 



 

With this change, I got the result shown below which is exactly what I had wanted! It was an odd side-effect, but it worked.

 



 

Well, I knewmy cells would be editable, so I changed those settings back. Just for grins, I wanted to see how much more I could change on my column header just to show a little variety. I picked some easy ones. For the “Width” parameter, I entered:

                                6ex; color: white; font-weight:bold; background-color: red

 



 

As expected, this was the result:

 



 

 

 

Gotchas

A few things to keep in mind when making personalization changes:


  1. Make sure you are personalizing in "admin mode". You will do this under the "Content Administration" area in the portal. Typically, I do this from the immediate "Portal Content" area by opening the iView and then "Previewing" it to make my changes.


  2. Make sure you are making personalization changes to the iView that end users will be using within their role. From what I have seen (and it makes sense), personalization is not delta-linked. Therefore, if you change an original iView, but your delta-linked one is what is exposed to end users, they will not see the personalization changes.


  3. You may want to make sure that you mark your changes as "final" (checkbox on right side of personalization pop-up) or just disable end user personalization all together (did you know that you can ctrl+righ click on a webdynpro as an end user and get all kinds of personaliztion options too?!?!) I like to call this "protecting the user from themselves...haha.


 

As you can hopefully see, with a little “creative thinking”, you may be able to personalize far more than what is explicitly exposed to you in iView Personalization parameter settings. Give it a try!

20 Comments
Labels in this area