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 the editable alv data to another program ?

Former Member
0 Kudos

hi friends,

please solve this issue..

i have one editable alv grid report. after edit my data in the grid..

i want to

save those data (edited data )or

download those data into another internal table or

pass those data as input to another report program..

how can i do this ?

1 ACCEPTED SOLUTION

FredericGirod
Active Contributor
0 Kudos

Use :

call method obj...->refresh_table_display.

after that you could export data to memory using :

export (itab) to memory id.

call the other program and used the import command ...

Fred

3 REPLIES 3

FredericGirod
Active Contributor
0 Kudos

Use :

call method obj...->refresh_table_display.

after that you could export data to memory using :

export (itab) to memory id.

call the other program and used the import command ...

Fred

0 Kudos

hi Fred..

i am not strong in object alv..

so can you send me some more details regarding that issue..

can yiu please

0 Kudos

The form switch to edit mode could be :

form p_edit.



  data : is_fieldcatalog type lvc_s_fcat ,
         it_ucomm        type table of syucomm with header line ,
         v_ucomm         type syucomm.


* Switch Edit <-> Display
  loop at it_fieldcatalog into is_fieldcatalog.
    check is_fieldcatalog-fieldname ne 'NUM' and
          is_fieldcatalog-fieldname ne 'RCODE'.
    if is_fieldcatalog-edit eq 'X'.
      clear is_fieldcatalog-edit.
    else.
      move 'X' to is_fieldcatalog-edit.
    endif.
    modify it_fieldcatalog from is_fieldcatalog.
  endloop.


* Change the status of the grid.
  if is_fieldcatalog-edit eq space.
    move '&REFRESH' to v_ucomm.
    call method obj_grid->set_function_code
         changing c_ucomm = v_ucomm.
    call method obj_grid->set_ready_for_input
         exporting i_ready_for_input = '0'.
  else.
    call method obj_grid->set_ready_for_input
         exporting i_ready_for_input = '1'.
  endif.


* Modify the fieldcatalog.
  call method obj_grid->set_frontend_fieldcatalog
       exporting it_fieldcatalog = it_fieldcatalog.


* Refresh the display of the grid.
  call method obj_grid->refresh_table_display.


* Set the column lines number.
  perform p_set_lines_num.


* Clear the flag control.
  clear v_flag_control.


* Messages.
  if is_fieldcatalog-edit eq space.
    move 'Passage en mode affichage.' to v_buff.
    perform p_add_message
            using v_buff
                  'ICON_DISPLAY'
                  ''.
  else.
    move 'Passage en mode édition.' to v_buff.
    perform p_add_message
            using v_buff
                  'ICON_CHANGE'
                  ''.
  endif.


* Inactiv function.
  if is_fieldcatalog-edit eq space.
    set pf-status '100'.
  else.
    move '' to it_ucomm. append it_ucomm.
...
    set pf-status '100' excluding it_ucomm.
  endif.


endform.                     " P_EDIT.



and for the table:


data : w_id(60).
move 'ZTOTO' to w_id.
export it_table[] to memory id w_id.

in the other program, it's the same with the IMPORT instead of export.