on 02-13-2008 4:35 AM
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?
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.