‎2009 Feb 04 10:25 AM
Hi,
On selection screen i have to display 4 select-options and 2 checkboxes.
My requirement is as soon as i enter into selection screen out of 4 select-options it should display only 2 and rest should be hidden and if i check the below checkboxes then only the remaining 2 select-options should be displayed.
so how should i hide the select -option and should be displayed only when i check the checkboxes.
<removed_by_moderator>
Edited by: Julius Bussche on Feb 4, 2009 12:07 PM
‎2009 Feb 04 10:31 AM
‎2009 Feb 04 10:31 AM
‎2009 Feb 04 10:34 AM
Hello,
Just use the event AT selection screen output and check the conditions on checkbox
‎2009 Feb 04 10:44 AM
‎2009 Feb 04 10:33 AM
Hi Mahesh,
You can do this by using,
LOOP AT SCREEN statement.
Regrds
Mansi
‎2009 Feb 04 10:35 AM
Hi,
On selection screen ,take 2 checkboxes say c1 and c2,two bocks say b1 and b2.
For each block, take two select-options with modif id m1 same for both select-options.
for second block also,take remaining two select-options with another modif id m2 same for both select-options.
Then in At selection-screen output,
if c1 eq 'X'.
loop at screen.
if screen-name eq 'B2'.
screen-active = 0.
modify screen.
endif.
endloop.
else.
loop at screen.
if screen-name eq 'B1'.
screen-active = 0.
modify screen.
endif.
endloop.
endif.
This would display only block b1 or block b2 depending on the checkbox selected.
Thanks.
‎2009 Feb 04 10:36 AM
Hi,
Check this code..
TABLES : pernr, t500p.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-s03.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETER : r_cprob TYPE c RADIOBUTTON GROUP gr1 DEFAULT 'X'
USER-COMMAND xxx.
SELECTION-SCREEN COMMENT 4(30) text-s04.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETER : r_cextn TYPE c RADIOBUTTON GROUP gr1 .
SELECTION-SCREEN COMMENT 4(40) text-s05.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK b2.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-s01.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(20) text-s02.
SELECT-OPTIONS: s_pernr FOR pernr-pernr MATCHCODE OBJECT prem.
SELECTION-SCREEN END OF LINE.
SELECT-OPTIONS: s_molga FOR t500p-molga DEFAULT '40' .
SELECTION-SCREEN SKIP.
SELECTION-SCREEN END OF BLOCK b1.
AT SELECTION-SCREEN OUTPUT.
IF r_cprob EQ 'X'.
LOOP AT SCREEN.
IF screen-name CS 'S_PERNR'.
screen-active = '0'.
screen-invisible = '1'.
MODIFY SCREEN.
CLEAR screen.
ELSE.
screen-active = '1'.
screen-invisible = '0'.
MODIFY SCREEN.
CLEAR screen.
ENDIF.
ENDLOOP.
ENDIF.
IF r_cextn EQ 'X'.
LOOP AT SCREEN.
IF screen-name CS 'S_MOLGA'.
screen-active = '0'.
screen-invisible = '1'.
MODIFY SCREEN.
CLEAR screen.
ELSE.
screen-active = '1'.
screen-invisible = '0'.
MODIFY SCREEN.
CLEAR screen.
ENDIF.
ENDLOOP.
ENDIF.
‎2009 Feb 04 10:37 AM
Hi,
Hide the so that you want...
then based on checking the value of check box you can show them or hide...
AT SELECTION-SCREEN OUTPUT.
LOOP AT screen.
if screen-name = 'so*****'.
screen-invisible = 1. "0 show
MODIFY screen endif.
ENDLOOP.
‎2009 Feb 04 10:38 AM
hi
select-options :
s_opt1 for < ... > memory id SOP1,
s_opt2 for < ... > memory id sop1,
s_opt3 for < ... > memory id sop2,
s_opt4 for < ... > memory id sop2.
parameters :
w_chk1 as checkbox user-command CHK,
w_chk2 as checkbox user-command CHK1.
at selection-screen output.
if w_chk1 = 'X' and w_chk2 = 'X'.
loop at screen.
if screen-name cs 'SOP1'
screen-active = 0.
modify screen.
endif.
endloop.
else.
loop at screen.
if screen-name cs 'SOP2'.
screen-active = 0.
modify screen.
endif.
endloop.
endif.
hope this code helps you
Regards,
Siddarth
‎2009 Feb 04 10:40 AM
Hi Mahesh ,
here s sample code to do it.
Consider you have the select-options as s1,s2 , s3,s4 and check boxes as c1 and c2 (user-Command)
heres how you define your checkboxes .
PARAMETERS: C1 AS CHECKBOX,
C2 AS CHECKBOX DEFAULT 'X'
select-options : s1,s2 (modif id sc1)
,s3,s4(modif id sc2) .
Now write Yuor code at At-selection output because your processing on the selection screen and you have to make some modifications to it .
At selection-screen output .
if c1 = 'X' .
loop at screen .
if screen-group1 = 'sc1' .
screen-active = 1 .
modify screen .
endif .
endloop.
elseif c2 = 'X' .
loop at screen .
if screen-group1 = 'sc1' .
screen-active = 0 .
modify screen .
endif .
endloop.
endif .
That is when ever u check the checkbox C1 the 1st 2 select options s1 and s2 will be displayed and if you check the 2nd check box the other 2 select options will be displayed .
All the best and do get back if there s prob.!
Regards ,
Amuktha .
‎2009 Feb 04 10:45 AM
Hi,
Use the event At Selection-screen output. Use Loop at Screen in this event.
‎2009 Feb 04 10:47 AM
Hi mahesh,
First declare 2 select options in one selection screen and other 2 in another one.
then at selection-screen output event.
give each pair a modif id.
at selection-screen output event.
loop at screen.
if screen-GROUP1 eq 'ABC' and checkbox <> 'X'.
screen-active = 0.
modify screen. " This will make 2 select-options invisible and only other 2 would be visible
elseif screen-GROUP1 eq 'BCA' and checkbox EQ 'X'.
screen-active = 1.
modify screen.
endif.
You can also use flags to check if the checkboxes are checked :-).
Thanks
Viquar Iqbal
.
‎2009 Feb 04 10:48 AM
Hi Mahesh valu,
Copy this program you can get the answere.
program:
tables
spfli.
select-options:
s_carrid for spfli-carrid modif id gr1,
s_connid for spfli-connid modif id gr1,
s_cityfr for spfli-cityfrom modif id gr2,
s_cityto for spfli-cityto modif id gr2.
parameters:
w_cbox as checkbox user-command uc,
w_cbox1 as checkbox.
at selection-screen output.
if w_cbox is initial and w_cbox1 is initial.
loop at screen.
if screen-group1 CS 'GR2'.
screen-active = 0.
modify screen.
endif.
endloop.
endif.
Regards
Kiran
‎2009 Feb 04 11:01 AM
Hi,
This logic should help.
data:
w_s1 type i,
w_s2 type i,
w_s3 type i,
w_s4 type i.
Parameters:
P_box1 as checkbox,
P_box2 as checkbox.
Select-options:
s_op1 for w_s1,
s_op2 for w_s2,
s_op3 for w_s3 MODIF ID sc1,
s_op4 for w_s4 MODIF ID sc1.
AT SELECTION-SCREEN OUTPUT.
If p_box1 eq 'X'
and p_box2 eq 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'SC1'.
screen-active = 1.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
else.
LOOP AT SCREEN.
IF screen-group1 = 'SC1'.
screen-active = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
Regards,
Mdi.Deeba Najam.