‎2006 Dec 06 8:37 AM
hi all,
in selection screen i have 6 fields , 2 push buttons . when i click on first button . first three fields must be enabled and remaining buttons must be disabled . and if i click on second pushbutton first three fields must be disabled and remaining should be enable how can i do that.
thnx in advance
‎2006 Dec 06 8:39 AM
hi Amar,
Put Your Logic at <b>AT SELECTION-SCREEN OUTPUT</b>. event ..
Regards,
Santosh
‎2006 Dec 06 8:42 AM
‎2006 Dec 06 8:43 AM
‎2006 Dec 06 8:47 AM
Hi
In AT SELECTION-SCREEN OUTPUT event.
If OK_CODE eq 'BUT1'.
LOOP AT SCREEN.
IF SCREEN-NAME = 'TEXT1'.
disable it.
ENDIF.
IF = 'TEXT2'
disable
same for text3.
ENDLOOP.
ELSEIF OK_CODE EQ 'BUT2'..
LOOP AT SCREEN.
IF = TEXT4.
disable.
endif.
write other conditions.
ENDLOOP.
ENDIF.
Regards
Surya.
‎2006 Dec 06 8:47 AM
Hi,
p1(10) modif id Z1,
p2(10) modif id z2,
p3(10) modif id z3,
p4(10) modif id z4,
p5(10) modif id z5,
p6(10) modif id z6.
SELECTION-SCREEN PUSHBUTTON /1(24) name USER-COMMAND Button1.
SELECTION-SCREEN PUSHBUTTON /2(24) name USER-COMMAND Button2.
AT SELECTION-SCREEN output.
LOOP AT SCREEN.
IF ( sscrfields-ucomm = 'BUTTON1' and ( SCREEN-GROUP1 = 'Z1' or
SCREEN-GROUP1 = 'Z2' or SCREEN-GROUP1 = 'Z3' ) ) or
( sscrfields-ucomm = 'BUTTON2' and ( SCREEN-GROUP1 = 'Z4' or
SCREEN-GROUP1 = 'Z5' or SCREEN-GROUP1 = 'Z6' ) ).
SCREEN-input = 1.
ELSE.
SCREEN-input = 0.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
Kindly reward points if it helps.
‎2006 Dec 06 8:53 AM
Hi Amar
I hope below code will give you some idea:
parameters: p_fld1(10) type c,
p_fld2(10) type c,
p_fld3(10) type c,
p_fld4(10) type c,
p_fld5(10) type c,
p_fld6(10) type c.
selection-screen begin of line.
selection-screen pushbutton: (5) but1 user-command ABC,
15(5) but2 user-command DEF.
selection-screen end of line.
data: f_3 type i value 1,
l_3 type i.
at selection-screen output.
loop at screen.
case screen-name.
when 'P_FLD1' or 'P_FLD2' or 'P_FLD3'.
screen-active = f_3.
when 'P_FLD4' or 'P_FLD5' or 'P_FLD6'.
screen-active = l_3.
endcase.
modify screen.
endloop.
at selection-screen.
if sy-ucomm = 'ABC'.
f_3 = 1.
l_3 = 0.
elseif sy-ucomm = 'DEF'.
f_3 = 0.
l_3 = 1.
endif.
initialization.
move: 'BUT1' to but1,
'BUT2' to but2.Kind Regards
Eswar