2009 Jun 07 2:38 PM
Hi Experts!!
Please help me out with the following probelm:
I am writing a dialog program with several screens. Now, I need a requirement like: there will be a check box and a corresponding field for that on a screen. When the box is checked, then only the field should become editable, else non-editable. How can I achieve this?
In reports, we can achieve this through AT SELECTION-SCREEN OUTPUT. But in dialog programming, how can we?
Please help me out. Thanks a lot in advance.
2009 Jun 07 4:21 PM
hi,
in dialog program, u need to code in PAI event under module user_command.
before that u need to assign function conde to ur radiobutton field in properties of checkbox field.
inside the user_command module check sy-ucomm.
if your checkbox is checked.
loop at screen.
if screen-name = ''your field name'
screen input = 1.
modify screen.
endloop.
endif.
regards
vj
Hi Experts!!
Please help me out with the following probelm:
I am writing a dialog program with several screens. Now, I need a requirement like: there will be a check box and a corresponding field for that on a screen. When the box is checked, then only the field should become editable, else non-editable. How can I achieve this?
In reports, we can achieve this through AT SELECTION-SCREEN OUTPUT. But in dialog programming, how can we?
Please help me out. Thanks a lot in advance.
2009 Jun 07 4:21 PM
hi,
in dialog program, u need to code in PAI event under module user_command.
before that u need to assign function conde to ur radiobutton field in properties of checkbox field.
inside the user_command module check sy-ucomm.
if your checkbox is checked.
loop at screen.
if screen-name = ''your field name'
screen input = 1.
modify screen.
endloop.
endif.
regards
vj
2009 Jun 07 4:49 PM
hi
try this
create a Module Pool Program in se38
go to se51,give the screen no and click on layout
select the checkbox icon and place it on the layout
enter the name for it as C1.
data : C1 as checkbox.
select the input/output field icon and place it
on the layout & name it as wk_field.
data : wk_field(10) type c.
save & activate the layout
in se51
PBO
Module_status_0800.
Module_checkbox.
PAI
Module_usercommand_0800.
module_checkbox_o/p.
if c1 = 'X'.
LOOP AT SCREEN.
IF SCREEN-NAME = 'WK_FIELD'.
SCREEN-ACTIVE = '1'.
SCREEN-INPUT = '1'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
else.
LOOP AT SCREEN.
IF SCREEN-NAME = 'WK_FIELD'.
SCREEN-ACTIVE = '1'.
SCREEN-INPUT = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
endif.
endmodule.
Regards
2009 Jun 07 5:49 PM
Hi ,
it needs two actions.
First Capture the action in PBO -by using ON CHAIN or ON REQUEST additions .Make a temp flag 'X'
Second by using that flag in PAI make the corresponding field Editable or Disable as you wish.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |