cancel
Showing results for 
Search instead for 
Did you mean: 

Webdynpro does not fit user's screen

Former Member
0 Kudos

Hi All.

How can we make sure that the webdynpro screen fits the user screen whatever resolution he might be using Without horizontal scrolling?

I have tried all layouts. But if my table or any particular row is too wide, automatically horizontal scroll comes.

I tried to put RootUielement width to 100% thinking that it means 100% of screen. But no luck.

Any suggestions please?

Thanks in adv.

Accepted Solutions (1)

Accepted Solutions (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Have you ever heard the saying - You can't put 10 pounds of dirt in a 5 pound bag (of course my grandfather didn't use the word dirt when he told it)?

You can use the Flow Layouts and set trays and containers to 100%, but sometimes you just are going to have too much information.

For instance with a table. If you have more columns than what can fit into 100% of the screen with; what would you expect to happen? The rendered output will try its best to fit within the screen, but if it simply isn't possible (as in the case of a table that is too wide) it will produce browser scrollbars. If you need to avoid this, you can set the scollableColCount attribute on the table and reduce its width.

Former Member
0 Kudos

Thanks Thomas.

You suggested 2 things:

1 - set scrollablecolcount -> This i understand will fix how many columns will be displayed. Rest will appear as a Table scrollbar, not as Browser scroll bar.

2 - Reduce width: Why is this needed in conjunction?

Ideal scenario would be that we fix exactly as many columns as are there in the table - say 14, so we fix scrollablecolcount to 14. Then we reduce the width to some% so as to fit the screen. Is it what you meant Thomas?

By the way, when we specify width, what is SAP's recommended way -> Is it in percentage or in Pixels? (are there any other units we could specify? I know only these 2).

Thanks again in adv.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>exactly as many columns as are there in the table - say 14, so we fix scrollablecolcount to 14

Why would you do that? If yo uset scrollableColCount to the same number of cols that are in the table it has no effect. You might was well just leave the property alone. It is only useful if you want to restrict the number of columns shown on screen.

>Then we reduce the width to some% so as to fit the screen.

Yes but keep in mind that this will only work if there is still enough room to display all of the data. The % and pixel widths only work to widen the table, they don't restict it if there isn't enough room. What would want the rendering to do - cut off part of the table?

>when we specify width, what is SAP's recommended way -> Is it in percentage or in Pixels?

Both are supported so it depends upon your needs. Are you designing for a very specific width that won't change as the window is resized - then use pixels. Otherwise use percent.

>are there any other units we could specify?

Pixel and percent are the most common, although any CSS Unit of Measure should work. Here is a complete listing:

http://www.devx.com/projectcool/Article/19850

A couple of tips - don't mix units of measure between your table columns and the table width itself. The size of the cell content always overrides the column width and/or the table width. That is why if you have too much data or too many columns your only way to reduce the total width of the table is to use the scrollable columns to reduce how many are displayed at once.

Answers (1)

Answers (1)

TomVanDoo
Active Contributor
0 Kudos

there is,

First of all, use row layout with wrapping everywhere.

Matrix layout and gridlayout will try to show a fixed number of columns, which will inevitably lead to scrolling if the window is resized.

secondly, instead of using tables, or alv's, which will drop off the screen once it gets to small, use a rowrepeater.

It will create a container for each of the records in the table node.

In this container you can freely add uiElements to represent your data. using the row (or flow) layout with wrapping here will make sure that all your data is contained in the screen, no matter how small it is

do note, the vertical scrollbar will still be there and will still be needed.