cancel
Showing results for 
Search instead for 
Did you mean: 

Get RowCount of displayed rows in Webdynpro ALV

Former Member
0 Kudos

I need to get the RowCount from an ALV table in Webdynpro ABAP. I have already tried using the Method (set_count_records_enabled), but it displays the RowCount in a Row in the ALV table. I want the RowCount in a variable so I can use it. I also do not want to use get_element_count( ) as it gives me the element count from the context rather than the displayed rows in ALV.

I feel it should be stored somewhere as it is displayed in the paginators and can also be displayed using the above mentioned function.

Any suggestions, as to where I can get the RowCount of displayed rows in WD ALV?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Ashish Khetan,

you can use this code to find the number of displayed rows

TRY.

lr_interfacecontroller = wd_this->wd_cpifc_ALVNAME( ).

CATCH cx_wdr_rt_exception.

ENDTRY.

IF NOT lr_interfacecontroller IS INITIAL.

lt_ALVNAME= lr_interfacecontroller->get_ui_info(

).

lt_alv_value = lt_alv_index-t_displayed_elements.

ENDIF.

DESCRIBE TABLE lt_alv_value LINES lv_current_no_of_rows.

Regards

Sarath

Former Member
0 Kudos

Sarath,

Thanks for the quick answer. It helped me get the displayed RowCount.

Ashish

Answers (0)