Application Development 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: 

Checkbox

Former Member
0 Kudos

Hi

I have requirement like this

when i click on check box,some fields below should become mandatory,when i unclick checkbox,then it should not become mandatory..

when i tick checkbox,its working fine

but when i unclick checkbox,its not working

my code below

IF p_check = 'X'.

LOOP AT SCREEN.

IF screen-group1 = 'XYZ'.

screen-required = 1.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

ELSE.

LOOP AT SCREEN.

IF screen-group1 = 'XYZ'.

screen-required = 0.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

ENDIF.

Any inputs plz

1 ACCEPTED SOLUTION

sivapuram_phanikumar
Active Participant
0 Kudos

Hi,

while defining the check box, give user command to it and write the code in AT SELECTION-SCREEN OUTPUT event...

Best Regards,

Phani

4 REPLIES 4

Former Member
0 Kudos

give user command to checkbox

parameters : p_check as checkbox user-command abc.

sivapuram_phanikumar
Active Participant
0 Kudos

Hi,

while defining the check box, give user command to it and write the code in AT SELECTION-SCREEN OUTPUT event...

Best Regards,

Phani

Former Member
0 Kudos

hi,

when u unclick check box write code code in AT USER-COMMAND using EXIT keyword as

in flow logic after pbo write.

module EXIT.

in PBO event

if p_box eq 'x'.

LOOP AT SCREEN.

IF screen-group1 = 'XYZ'.

screen-required = 1.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

endif.

AT USER-COMMAND EXIT MODULE EXIT.

if p_box is initial.

loop at screen.

IF screen-group1 = 'XYZ'.

screen-required = 1.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

endif.

if helpful reward some points.

with regards,

suresh.

Former Member
0 Kudos

hI,

SEE THE SYSTEM DEFINED PROGRAM for help on check box action.

demo_dynpro_check_radio

rgds,

bharat.