cancel
Showing results for 
Search instead for 
Did you mean: 

Next Row, Next Page, Last Row, etc buttons disabled, how to make active?

Former Member
0 Kudos

Hi,

I have a table on my view. At run time when a user enters data into the table, the table buttons of next row, next page, last row, etc are all disabled. How do I make them active?

Thanks,

Mick

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Marking this as answered as there is no further progress

arjun_thakur
Active Contributor
0 Kudos

Hi Mick,

The activation of table buttons depends on visible row count property of the table. Suppose your table visible row count is set to 5 but your table has data in only 2 rows then the buttons will be deactivated. If your table has data in more then 5 rows then the table buttons will be activated automatically.

If you have the requirement where you have to add blank row in table , then you need to create button to add row. And code accordingly. Please specify your requirement.

To add a row in a table you can refer to the following code:


method onactiononadd .

node_material type ref to if_wd_context_node.
elem_material type ref to if_wd_context_element.
stru_material type sflight.
node_material = wd_context->get_child_node( name = 'ANNA' ).

elem_material = node_material->get_element( ).

if ( elem_material is initial ).
call method node_material->create_element
receiving
element = elem_material.
endif.

call method elem_material->get_static_attributes
importing
static_attributes = stru_material .

call method node_material->bind_structure
exporting
new_item = stru_material
set_initial_elements = abap_false.
endmethod.

Regards

Arjun

Edited by: Arjun on Jan 18, 2009 5:45 PM

Former Member
0 Kudos

The requirement is as follows:

When user clicks on a button on view1, the order type entered on view1 is then the default value for view2 order type. This value of order type is set in the WDOINIT of view2.

View2 also has a table with several colums for sales order line item details. The table is initially blank and is filled with 5 dummy lines from an internal table to make the table editable. Ths user will enter value in the table for amount, item no, quantity, plant,etc. The user may enter 1 line or n number of line items while creating the sales order. Therefore the buttons should be active for the user to navigate to the next line.

arjun_thakur
Active Contributor
0 Kudos

Hi Mick,

You have set the visible row count of the table as 5 and If the user wants to enter more then 5 values, then you need to trigger an action to insert a row in the table and for that I would advice that you create a button and use the code provided by me in the previous post.

You can try one more thing, you can set the rowcount property of the table (max. no. of values that the user can enter say 100 or something, get that many rows in your internal table, bind it with table node ) and keep the visible row count as 5 only. It might serve your purpose.

Regards

Arjun

Edited by: Arjun on Jan 22, 2009 10:13 PM