Quantcast
Channel: SCN: Message List - ABAP Development
Viewing all articles
Browse latest Browse all 10425

Re: Editable cell in ALV

$
0
0

In the field catalog.

 

gw_alv_fieldcat-col_pos   = lv_pos.

   gw_alv_fieldcat-edit  = 'X'.
   gw_alv_fieldcat-outputlen = 10.
   APPEND gw_alv_fieldcat TO gt_alv_fieldcat.

 

Calling the ALV

 


CALL FUNCTION'REUSE_ALV_GRID_DISPLAY'
     EXPORTING
       i_callback_program       = sy-repid
       it_fieldcat              = gt_alv_fieldcat
       i_callback_pf_status_set = 'SET_PF_STATUS'
       i_callback_user_command  = 'USER_COMMAND'
       i_default                = 'X'
       i_save                   = 'S'
       is_layout                = gd_layout
     TABLES
       t_outtab                 = i_data.

 

Implement the functionality in User command module

 

 

FORM user_command USING r_ucomm     LIKE sy-ucomm
                         rs_selfield TYPE slis_selfield.

   IF r_ucomm = '&EXP'.

    DATA ref1 TYPEREFTO cl_gui_alv_grid.
     CALLFUNCTION'GET_GLOBALS_FROM_SLVC_FULLSCR'
       IMPORTING
         e_grid = ref1.
     CALLMETHOD ref1->check_changed_data.


     PERFORM form_call.
     IFexit = 'X'.
       EXIT.
     ENDIF.
   ENDIF.

    rs_selfield-refresh = 'X'.
ENDFORM.                    "user_command

 

 

 

The coding in bold, will do the work of updating the data from ALV screen. You can now do whatever you want with the edited data.

Hope it helps,

 

Susmitha


Viewing all articles
Browse latest Browse all 10425

Trending Articles



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