‎2009 Sep 08 7:34 AM
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
‎2009 Sep 08 7:37 AM
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..
‎2009 Sep 08 7:40 AM
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
‎2009 Sep 08 7:43 AM
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