Showing results for 
Search instead for 
Did you mean: 

How to get the current page number in a table view

Former Member
0 Kudos


I have used a table view for a result set.

The result data has 'n' number of pages, having 10 records per page.

How can I get the current page on which the user is performing any action?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Srikanth,

You may have to code it as below :-

* get the row index from the event
SPLIT htmlb_event_ex->event_defined AT '.' INTO lv_event lv_index.

* current row index
lv_row_index = lv_index.

* Find page number
lv_page_number = lv_row_index / 10. "Since you have 10 rows paer page

IF ( lv_row_index MOD 10 ) > 0.
* This is imp. if row index is not a multiple of 10 for eg. :- 43
  lv_page_number = lv_page_number + 1.

You'll get the current page number in variable - lv_page_number.



Former Member
0 Kudos

Hi Ashish,

I think the above solution doesn't solve my purpose.

On click of "SELECTALL" , i should select all the records in the current page only.

but, by standard, "SELECTALL" selects the entire collection.

This is the reason, I tried for getting the current page number.

Since we dont get selectedrowindex for "SELECTALL", need some other option.

Would be helpful, if some inputs can be provided on this.