Web Dynpro – Challenges with Centering an Embedded View

Home / SAP / ABAP Coding / Web Dynpro – Challenges with Centering an Embedded View

Well, I spent way too much time trying to get this working just right, and I finally had to set it aside.  Maybe one of my great readers might be able to shed some clues on what I’m doing wrong, or perhaps you have the same issue 🙂  Anyway, I have redone my Rapier Application into ABAP Web Dynpro, and I really like the results.  The only problem is that when my browser is maximized, I can see that my embedded view isn’t centered properly on the screen.  It’s not a huge amount that it’s off, but enough to be noticeable.  What makes it even more maddening is that is seems to be related to whether the embedded view has one or 2 columns of data.  I can see a much greater shift if there’s only a single column…  Take a look…

blog-awdp layout-01

Now, I’m dynamically creating the elements in 2 columns.  The 2 columns will always be there.  I’m just generating what items show up and where in each column.  I mention that because the columns themselves are not dynamic…

 

 

blog-awdp layout-02

Now this one isn’t being generated dynamically, and it only has a single column of data to enter.  Not sure if either of these factors have to do with my issue, but you can see how the Login page is shifted further right than the create new user page.

Now, here’s some of the things I’ve tried… (and using this combination is what got me the closest to what I want…  but still room for improvement)

Main View (contains embedded views)
I have a transparent container with 2 subitems.  1 tree,1 view container.  It uses the gridlayout, and has 2 columns, I’m stretching it horizontally.  Layout-halign = beginofline.

Next, my view container underneath it spans 1 column and has the h-align = beginofline.

Next, the views.  I’ve made a point to set them all up the same way (especially these 2 that I’ve been using as my test case to get them both centered in the same spot).
In the RootUIElementContainer, is set to a single column and is NOT stretched horizontally.
For each of the elements below, I have both the element and layout for horizontal to be centered.  When I look at the screen, it looks exactly how I want it.  so it seems like the views are fine.  I just want this view to be centered on the open area in my screen.

So…  after all of that…  any ideas out there that I should try to see if I can get these centered?  or is this a limitation of AWDP?  I appreciate any help you might be able to lend me here 🙂

 

As always, thanks for reading and don't forget to check out our SAP Service Management Products at my other company JaveLLin Solutions,
Mike

Leave a Reply

Your email address will not be published. Required fields are marked *