05-12-2006 11:26 AM
Hi,
In my program, on the default screen, there is a checkbox and a parameter. If user click checkbox, I want the parameter become disable. How to realize this in program?
Thanks!
05-12-2006 11:28 AM
if CHK = 'X'.
loop at screen.
if screen-name = 'P_INPUT'.
screen-invisible = '1'.
modify screen.
endif.
endloop.
endif.
where P_INPUT is ur parameter name and CHK is ur checkbox name
05-12-2006 11:28 AM
if CHK = 'X'.
loop at screen.
if screen-name = 'P_INPUT'.
screen-invisible = '1'.
modify screen.
endif.
endloop.
endif.
where P_INPUT is ur parameter name and CHK is ur checkbox name
05-12-2006 11:29 AM
05-12-2006 11:29 AM
Hi,
In your AT SELECTION SCREEN OUTPUT event,
LOOP AT SCREEN
chech if check box is checked then,
move 0 to checkbox-input.
MODIFY SCREEN
ENDLOOP
05-12-2006 11:33 AM
05-12-2006 11:37 AM
AT SELECTION SCREEN OUTPUT.
LOOP AT SCREEN.
.........
MODIFY SCREEN.
EDNLOOP.
if u want to make any chenges in the screen display at run time, u can do in the above event.
"SCREEN" is a table containg fields like ACTIVE, INVISIBLE, INPUT, OUTPUT, REQUIRED etc.
check the table in dictionary and
see the fields, u can understand.
05-12-2006 11:50 AM
Hi long,
1. Its a little tricky.
2. we have to use two events.
at selection screen. (for detecting checkbox tick)
at selection screen output. (for showing disabled)
3. just copy paste in new program.
4.
report abc.
data : flag type i.
*----
parameters : a(10) type c modif id M1.
parameters : chk type c as checkbox user-command ch.
*----
initialization.
flag = 1.
*----
at selection-screen .
check sy-ucomm = 'CH'.
flag = 1.
if chk = 'X'.
flag = 0.
endif.
*----
at selection-screen output.
loop at screen.
if screen-group1 = 'M1'.
screen-input = flag.
modify screen.
endif.
endloop.
regards,
amit m.