Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

set_table_for_first_display Filter button in ALV Output not working

jananis
Explorer
0 Kudos

Hi ,

Using OOPs Concept, Set_table_for_first_display for ALV output, Copied Standard PF Status and done, whereas Filter button is not working properly.

When i Click Filter button and enter value in ALV output, showing filtered value and within fraction of seconds all data is displaying as before clicking Filter option .

I Used Sort option also, it works fine. used Refresh_table_display method i_sort_refresh = 'X' . Still Filter option not working , System: Netweaver 740.

Please suggest.

Thanks,

Janani S

1 ACCEPTED SOLUTION

raymond_giuseppi
Active Contributor

Did the previous developper manage some auto-refresh feature, that didn't handle filters.

5 REPLIES 5

raymond_giuseppi
Active Contributor

Did the previous developper manage some auto-refresh feature, that didn't handle filters.

0 Kudos

Hi,

Found Solution for my above issue, as Raymond said Filter value gets refreshed. once filter button is pressed PBO Processed and i written coding as if container is initial performed ALV display. instead of container is initial .....endif. perform ALV display.

Thanks

0 Kudos

please move your reply as a "comment" to Raymond's answer. He pointed you to the solution.

0 Kudos

done ... thank u Sandra.....

jananis
Explorer
0 Kudos

Hi,

I could not understand what exactly you are saying, In my requirement editing fields in ALV output and changing some field values based on that editing value is done, for that refresh_table_display is used. Only sort and subtotal features used.

Auto-refresh feature means, how i need to find that. Could u Please Explain Clearly.

Below are my codings

***********ALV Event*************
 ls_layout-zebra = 'X'.
  ls_layout-col_opt = 'X'.

  ls_sort-spos = '01' .
  ls_sort-fieldname = 'CODE'.
  ls_sort-up = 'X'.
  ls_sort-subtot = 'X'.
  append ls_sort to lt_sort .
  clear ls_sort.

*   ENTER key is pressed or
  call method go_grid->register_edit_event
    exporting
      i_event_id = cl_gui_alv_grid=>mc_evt_enter.

*   data is changed and cursor is moved from the cell
  call method go_grid->register_edit_event
    exporting
      i_event_id = cl_gui_alv_grid=>mc_evt_modified.

************ ALV Display **********
call method go_grid->get_selected_rows
    importing
      et_row_no = lt_selected_rows.

  call method go_grid->set_table_for_first_display
    exporting
  
      is_layout       = ls_layout
      it_hyperlink    = lt_hype
    changing
      it_outtab       = lt_alv
      it_fieldcatalog = lt_fieldcatalog
      it_sort         = lt_sort.

  call method go_grid->refresh_table_display
    exporting
      i_soft_refresh = 'X'   " Without Sort, Filter, etc.
    exceptions
      finished       = 1
      others         = 2.
  if sy-subrc <> 0.
    message id sy-msgid type sy-msgty number sy-msgno
               with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  endif.