Application Development and Automation 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: 
Read only

Check box checked - Field should be editable - Dialog Programming

Former Member
0 Likes
1,636

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.

1 ACCEPTED SOLUTION
Read only

Vijay
Active Contributor
0 Likes
840

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.

3 REPLIES 3
Read only

Vijay
Active Contributor
0 Likes
841

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

Read only

Former Member
0 Likes
840

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

Read only

Former Member
0 Likes
840

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.