cancel
Showing results for 
Search instead for 
Did you mean: 

How to make the 'TABLE' ui element to stretch to a determined height?

Former Member
0 Kudos

Hi, dear all:

I have one problem, i don't know how to resolve it. Can anybody help me, thanks in advance.

The requirement is :

In the View, i have 2 UI elements, one table and one Format-text.

The "TABLE" will be used to display the records of one DB which has 100 records in total. The "Format-Text" will be used to display some comment which is determined before. "TABLE" is placed above of the "Format-Text".

Take it simple, i provide the height of the "Format-Text" UI element is 100px.

Okay. Now, we need the height of our webdynpro should be stretched to 100% vertically of our monitor. That is too say:

(1). If the height of our monitor is '500px', the "TABLE" ui element should be streched to 400px vertically (500px - 100px)

If the 400px can not hold the '100 rows', then the 'TABLE' can be scrolled.

(2). If the height of our monitor is '1000px', the "TABLE" ui element should be streched to 900px vertically (1000px - 100px)

If the 900px is higher than "100 rows", then the left height should be placed with 'Empty rows' of table.

Can anybody be familiar with these requirement?

Please help me, thanks very very much!

Best wishes.

Accepted Solutions (1)

Accepted Solutions (1)

ChrisPaine
Active Contributor
0 Kudos

The problem here is not so much the height of the UI element - it's the number of rows that you need to display - unfortunately, in my experience this is not calculated from the height of the component, and you cannot know the height of the component in ABAP runtime. (you have exactly the same issue with setting table column scrolling by the way...)

You really only have one options, which isn't very good: specify that you show entire table to user (this may cause a performance hit if there are lots of rows in your table). (number of lines set to -1 works but is deprecated - you may need to code routines to get the size of the node and then bind this to visible row count). Place your table inside a scrollable transparent container - which is bad because you loose the headers when you scroll. Set the height of the scrollable transparent container to take up the rest of the page.

Former Member
0 Kudos

Ya..Thanks very much for your reply...

It seems one good solution, especially for the "2nd case" (if the height of total records of DB is larger than the height of the table UI element , now we can use one "Scrollable transparent container " to encapsule the "Table UI element" ). Ya, you also mentioned that : it will bring the adverse reaction that i will loose the "Header" of "Table" while scrolling. Thanks for your consideration of the dimensions of this problem.

However, About the the "1st case"(If the height of total records of DB is short than the height of the table UI element..). I should add "Empty rows" to the "Table" dynamically, even i also can not know how many rows should i add...

first i can measure the height of the "Monitor"; Second i cannot know the height of "one row" of "Table".

These are really disaster, blizzard...

Thanks very much for your kindly suggestion.

And can you also do me a favor to check the following another problem?Thanks hospitable expert.

Thanks & Regards.

Answers (1)

Answers (1)

Former Member
0 Kudos
u9876

Moderator Message: Please only English when replying.

Edited by: Neil Gardiner on Oct 11, 2010 9:31 PM