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: 

How to save edited ALV List.

Former Member
0 Kudos
53

hi all,

i have created a program which displays two ALV LISTS and i made some of the fileds editable by using input key. Now when i press the SAVE button ,i couldnt capture the edited fileds contents .

have a look at the code below .

call function 'REUSE_ALV_BLOCK_LIST_INIT'
    exporting
      i_callback_program             = sy-repid
      i_callback_pf_status_set       = 'SET_PF_STATUS'
      i_callback_user_command        = 'USER_COMMAND'.

*---------------------for top of page----------------*
      xs_event-name = slis_ev_top_of_page.
      xs_event-form = 'TOP_OF_PAGE'.
      append xs_event to IT_events.

      xs_event-name = slis_ev_top_of_page.
      xs_event-form = 'TOP_OF_PAGE1'.
      append xs_event to IT_events1.
*---------------------appending 1st alv---------------*
    if not it_DATA is initial.
    call function 'REUSE_ALV_BLOCK_LIST_APPEND'
      exporting
        is_layout                        = gd_layout
        it_fieldcat                      = it_fieldcat
        i_tabname                        = 'IT_DATA'
        it_events                        = IT_events

      tables
        t_outtab                         = it_DATA.
  endif.
*---------------------appending 2nd alv---------------*
   call function 'REUSE_ALV_BLOCK_LIST_APPEND'
      exporting
        is_layout                        = gd_layout1
        it_fieldcat                      = it_fieldcat1
        i_tabname                        = 'IT_PEND'
       it_events                        = IT_events1
      tables
        t_outtab                         = IT_PEND.

*---------------------ALV Display------------------------------*
  gt_print-reserve_lines = 2.

      call function 'REUSE_ALV_BLOCK_LIST_DISPLAY'
     exporting
       is_print                      = gt_print.
endform.                    " report_output

regards,

Venkat

1 REPLY 1

Former Member
0 Kudos
28

i was able to get the changed data in ALV grid by this code

data: gd_repid like sy-repid,
        ref_grid type ref to cl_gui_alv_grid.

  if ref_grid is initial.
    call function 'GET_GLOBALS_FROM_SLVC_FULLSCR'
      importing
        e_grid = ref_grid.
  endif.
  if not ref_grid is initial.
    call method ref_grid->check_changed_data .
 endif.

is there any equivalent code for ALV LIST like the above code??