cancel
Showing results for 
Search instead for 
Did you mean: 

regarding table in webdyn

Former Member
0 Kudos

table has a property 'visiblerowcount'

if i bind value dynamically to this i am not getting

the desired o/p.

what can i do ?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi jean liker ,

create an attribute for visible rowcount and bind the attribute to the property visible rowcount of the table.

when you click the button to add row change the value of the attribute to 6 if its five earlier. this way will work in almost all case

if you are doing in this way try an alternative.

in modify view get focus to the Table using the class cl_wd_table and there is a method in the class to change the visible row count.

Regards

Sarath

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Perhaps you could tell us what the desired output is?

I assume that you want to put a number in an inputfield and that number should be used as the visible number of rows?

Regards,

Jos

Former Member
0 Kudos

I have a button to add new row to the table.

the static value of 'visiblerowcount' is 5.

so if i add new row by clicking on the button , i will get the 6th row, now only last five rows will be visible.

so what i want is, if add a new row all the rows should be visible.

Former Member
0 Kudos

Ok thats not that hard.

Create a new context node and add an attribute to it of type i.

Now in the WDDOMODIFYVIEW, retrieve the number of rows that are displayed in your table.

Add this value to the newly created attribute.

Also make sure that there is a binding between your newly created attribute and the property VISIBLEROWCOUNT of your table.

Here is some code which may clarify it a little more:

DATA:

l_elem2 TYPE REF TO if_wd_context_element,

l_node TYPE REF TO if_wd_context_node,

l_node2 TYPE REF TO if_wd_context_node,

v_lines TYPE i,

t_sflight TYPE TABLE OF sflight.

l_node = wd_context->get_child_node( 'SFLIGHT' ).

l_node->get_static_attributes_table(

IMPORTING

table = t_sflight ).

DESCRIBE TABLE t_sflight LINES v_lines.

l_node2 = wd_context->get_child_node( 'ROWS' ).

l_elem2 = l_node2->get_element( ).

l_elem2->set_attribute(

EXPORTING

name = 'NUMBER'

value = v_lines ).

In this case my node which contains the data for the table is called "SFLIGHT" and the new node which contains the number of rows is calles "ROWS" and the attribute is called "NUMBER". Make sure that this attribute "NUMBER" is bound to the property "VISIBLEROWCOUNT".

Good luck!

Jos