‎2007 May 07 6:06 AM
Hi Friends,
Please tell me the answer of the following question:
suppose two push buttons(p1 & p2) are there and two selection screens(s1 & s2) are there....When p1 is pressed s1 will remain acitve but s2 will be grayed out...similarly when p2 is pressed s2 will remain active but s1 wiil be grayed out.
what will be the coding for this.....
‎2007 May 07 6:09 AM
‎2007 May 07 6:08 AM
u need to code in at selection screen output
when push btn 1
then screen 1 'active'
else
screen 2 'active
regards
anjlai
‎2007 May 07 6:09 AM
‎2007 May 07 6:18 AM
hi..
Gourp the elements in the selection-screen to same modif id.In at selection-screen output you can change the propeties of the screen using the modif id and use loop at screen for your use.
regards.
veeresh
‎2007 May 07 6:20 AM
Hi Reema,
Refer this code :
SELECTION-SCREEN BEGIN OF BLOCK a1 WITH FRAME TITLE a1title.
parameters : d_matnr like mara-matnr.
SELECTION-SCREEN PUSHBUTTON1 50(10) txt1 USER-COMMAND com1.
parameters : d_vbeln like vbak-vbeln.
SELECTION-SCREEN PUSHBUTTON2 50(10) txt2 USER-COMMAND com2.
SELECTION-SCREEN END OF BLOCK a1.
Loop at screen.
If PUSHBUTTON1 <> 'X' and screen-value = d_matnr.
screen-active =0.
modify screen.
elseif PUSHBUTTON2 <> 'X' and screen-value = d_vbeln..
screen-active =0.
modify screen.
endif.
endloop.
read help on screen structure........
reward points if helpful.
Regards,
Hemant
‎2007 May 07 6:45 AM
U can code like this....
TABLES sscrfields.
.....
AT SELECTION-SCREEN OUTPUT.
CASE sscrfields.
WHEN 'BUT1'.
loop at screen.
if screen-name = 's2' .
screen-active = '0'.
modify screen.
endif.
endloop.
WHEN 'BUT2'.
loop at screen.
if screen-name = 's1' .
screen-active = '0'.
modify screen.
endif.
endloop.
ENDCASE.