Application Development and Automation 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: 
Read only

Disable the table control

Former Member
0 Likes
913

Hi all,

How to disable the table control. User cant enter anything to the table control. Code pls

thks

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
895

Hi,

in PBO of that screen.

include a module say change_attr

module change_attr.

LOOP AT SCREEN.

IF screen-name = 'I_POINT-POINT'. "field of that table control and not table control name.

screen-input = 0.

ENDIF.

modify screen.

endloop.

endmodule.

Cheers,

Will.

10 REPLIES 10
Read only

Former Member
0 Likes
895

There's a few examples in this forum already e.g. have a look at:

REward if useful.

Read only

Former Member
0 Likes
896

Hi,

in PBO of that screen.

include a module say change_attr

module change_attr.

LOOP AT SCREEN.

IF screen-name = 'I_POINT-POINT'. "field of that table control and not table control name.

screen-input = 0.

ENDIF.

modify screen.

endloop.

endmodule.

Cheers,

Will.

Read only

0 Likes
895

It cant. I tested. But when i try it with a input box ... it can be disable but not in table control of that field. Why? Anything that is not set ?

Read only

0 Likes
895

hi,

try like this

MODULE disable OUTPUT.

LOOP AT SCREEN.

IF screen-name = 'ITAB-MATNR'.

screen-input = 0.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

ENDMODULE. " disable OUTPUT

reward if usefull...

Read only

0 Likes
895

Do i need to create another new module for the disable of the table control? Can't i do it in MODULE STATUS_100 OUTPUT.

Read only

0 Likes
895

Hi,

goto ur screen>layout->here u have ur table control if u hav 4 columns in ur table control....ull hav 4 I/O field................U hav 2 give their name for screen name in caps ......

do it in same module only

Cheers,

Will.

Read only

0 Likes
895

Pls refer to my previous post on the doubt. thank.

Read only

0 Likes
895

ookay i will try later as i am already offline.

What do u mean by do in the same module?

I built the table control in screen 100.

My PBO is MODULE STATUS_100 OUTPUT.

Can i jus put the code in here?

Read only

0 Likes
895

hi,

in screen flow logic make new module disable....

PROCESS BEFORE OUTPUT.

*&SPWIZARD: PBO FLOW LOGIC FOR TABLECONTROL 'TAB1'

MODULE tab1_change_tc_attr.

*&SPWIZARD: MODULE TAB1_CHANGE_COL_ATTR.

LOOP AT itab

INTO itab

WITH CONTROL tab1

CURSOR tab1-current_line.

MODULE tab1_get_lines.

MODULE disable.

*&SPWIZARD: MODULE TAB1_CHANGE_FIELD_ATTR

ENDLOOP.

MODULE status_1000.

Read only

0 Likes
895

Ya.......