cancel
Showing results for 
Search instead for 
Did you mean: 

WD ABAP: Reset Table To Show the First Record.

Former Member
0 Kudos

Hi WebDynpro ABAP Experts,

Settings of tables allow me to display set of 10 records at a time. If i want to select , say 18th record I use paginator to select & use it. i navigate to next view , do some processing here. When I come back to the previous view, i see that table is still showing the 18th Records. How can i make this TABLE to show the first 10 records again & we want to achieve this without going back to DB.

or in other words we want to call the "FIRST ROW" functionality of Paginator that JUMPS to display the first Ten Row.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Self solved

Former Member
0 Kudos

Hi Prash

i did it like this. In your WDDOMODIFYVIEW


data: el type ref to IF_WD_VIEW_ELEMENT,
      tbl_table type ref to cl_wd_table.
CALL METHOD VIEW->GET_ELEMENT
  EXPORTING
    ID      = 'COM_TABLE'
  RECEIVING
    ELEMENT = el
    .

tbl_table ?= el.
CALL METHOD TBL_TABLE->SET_FIRST_VISIBLE_ROW
  EXPORTING
    VALUE  = 0

where COM_TABLE is my table control id.

Regards

Naresh

Former Member
0 Kudos

Hi Prash,

If you used supply function for filling the data to the table means you can use the Invalidate method.

Before leaving the first view you can call the invalidate method. The invalidate method again calls the supply function and your node as well as table getting refreshed.

Code for Invalidation :

node_node1 = wd_context->get_child_node( name = 'NODE1' ).

 elem_node1 = node_node1->get_element( ).

node_node1->invalidate( ).

Thanks.

Former Member
0 Kudos

Hi Viji i tried, invalidate on the node , but it doesnt work . How can i invoke the Paginator Show Last or Show First functionality of the table....??