cancel
Showing results for 
Search instead for 
Did you mean: 

Table Scroll down using a button

Former Member
0 Kudos

Hi,

Can some expert Webdynpro consultant try out this weird requirement and give me the solution. ( Its for an app to be used on Mobile which is why asking for it. Its working fine on computers/Laptops)

Create a table and bind it with a child node and fill it with data so that it has many rows.. Now for scrolloing down, instead of using the scroll down button provided by the table element, create a new button which will perform the same functionality of scrolling down.

I have found the class which has the method which perform this functionality but am not able to use it properly.

The class is CL_WDR_P13N_DT and the method is AGGR_MOVE_DOWN.

I have tried MOVE_ELEMENT and all move related methods of if_wd_context_node, these methods just change the index position, they dont move the table contents down. So pls dont waste your time on that.

I have used this code:

 

DATA: lo_nd_resb_tab TYPE REF TO if_wd_context_node,
          vn type ref to CL_WDR_P13N_DT.

lo_nd_resb_tab = wd_context->get_child_node( name = 'EKKO_TAB' ).

   

create object vn.

CALL METHOD VN>AGGR_MOVE_DOWN

EXPORTING

VISIBLE_NODE = lo_nd_resb_tab

.

Thanks & Regards

Accepted Solutions (1)

Accepted Solutions (1)

amy_king
Active Contributor
0 Kudos

Hi Fawaz,

Table elements have a property, firstVisibleRow, which you can bind to a context attribute. In the action handler for your custom button, you can set the value of the bound context attribute to a new table index and the Table will scroll to that position.

Cheers,

Amy

Former Member
0 Kudos

Hi Amy,

Thanks a lot for your response.

This is the best and easiest solution using property firstVisibleRow and binding it with a context attribute.I have tried it out and its working.

Thanks & Best Regards,

Fawaz

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Fawaz,

To scroll to the required column or row in the output, use the methods of the interface

class IF_SALV_WD_TABLE_SETTINGS (implementing class

CL_SALV_WD_CONFIG_CLASS).

Methods for Horizontal and Vertical Scrolling

Function                                                                                 Method

Specify row to be displayed as the first row -             SET_FIRST_VISIBLE_ROW

Get row to be displayed as the first row -                  GET_FIRST_VISIBLE_ROW

Specify column to be displayed as the first column -  SET_FIRST_VISIBLE_SCROLL_COL

Get column to be displayed as the first column -       GET_FIRST_VISIBLE_SCROLL_COL

regards,

Amol

Former Member
0 Kudos

Hi Amol,

Thanks for your reply.

But I am not using ALV, i am using element Table to display data which can be edited.

Best Regards