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: 

How to disable a cell for input in a Table Control

Former Member
0 Kudos
1,063

Dear All,

I want to make few cell (not entire column or row) on the Table Control uneditable (Input Disabled) for certain Conditions.

kindly advise me.

Thanks and regards

Aryan

6 REPLIES 6

rameshkumar_ramasamy2
Participant
173

Hi,

In PBO,U would have wriitern code like this,

LOOP AT lt_items INTO ls_items WITH CONTROL tc_1 .
    MODULE pbo_tc_1.
  ENDLOOP.

So in that module , write

MODULE PBO_TC_1 OUTPUT.

  IF LS_ITEMS-EDIT <> 'X'.
    LOOP AT SCREEN.
      IF SCREEN-GROUP1 = '001'.
        SCREEN-INPUT = 0.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
   endif.

ENDMODULE.                 " PBO_TC_1  OUTPUT

I have declared Lt_items as

TYPES: BEGIN OF TY_ITEMS.
        INCLUDE TYPE ZSAMPAY.
TYPES:  EDIT(1),
        SEL(1),
       END OF TY_ITEMS.

Based on the flag EDIT, i will change a particular field

editable, provided u should have assigned the

GROUP ID for that field in Table control.

For me, i have assigned GROUP ID for a field in Table Control as 001.

Thanks,

Ramesh

0 Kudos
173

Thanks Ramesh

Former Member
0 Kudos
173

Hello Ramesh,

I did the same thing but the entire column is turned non editable and not a single cell.

If you can try out in your system that whether it edits a single cell or entire column

thanks

Aryan

0 Kudos
173

Hi Aryan,

Can u post the code which u have writtern..

0 Kudos
173

Thanks Ramesh ...... its working fine now

Edited by: aryansuvarna on Dec 18, 2010 3:30 PM

0 Kudos
173

Thanks Aryan.

Edited by: Rameshkumar Raamasamy on Dec 18, 2010 3:32 PM