2008 Jan 08 10:10 AM
Hi,
I am developing a program. In selection screen I face one problem.
For three scenario three blocks I prepared. and another block for three radio button for three scenario.
My objectives is if we select one readio button for one scenario, another two blocks for two scenario should be invisible or disable.
Can anybody help me in validation.
Points will be rewarded.
Best Regards,
BD.
Hi,
I am developing a program. In selection screen I face one problem.
For three scenario three blocks I prepared. and another block for three radio button for three scenario.
My objectives is if we select one readio button for one scenario, another two blocks for two scenario should be invisible or disable.
Can anybody help me in validation.
Points will be rewarded.
Best Regards,
BD.
2008 Jan 08 10:14 AM
Hi,
See this sample code
If option1 = 'X'.
loop at screen.
field-invisible = '1'.
modify screen.
endloop.
endif.
Regards,
Satish
2008 Jan 08 10:19 AM
Hi,
this code will be help you :
it's just e.g for 2 radiobutton :
at selection-screen output.
perform set_editable.
loop at screen.
if screen-group1 = 'G1' and p_etud = space.
screen-active = 0.
modify screen.
elseif screen-group1 = 'G2' and p_form = space.
screen-active = 0.
modify screen.
endif.
endloop.
form set_editable.
loop at screen.
if screen-name = 'P_VAR'.
screen-value_help = 1 .
modify screen.
endif.
endloop.
if p_etud = space.
loop at screen.
if screen-name = 'P_NOM_E' or
screen-name = 'P_PRE_E' or
screen-name = 'P_DAT_NE' or
screen-name = 'P_GSM_E' or
screen-name = 'VALIDER1'.
screen-input = 0.
modify screen.
endif.
endloop.
elseif p_form = space.
loop at screen.
if screen-name = 'P_NOM_F' or
screen-name = 'P_PRE_F' or
screen-name = 'P_DAT_NF' or
screen-name = 'P_DAT_EM' or
screen-name = 'P_MASC_F' or
screen-name = 'VALIDER2'.
screen-input = 0.
modify screen.
endif.
endloop.
endif.
endform. " set_editable
Dont forget points
Mustapha
2008 Jan 08 10:22 AM
Hi,
ex :
block 1
A modif ID 'MOD1',
B modif ID 'MOD1',
C modif ID 'MOD1' .
block 2
D modif ID 'MOD2',
E modif ID 'MOD2',
F modif ID 'MOD2' .
block 3
G modif ID 'MOD3',
H modif ID 'MOD3',
I modif ID 'MOD3' .
block 4
R1 radio button1
R2 radio button2
R3 radio button3
AT SLECTIO-SCREEN OUTPUT.
IF R1 Eq 'X'
LOOP AT SCREEN.
IF screen-group1 EQ 'MOD1'.
screen-INVISIBLE = 1.
MODIFY SCREEN.
ENDIF.
IF screen-group1 EQ 'MOD2'.
screen-INVISIBLE = 0.
MODIFY SCREEN.
ENDIF.
IF screen-group1 EQ 'MOD3'.
screen-INVISIBLE = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ELSEIF R2 Eq 'X'
LOOP AT SCREEN.
IF screen-group1 EQ 'MOD1'.
screen-INVISIBLE = 0.
MODIFY SCREEN.
ENDIF.
IF screen-group1 EQ 'MOD2'.
screen-INVISIBLE = 1.
MODIFY SCREEN.
ENDIF.
IF screen-group1 EQ 'MOD3'.
screen-INVISIBLE = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
IF R3 Eq 'X'
LOOP AT SCREEN.
IF screen-group1 EQ 'MOD1'.
screen-INVISIBLE = 0.
MODIFY SCREEN.
ENDIF.
IF screen-group1 EQ 'MOD2'.
screen-INVISIBLE = 0.
MODIFY SCREEN.
ENDIF.
IF screen-group1 EQ 'MOD3'.
screen-INVISIBLE = 1.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
Don't forget to reward if useful.....
2008 Jan 08 10:31 AM
Hi,
Please see the below code :
: bsis.
SELECTION-SCREEN : BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETER : sp_sel radiobutton group rad USER-COMMAND radio DEFAULT 'X',
sp_all RADIOBUTTON GROUP rad.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
SELECT-OPTIONS : so_bukrs FOR bsis-bukrs MODIF ID sp1.
SELECT-OPTIONS : so_hkont FOR bsis-hkont MODIF ID sp2.
SELECTION-SCREEN END OF BLOCK b2.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF sp_sel = 'X'.
IF screen-group1 = 'SP2'.
screen-input = '0'.
screen-invisible = '0'.
screen-required = '0'.
MODIFY SCREEN.
ENDIF.
endif.
ENDLOOP.
similarly for other two.
Thanks,
Sriram Ponna.
2008 Jan 08 10:40 AM
this is simple replort
use it, it will be verry helpful :
*=================================================================
Report Test_editable.
**Ecran de séléction
SELECTION-SCREEN BEGIN OF BLOCK total WITH FRAME TITLE text-t99.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 15(10) text-t01 FOR FIELD p_etud.
PARAMETER p_etud RADIOBUTTON GROUP r0 USER-COMMAND e1 DEFAULT 'X'.
SELECTION-SCREEN END OF LINE.
PARAMETERS : p_nom_e(20) TYPE c, " obligatory,
p_pre_e(20) TYPE c,
p_dat_ne LIKE sy-datum.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 15(10) text-t02 FOR FIELD p_form.
PARAMETER p_form RADIOBUTTON GROUP r0. " user-command f1.
SELECTION-SCREEN END OF LINE.
PARAMETERS : p_nom_f(20) TYPE c, " obligatory,
p_pre_f(20) TYPE c,
p_dat_nf LIKE sy-datum.
SELECTION-SCREEN END OF BLOCK total.
AT SELECTION-SCREEN OUTPUT.
IF p_etud = space.
LOOP AT SCREEN.
IF screen-name = 'P_NOM_E' OR
screen-name = 'P_PRE_E' OR
screen-name = 'P_DAT_NE'.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ELSEIF p_form = space.
LOOP AT SCREEN.
IF screen-name = 'P_NOM_F' OR
screen-name = 'P_PRE_F' OR
screen-name = 'P_DAT_NF'.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
LOOP AT SCREEN.
IF screen-group1 = 'G1' AND p_etud = space.
screen-active = 0.
MODIFY SCREEN.
ELSEIF screen-group1 = 'G2' AND p_form = space.
screen-active = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
*=================================================================
Good luck
Mustapha
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |