07-11-2008 10:33 AM
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.
07-11-2008 10:54 AM
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
07-11-2008 10:38 AM
Hi,
use loop at screen statment.
screen group-active = 0.
modify screen.
hope it will help..
07-11-2008 10:49 AM
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
07-11-2008 10:54 AM
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
07-11-2008 10:59 AM
Thanks for the input. I will give it a try and if it works will award full points.
07-11-2008 11:01 AM
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
07-11-2008 11:33 AM
Thanks Raymond. The logic you have given me worked perfect ......Appreciate that !!
I have given full points and closing the thread.
07-11-2008 11:00 AM
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