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

Enabling /Disabling the Table Control

Former Member
0 Likes
501

Dear All,

I am preparing a MPP in which i want to disable the table control initially but on click on a Button, Some of the field of the table become enable for any modifications in the entry.

I have Un-tick the Input allowed option in the Table control properties. Now initially the table control is disable for any input. Now on click of a button how to enable it?

Please suggest me the code for it.

Regards

Ankur

3 REPLIES 3
Read only

Former Member
0 Likes
449

In PAI,

Module xx.

Case sy-ucomm.

when button_clicked.

loop at screen.

If sceen - name = table control field.

screen-input = 1.

modify screen.

endif.

endloop.

endcase.

end module.

Try to make use of above logic , it will enable the fields on button click..

Read only

Former Member
0 Likes
449

Hi,

Coing it via the table conrol properties you might not be able to put in input mode programatically so i suggest that you disable and enable the fields on the table control programmatically.

In PBO of the screen you can loop on the screen and when the screen-name = field (that you want to dsiable ) set screen-input = 0 and modify screen.

Check the forum you would sure get a lot of threads related to this one.

Regards,

Himanshu

Read only

Former Member
0 Likes
449

Hi Ankur,

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.

In the click event of the button, set Screen-Input=1.

Hope, it would help you.

with regards,

Mamta

Edited by: Mamta Kumari on Sep 8, 2009 8:54 AM