Application Development 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: 

disable table control field

Former Member
0 Kudos

Hi Experts,

I have create a module pool program where in there is a table control with some fields. I had a requirement where I need to disable all the tablecontrol fields when I click DISPLAY button. ( Display button ).


loop at screen.
 if screen-group1 = 'GR'.
 if sy-ucomm = 'CHANGE'.
 screen-input = 1.
else.
 screen-input = 0.      " when clicked DISPLAY button.
endif.
endif.
endloop.

My problem is only menge ( Quantity) field is not disabling.

please provide your suggestions.

Thanks and Regards

Murali Krishna. T

7 REPLIES 7

nirajgadre
Active Contributor
0 Kudos

HI,

Check the screen group of quantity field in the table control it should be GR only.

0 Kudos

hi niraj,

Thanks for your view. quantity field also exist in group 'GR'. Still problem is arising.

0 Kudos

Hi Murali,

In your code i guess the modify screen statement missing. just add the modify screen statement within the loop screen and try

loop at screen.
 if screen-group1 = 'GR'.
 if sy-ucomm = 'CHANGE'.
 screen-input = 1.
else.
 screen-input = 0.      " when clicked DISPLAY button.
endif.
endif.
modify screen. " add line here
endloop.

0 Kudos

Hi Niraj,

I tried with modify screen as you suggested. But no solution.

Here one thing I need to make clear. Here Iam using TabStrip. The tabstrip control exits in screen 320. For this I declared a subscreen in the screen 340. Here in 340, the table control is there.

The push buttons DISPLAY and CHANGE are in screen 320. For these push buttons Iam writing the disable and enable functionality.

I think, If Iam able to identify the tablecontrol field in screen 320, the problem will be solved.

Screen Group ' GR ' is already used for another internal table for screen 320.

Do I need to use another Screen Group for my table control?

Also please make me clear about the difference between screen-group1

screen-group2

screen-group3

screen-group4

Thanks and regards,

Murali Krishna T

0 Kudos
loop at screen.
 if screen-group1 = 'GR'  OR screen-name = <Meins field>. "Add field and try
 if sy-ucomm = 'CHANGE'.
 screen-input = 1.
else.
 screen-input = 0.      " when clicked DISPLAY button.
endif.
endif.
modify screen. " add line here
endloop.

Cheers

Pramod M

venkat_o
Active Contributor
0 Kudos

Hi Murali, <li>Check my reply in the below post which is right solution to change table control screen attributes dynamically. <b></b> Thanks Venkat.O

Former Member
0 Kudos

HAI Murali,

Make some small change in ur code..Make the Active attribute of Screen to 0.

loop at screen.
 if screen-group1 = 'GR'.
 if sy-ucomm = 'CHANGE'.
 screen-input = 1.
else.
 screen-active = 0.    " Add this line to ur code here
 screen-input = 0.      " when clicked DISPLAY button.
endif.
endif.
endloop.

Best Regards,

rama