Skip to Content
avatar image
Former Member

Table Control Making specific field in editable mode .

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!

test.PNG (27.5 kB)
newqq.PNG (65.5 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Oct 27, 2015 at 11:29 AM

    Hi Eric Chen,

    Kindly view the link.

    SAPTechnical.COM - Dynamically editable cells in a table control

    Hope it helpful,

    Regards,

    Venkat.

    Add comment
    10|10000 characters needed characters exceeded