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

screen field settings

Former Member
0 Likes
738

Hi all

I have a checkbox and a text box on the screen.I have to activate the textbox whenever check box value is set.But my program is a module pool program with includes,screens,function modules etc.Please help me to do this.

Thanks in advance.

Regards

Giri.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
697

in PBO of the screen u need to add the code.

u need to loop at screen.

if screen-field = checkbox

textbox-display = 0.

endif.

modify screen

endloop

in PBO of the screen u need to add the code.

u need to loop at screen.

if screen-field = checkbox

textbox-display = 0.

endif.

modify screen

endloop

6 REPLIES 6
Read only

Former Member
0 Likes
697

Please dont open another thread for the same ..

in ur PBO of the required screen jsut add ur code .

we have given the code in ur previous thread .

just take the screen number where u want to add this logic and write the code over there .

regards,

vijay

Read only

Former Member
0 Likes
697

hai

In PBO of that particular screen use,

loop at screen.

screen-group1 = 'SC1'.

screen-input = '0'.

modify screen.

endloop.

u just specify the SC1 in screen painter at the designing time of it.

u can set flag according to our scenerio.

Read only

Former Member
0 Likes
698

in PBO of the screen u need to add the code.

u need to loop at screen.

if screen-field = checkbox

textbox-display = 0.

endif.

modify screen

endloop

Read only

Former Member
0 Likes
697

In screen painter assign screen group name to text box.

in PBO.

loop at screen.

if ch_box = 'X'. "If check box is selected.

if screen-group1 = 'SC1'.

screen-input = '1'.

modify screen.

endif.

else.

if screen-group1 = 'SC1'.

screen-input = '0'.

modify screen.

endif.

endif.

endloop.

Read only

Former Member
0 Likes
697

hi giri try with this following code you can get what do u want.

*coding

tables:sscrfields.

data:a type c value 'X'.

selection-screen begin of block b with frame.

parameters:chk type c as checkbox user-command CHEK.

parameters:prm(4) type c Modif id g1.

selection-screen end of block b.

at selection-screen output.

loop at screen.

if screen-group1 = 'G1'.

if a = 'X'.

screen-input = 0.

modify screen.

endif.

endif.

endloop.

at selection-screen.

CASE SSCRFIELDS-UCOMM.

WHEN 'CHEK'.

if chk = 'X'.

clear a.

elseif a = 'X'.

endif.

ENDCASE.

hope it will helpful.

reward me.

Read only

Former Member
0 Likes
697

TRY THIS:

REPORT Z_CHECK_BOX .

PARAMETERS: CH1 AS CHECKBOX.

PARAMETERS: VAR(10) TYPE C MODIF ID ABC.

AT SELECTION-SCREEN OUTPUT.

IF CH1 = ' '.

LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'ABC'.

SCREEN-INPUT = 0.

SCREEN-OUTPUT = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ELSEIF CH1 = 'X'..

LOOP AT SCREEN.

SCREEN-INPUT = 1.

SCREEN-OUTPUT = 1.

MODIFY SCREEN.

ENDLOOP.

ENDIF.

CHEERS.