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

display checkbox based on its value.

Former Member
0 Likes
777

I have two main screens in a dialog programme. In the first screen there are many checkboxes. I have to display those checkboxes in 2nd screen that are selected in first screen, and remaining must be invisible.

This can be done easily using IF condition within LOOP AT SCREEN.

but since there are many checkboxes , is there any other way to do it.

In SCREEN structure, we can get the name of the component, likewise can we get the value of component.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
733

hii,

in the pbo of the second screen

if screen-name = 'name of checkbox' .

loop at screen.

if mark = 'X'.

screen-invisible = 'X'.

modify screen.

endif.

endloop.

endif.

try this code.in place of name of screen enter the name you have given in design time

award if useful.

vikaas

I have two main screens in a dialog programme. In the first screen there are many checkboxes. I have to display those checkboxes in 2nd screen that are selected in first screen, and remaining must be invisible.

This can be done easily using IF condition within LOOP AT SCREEN.

but since there are many checkboxes , is there any other way to do it.

In SCREEN structure, we can get the name of the component, likewise can we get the value of component.

6 REPLIES 6
Read only

Former Member
0 Likes
733

In both of the screens use the same variables for the checkboxes. Then no need of modifying the screen table.

In the first screen Using the check boxes the variables will get some values, if u use the same variables for the checkboxes in the second screen then automitically those checkboxes will get modified as the checkboxes in the first screen.

<u><b>Award if useful</b></u>

Regards,

Sudheer

Read only

Former Member
0 Likes
733

hi Vijay,

Please try the following logic:

STEP1: Use a naming convention to name the checkboxes in a particular way, like,

starting with a pattern CHECK_

STEP2:


loop at screen where screen-value = space.
    if screen-name CS 'CHECK_'  " you can use the offset logic also
          screen-invisible = 1.
          modify screen.
    endif.
endloop.

Hope this helps,

Sajan Joseph.

Read only

0 Likes
733

but there is no component called VALUE in SCREEN.

The line: loop at screen where screen-value = space. is showing error

Read only

Former Member
0 Likes
734

hii,

in the pbo of the second screen

if screen-name = 'name of checkbox' .

loop at screen.

if mark = 'X'.

screen-invisible = 'X'.

modify screen.

endif.

endloop.

endif.

try this code.in place of name of screen enter the name you have given in design time

award if useful.

vikaas

Read only

0 Likes
733

go for the same variables for both the check boxes in the two screens, then there is no need of going for modifying the screen, as i told in my previous replies,

<b>Hope this is useful</b>

Is this useful?

Sudheer

Read only

0 Likes
733

U need to <b><u>award points for all the useful replies</u></b>, and also u nees to <b><u>mark it as Answered if ur problem is solved</u></b>.

Regards

Sudheer