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

Module pool Problem.

Former Member
0 Likes
774

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
736
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
7 REPLIES 7
Read only

Former Member
0 Likes
737
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
Read only

0 Likes
736

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

Read only

Former Member
0 Likes
736

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.

Read only

Former Member
0 Likes
736

Hi,

Just handle/change the attributes of each field as (input/output) seperately instead of changing the row of tablecontrol .

Regards,

Anji

Read only

0 Likes
736

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

Read only

learnsap
Active Participant
0 Likes
736

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

Read only

Former Member
0 Likes
736

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