‎2008 Dec 12 4:21 PM
Hello all,
I have designed a Table control using wizard.
I have a Listbox on my first field of the table control.
Now my requirement is that when i select a particular value in the Listbox one of my other field say the 5th field in the Table control should get input disabaled and it should display only as an output field.
Kindly help me in solving the same.
Regards,
Arun
‎2008 Dec 12 5:59 PM
Hi Arun Chaudhary,
You need to set the function code of the checkbos as 'CS' and the function type as 'S', to make sure that once you check/uncheck the checkbox, an event is triggered.
Now, in the PAI of the screen, inside
loop with control <tab_ctrl_name>.
module modify_tab.
endloop.
In this module you can use the group for the input/output fields and the enable/disable them as per your requirements.
if chk = 'X'. "if checkbox is checked
loop at screen.
if screen-group1 = 'ABC'. "say textbox (column for a table) has group1 as ABC
screen-input = ' '. "disable a column
screen-active = ' '.
endif.
modify screen.
elseif chk = ' '. "if checkbox is unchecked
loop at screen.
if screen-group1 = 'ABC'. "say textbox (column for a table) has group1 as ABC
screen-input = 'X'. "enable a column
screen-active = 'X'.
endif.
modify screen.
endif.
Hope this solves your prolem.
Thanks & Regards
Tarun Gambhir
‎2008 Dec 12 5:41 PM
Hi
You have to assign the function code to your List Box
and then in PAI of the screen loop at your table control ,read the line selected then
make that field input disable.
Neha
‎2008 Dec 12 5:59 PM
Hi Arun Chaudhary,
You need to set the function code of the checkbos as 'CS' and the function type as 'S', to make sure that once you check/uncheck the checkbox, an event is triggered.
Now, in the PAI of the screen, inside
loop with control <tab_ctrl_name>.
module modify_tab.
endloop.
In this module you can use the group for the input/output fields and the enable/disable them as per your requirements.
if chk = 'X'. "if checkbox is checked
loop at screen.
if screen-group1 = 'ABC'. "say textbox (column for a table) has group1 as ABC
screen-input = ' '. "disable a column
screen-active = ' '.
endif.
modify screen.
elseif chk = ' '. "if checkbox is unchecked
loop at screen.
if screen-group1 = 'ABC'. "say textbox (column for a table) has group1 as ABC
screen-input = 'X'. "enable a column
screen-active = 'X'.
endif.
modify screen.
endif.
Hope this solves your prolem.
Thanks & Regards
Tarun Gambhir
‎2008 Dec 12 6:33 PM
Thanks a lot ..The issue is resolved..
My only problem is that when i press enter the field is again getting enabled.
Regards,
Arun