2007 May 14 11:32 AM
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.
2007 May 14 12:44 PM
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
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
2007 May 14 11:38 AM
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
2007 May 14 12:02 PM
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.
2007 May 14 12:19 PM
but there is no component called VALUE in SCREEN.
The line: loop at screen where screen-value = space. is showing error
2007 May 14 12:44 PM
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
2007 May 14 12:48 PM
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
2007 May 18 10:15 AM
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
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |