Application Development and Automation 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: 
Read only

refreshing ALV-list ?

Former Member
0 Likes
1,144

hi,

i am calling a alv-screen with FM REUSE_ALV_GRID_DISPLAY

as the output-table changes in some situations, is it possible to 'refresh' the alv-out-tab automaticly in ABAP ?

reg, Martin

9 REPLIES 9
Read only

former_member194669
Active Contributor
0 Likes
1,084

Try this way

Pl. check for rs_selfield-refresh = 'X' in the below mentioned code


    call function 'REUSE_ALV_GRID_DISPLAY'
      exporting
        it_fieldcat                 = i_fieldcat[]
        is_layout                   = pt_grplayout2
        i_callback_program          = 'YATTU0007'
        i_callback_html_top_of_page = p_header
        i_callback_user_command     = f_user_command1
        it_events                   = i_events[]
      tables
        t_outtab                    = i_yatthdr.
*
*&---------------------------------------------------------------------*
* Form  f_user_command1                                                *
*&---------------------------------------------------------------------*
* This form will handle the user command from fm REUSE                 *
*----------------------------------------------------------------------*
form f_user_command1 using p_ucomm type sy-ucomm
                     rs_selfield type  slis_selfield.

  data p_ref1 type ref to cl_gui_alv_grid.
  call function 'GET_GLOBALS_FROM_SLVC_FULLSCR'
    importing
      e_grid = p_ref1.
  call method p_ref1->check_changed_data.
  case p_ucomm.
  endcase.

  rs_selfield-refresh = 'X'.            " Grid refresh

endform.                                 " F_user_command1
*

a®

Read only

0 Likes
1,084

well, i have already tried it with that

but it does not work. the alv-table is not updated !

reg, Martin

Read only

0 Likes
1,084

I think you need to call


  rs_selfield-refresh = 'X'.            " Grid refresh

after this call


data p_ref1 type ref to cl_gui_alv_grid.
  call function 'GET_GLOBALS_FROM_SLVC_FULLSCR'
    importing
      e_grid = p_ref1.
  call method p_ref1->check_changed_data.

a®

Read only

0 Likes
1,084

i found another way:

i just do a modifiy on the grid-table !

but i think this is more the 'quick and dirty' way, isn't it ?

reg, martin

Read only

0 Likes
1,084

the problem is more complex:

i have to redirect the abap to the whole logic of creating the alv-out-tab ! it does NOT help me just to say 'refresh'

best reg, Martin

Read only

0 Likes
1,084

Hi Martin,

If you want to manually refresh ALV using REFRESH button on application toolbar, try this


FORM USER_COMMAND ..................

CASE P_UCOMM.

*refreshes  ALV Grid
    When '&NTE'.
      SUBMIT <PROGRAM_NAME>.            <---give the same program name

ENDCASE.

Read only

0 Likes
1,084

hi,

that does not sound very logical for me. i can't call the programm again, as there are complex parameters and select options in it ! i have to start it exactly with the SAME parameters !

reg, Martin

btw: i can't find an 'refresh button' in alv !?!??!?!

Edited by: Martin Svik on Apr 8, 2008 5:15 PM

Read only

0 Likes
1,084

well, there is a new question:

is it possible to have an flexible ALV-header ? e.h. when i click on a specific line in alv data should be placed in the HEADER of alv !

reg, Martin

Read only

uwe_schieferstein
Active Contributor
0 Likes
1,084

Hello Martin

You may have a look at sample report ZUS_SDN_FM_ALV_REFRESH in

The report demonstrates how to refresh the ALV list. However, this has to be done manually.

Regards

Uwe