Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8944

Re: Editing ALV report output and sending those values to another alv report

$
0
0

Hi Sandhya,

 

Let assume this:

IT_ALV_01 - first alv table

IT_ALV_02 - second alv table

 

FORM f_user_command USING pv_command  TYPE sy-ucomm
                                               pv_selfield      TYPE slis_selfield.

   DATA : lcl_ref_grid TYPE REF TO cl_gui_alv_grid.

   CASE pv_command.
       "Print customer address
     WHEN 'EXECUTE'.

       "to reflect the data changed into internal table IT_ALV_01
       IF lcl_ref_grid IS INITIAL.
         CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
           IMPORTING
             e_grid = lcl_ref_grid.
       ENDIF.

       IF lcl_ref_grid IS NOT INITIAL.
         CALL METHOD lcl_ref_grid->check_changed_data.
       ENDIF.


     "After the lcl_ref_grid->check_changed_data, the edited data will be reflect in your IT_ALV_01.


     " Process the edited data from your IT_ALV_01

     LOOP AT it_alv_01ASSIGNING <fs_alv_01>.
          MOVE <fs_alv_01>-field1 TO wa_alv_02.

          MOVE <fs_alv_01>-field2 TO wa_alv_02.

          .......do whatever you want here....

         

          APPEND wa_alv_02 TO IT_ALV_02.
   ENDLOOP.


     CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
     EXPORTING
       it_fieldcat              = it_fieldcat_02
       i_callback_program       = sy-repid
     TABLES
       t_outtab                 = IT_ALV_02.



Warm regards

Ice



Viewing all articles
Browse latest Browse all 8944

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>