2007 Mar 13 8:51 AM
Hi..
I want to make a row of a table control in module pool disabled for input based on a run time condition.
also i want to make one field of disabled row again available for input when i doublt click on that field.
how can i do it?
any suggestions with example will be appriciated.
helpful ansewrs will b rewarded with points.
Thanks in advance,
Tejas
2007 Mar 13 8:55 AM
Hi Tejas,
in PBO section,
loop at itab with tc...
module modify_screen.
endloop.
In program:
module modify_screen.
if <Runtime condtion>. " example ITAB_VALUE >10
loop at screen.
if screen-group = 'Group name for all the fields in the table control'.
screen-input = 0.
modify screen.
endif.
endloop.
endif.
endmodule.
Regards,
ravi
Hi Tejas,
Create group name for the table control column. and write the disable code in the PAI.
loop at screen.
if screen-group-name1 = <group-name>
screen-input = 0.
modify screen.
endif.
endloop.
Regards,
Ramesh Babu S
2007 Mar 13 8:55 AM
Hi Tejas,
in PBO section,
loop at itab with tc...
module modify_screen.
endloop.
In program:
module modify_screen.
if <Runtime condtion>. " example ITAB_VALUE >10
loop at screen.
if screen-group = 'Group name for all the fields in the table control'.
screen-input = 0.
modify screen.
endif.
endloop.
endif.
endmodule.
Regards,
ravi
2007 Mar 13 9:00 AM
hi Ravi,
thanks for quick reply but...
i have table control with internal table not the DD table.
so in statement...
loop at itab with tc...
module modify_screen.
endloop.
its giving me the error "IT_MARA is not a database table".
-Tejas
2007 Mar 13 8:56 AM
Manipulate the SCREEN table based on the condition check and make the table control work according to your requirements.
LOOP AT SCREEN.
<your logic>
ENDLOOP.
2007 Mar 13 8:56 AM
Hi,
Just handle/change the attributes of each field as (input/output) seperately instead of changing the row of tablecontrol .
Regards,
Anji
2007 Mar 13 9:02 AM
Hi Anji,
I tried doing so..
I mean i wrote ...
loop at screen.
if screen-name = 'IT_MARA-DATUM'
screen-input = 0.
modify screen.
endloop.
but its not freezing table control's DATUM field.
Any Hints???
-Tejas
2007 Mar 13 9:04 AM
Hi Tejas,
Create group name for the table control column. and write the disable code in the PAI.
loop at screen.
if screen-group-name1 = <group-name>
screen-input = 0.
modify screen.
endif.
endloop.
Regards,
Ramesh Babu S
2007 Mar 13 9:06 AM
hi ramesh,
I tried doing that too..
its not working...
ii did as...
MODULE MODIFY_SCREEN OUTPUT.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'G01'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDMODULE. " MODIFY_SCREEN OUTPUT
-Tejas
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |