Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3167

Making the cell as editable after an event

$
0
0

Hi all,

 

I try to makea cell editable according on the value selected from dropdown but she stay disabled.

I use event DATA_CHANGED like below :


METHOD handle_data_changed.

*-----------< Déclaration >----------------*
     DATA:
* Structures
           ls_good_cost TYPE lvc_s_modi
         , ls_cellstyle TYPE lvc_s_styl
* Variables
         .

* Pointeurs
     FIELD-SYMBOLS:
           <ls_data_changed> TYPE lvc_s_modi
         .

*-----------< Début traitement >-----------*

*--- Lecture de la valeur modifiée
     LOOP AT er_data_changed->mt_good_cells ASSIGNING <ls_data_changed>.

       IF <ls_data_changed>-fieldname = 'PEC'.

         CASE <ls_data_changed>-value.
           WHEN 'N'                "Non pertinant
                OR 'E'.               "Exception / Hors périmètre

*--- Ajout du paramètre editable de la cellule
             READ TABLE gt_amo_error INDEX <ls_data_changed>-row_id
                                     ASSIGNING <gs_amo_error>.
             IF sy-subrc = 0.
               ls_cellstyle-fieldname = 'COMMENTAIRE'.
               ls_cellstyle-style     = cl_gui_alv_grid=>mc_style_enabled.
               APPEND ls_cellstyle TO <gs_amo_error>-cellstyles.
               FREE ls_cellstyle.
             ENDIF.

           WHEN OTHERS.
             "Ne rien faire

         ENDCASE.

       ENDIF.

     ENDLOOP.

*-----------< Fin   traitement >-----------*

   ENDMETHOD.


Thanks for your help.


Viewing all articles
Browse latest Browse all 3167

Trending Articles



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