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

Table control issue

Former Member
0 Likes
485

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

1 ACCEPTED SOLUTION
Read only

I355602
Product and Topic Expert
Product and Topic Expert
0 Likes
463

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

3 REPLIES 3
Read only

Former Member
0 Likes
463

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

Read only

I355602
Product and Topic Expert
Product and Topic Expert
0 Likes
464

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

Read only

Former Member
0 Likes
463

Thanks a lot ..The issue is resolved..

My only problem is that when i press enter the field is again getting enabled.

Regards,

Arun