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: 

Table Control Making specific field in editable mode .

0 Kudos

Hi I have a problem with table control .

In my table control, I want my table uneditable in column 4. But when I insert one row to my table, I hope this column 4 can be edited only in this new row.

Please check out the following code.

PROCESS BEFORE OUTPUT.

   MODULE GETDATA.

   Loop at : it_cust into wa_cust with control tablec .

     MODULE SET_ROW.

   ENDLOOP.


--------------------------------------------------------------------------------------

MODULE SET_ROW OUTPUT.

   DATA: IT_LINE TYPE i.

   IF IT_CUST[] IS INITIAL.

     tablec-lines = 1.

   ELSE.

     DESCRIBE TABLE IT_CUST LINES IT_LINE.

      IF ADD_FLAG = 'T'. <------------------- Flag of new row

       tablec-lines = IT_LINE + 1. 

        LOOP AT SCREEN.

         if screen-name = 'WA_CUST-ZXCUST_KOSTL'.

           screen-input = 1.  "<------------------ This commend make column editable.

           modify screen.

          ENDIF.

         ENDLOOP.

     ENDIF.

  ENDIF.

ENDMODULE.


By doing so. After I insert a new row, All of records can edit column 4 as following picture. But I just want the new row can edit. Could anyone tell me how to solve? Thanks!

1 REPLY 1

VenkatRamesh_V
Active Contributor
0 Kudos

Hi Eric Chen,

Kindly view the link.

SAPTechnical.COM - Dynamically editable cells in a table control

Hope it helpful,

Regards,

Venkat.