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

Table Control Making specific field in editable mode .

$
0
0

Hi I have a problem with table control .

 

test.PNG

 

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!

newqq.PNG


Viewing all articles
Browse latest Browse all 3441

Trending Articles