on 02-07-2008 9:19 AM
table has a property 'visiblerowcount'
if i bind value dynamically to this i am not getting
the desired o/p.
what can i do ?
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
User | Count |
---|---|
84 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.