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

Checkbox

Former Member
0 Likes
708

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
Read only

PS_1978
Active Participant
0 Likes
666

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
Read only

Former Member
0 Likes
666

give user command to checkbox

parameters : p_check as checkbox user-command abc.

Read only

PS_1978
Active Participant
0 Likes
667

Hi,

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

Best Regards,

Phani

Read only

Former Member
0 Likes
666

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.

Read only

Former Member
0 Likes
666

hI,

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

demo_dynpro_check_radio

rgds,

bharat.