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: 

how to make fields disabled for input in a table control during runtime

Former Member
0 Kudos

hi

i have a table control and one of the field is a radio button. I am using this table control on a screen exit in ME21N/ME22N and ME23N

now i want that the user should be able to select the radio button only in ME21N and ME22N but the user should not be able to select the radiobutton in the table control in the ME23N screen. Any idea how to set the field as only for display during runtime.

1 ACCEPTED SOLUTION

raymond_giuseppi
Active Contributor
0 Kudos

In the PBO, add a module to change screen attributes in the LOOP related to the table control

LOOP AT   itab
     with control control
     cursor control-current_line.
  MODULE control_get_lines.
  MODULE control_attr. " Add this one
ENDLOOP.

In the module perform a LOOP AT SCREEN and protect whatever field you need on each individual record.

LOOP AT SCREEN.
  CASE screen-name.
    WHEN 'XXX'.
      IF 1 = 2.
        screen-input = 1.
      ELSE.
        sceen-input = 0.
      ENDIF.
      " other fields
      MODIFY SCREEN.
  ENDCASE.
ENDLOOP.

Regards

7 REPLIES 7

Former Member
0 Kudos

Hi,

use loop at screen statment.

screen group-active = 0.

modify screen.

hope it will help..

Former Member
0 Kudos

hi,

put a loop at screen,

LOOP AT SCREEN.

screen group-active = 0.

or

screen group-invisible = 1.

or

screen group-input = 0.

MODIFY SCREEN.

ENDLOOP.

regards,

sandeep

raymond_giuseppi
Active Contributor
0 Kudos

In the PBO, add a module to change screen attributes in the LOOP related to the table control

LOOP AT   itab
     with control control
     cursor control-current_line.
  MODULE control_get_lines.
  MODULE control_attr. " Add this one
ENDLOOP.

In the module perform a LOOP AT SCREEN and protect whatever field you need on each individual record.

LOOP AT SCREEN.
  CASE screen-name.
    WHEN 'XXX'.
      IF 1 = 2.
        screen-input = 1.
      ELSE.
        sceen-input = 0.
      ENDIF.
      " other fields
      MODIFY SCREEN.
  ENDCASE.
ENDLOOP.

Regards

0 Kudos

Thanks for the input. I will give it a try and if it works will award full points.

0 Kudos

Also in your check , try to use the (I_)TRTYP parameter transmitted to exit/BADI rather than checking the TCODE.

* FMMEXDIR
CONSTANTS: OUT VALUE 'H', "inzufuegen add
           VER VALUE 'V', "Veraendern change
           ANZ VALUE 'A', "Anzeigen view < check this one
           ERW VALUE 'E'. "Bestellerweiterung Order enlargement

Regards

0 Kudos

Thanks Raymond. The logic you have given me worked perfect ......Appreciate that !!

I have given full points and closing the thread.

Former Member
0 Kudos

Hi

try like this...

In PBO of the screen..

IF sy-tcode = 'ME23N'.

LOOP AT screen.

IF screen-group1 = 'ABC'. ( ABC is ur radio button group)

screen-input = 0.

screen-output = 1.

MODIFY screen.

ENDIF.

ENDLOOP.

ENDIF.

Edited by: venkat reddy on Jul 11, 2008 12:00 PM