07-12-2006 2:40 PM
Dear experts,
I am using OO ALV in my application. I would like to display in list header, the number of currently DISPLAYED (not selected) entries. For example after usage of on screen filter with already selected values, when number of displayed entries is changed, I would like to refresh this value in list header.
Thanks in advance for your replies.
Marcin
07-12-2006 2:42 PM
Hello,
I think u caan do it using the foolowing FM..
REUSE_ALV_LIST_LAYOUT_INFO_GET Read current ALV list information
REUSE_ALV_LIST_LAYOUT_INFO_SET Set current ALV list information
If useful reward points.
Regards,
Vasanth
07-12-2006 2:42 PM
Hello,
I think u caan do it using the foolowing FM..
REUSE_ALV_LIST_LAYOUT_INFO_GET Read current ALV list information
REUSE_ALV_LIST_LAYOUT_INFO_SET Set current ALV list information
If useful reward points.
Regards,
Vasanth
07-12-2006 2:58 PM
Hi,
Thanks for your hint. Do you know in which export parameter I can find the number of currently DISPLAYED values? Maybe you know some method of OO ALV with similar functionality, which can provide this information to me?
Best regards,
Marcin
07-12-2006 3:24 PM
Hi,
Check this code to find the rows in ALV after filter method:
DATA : x_totrows type i,
x_filrows type i,
x_remrows type i.
if you are displaying the ALV with x_output internal table.
find the total rows like :
describe table x_output rows x_totrows.
use method 'get_filtered_entries' to send the filtered entries into a table.
DATA : x_fidx TYPE lvc_t_fidx.
FIELD-SYMBOLS: <pt> TYPE ANY.
DATA: x_fltr(10) TYPE n.
CALL METHOD x_grid->get_filtered_entries
IMPORTING
et_filtered_entries = x_fidx.
LOOP AT x_fidx ASSIGNING <pt>.
WRITE <pt> TO x_fltr.
MOVE x_fltr TO x_fix.
APPEND x_fix.
ENDLOOP.
find the count of the filtered entries
describe table x_fix rows x_filrows.
<b>remaining records will be</b>
x_remrows = x_totrows - x_filrows
Regards
Appana
07-12-2006 3:57 PM
Guys,
thanks a lot for your quick answers. Points rewarded.
best regards
Marcin
07-12-2006 3:22 PM
You can call the method GET_FILTERED_ENTRIES which can give you the no. of rows filtered. Then you can get the total row count from the internal table that you are using for displaying the data. The total row count - filtered row count will be displayed row count.
You can get the row count of a internal table usine
DESCRIBE TABLE ITAB LINES W_COUNT.
Regards,
Ravi
Note : Please mark all the helpful answers