Skip to Content
0
Sep 27, 2005 at 12:49 PM

Refreshing a classic ALV-List

45 Views

Hi everybody out there,

I have a problem refreshing a Classic ALV list after a user action adding a new entry to the output table. The coding is similar to the following :

*  ---   Display Table   ---
   CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
             i_callback_program       = g_repid
             is_variant               = g_variant
             i_save                   = 'A'
             it_fieldcat              = g_fldcat
             is_layout                = g_layout
             it_events                = g_event
        TABLES
             t_outtab                 = cust_tab.
...
*  ---  Treatment of ALV actions   ---
FORM user_command_alv
     USING ucomm    LIKE sy-ucomm
           selfield TYPE slis_selfield.

  CASE ucomm.
       when 'NKUN'.          "New customer
             perform create_new_cust.
             selfield-refresh    = 'X'.   
             ucomm = '&REFRESH'.        
             exit.
...
ENDFORM.
...
FORM create_new_cust.
DATA: newcust like cust_tab.
*  ---   Populate new customer   ---
   newcust-kunnr = '123456'.
   ...
   append newcust to cust_tab.
ENDFORM.

The problem with this coding is, that the internal table is correctly populated but not shown on the list. The statement ucomm = '&REFRESH', which I found here in a posting, did not change anything.

Thanx for any help

Rabanus