Showing results for 
Search instead for 
Did you mean: 

ALV Row Counter

Former Member
0 Kudos

Hi All - I have an ALV table that display 15 row; if the ALV has more than 15 records let's say 1000 row on the vertical scroll bar will display row 20 of 1000 or 31 of 1000 (feature that ALV default for the user)

I want to display that same logic but in a text out of the ALV, how I can read all the rows of the ALV and display...i.e. "856 records displaying" and also if the user select row 754 it should say "you have selected row 754 out of 1000 records"

Is this possible?


Jason P-V

View Entire Topic
Former Member
0 Kudos

how I can read all the rows of the ALV

For this, just read the node using get_static_Attributes_table method. It will return all rows in ALV.

DATA lo_nd_cn_table TYPE REF TO if_wd_context_node.

DATA it_table TYPE wd_this->elements_cn_table.

  • navigate from <CONTEXT> to <CN_TABLE> via lead selection

lo_nd_cn_table = wd_context->get_child_node( name = wd_this->wdctx_cn_table ).

lo_nd_cn_table->get_static_attributes_table( IMPORTING table = lt_table).

Former Member
0 Kudos

What I mean with reading the ALV row is reading the number of rows, the data has been already displayed in the ALV I just need to display the i.e. "2153 recods available or displaying"

Former Member
0 Kudos

Use this statement to get the number of rows in internal table :

describe table lt_table lines last_row.

Here lt_table is internal table having a number of records.

last row is a variable type I which will have number of records whether 1 , 2 or 1000.