10-20-2005 3:50 PM
Men,
I would like to know whether it is possible to have a
Control Button(like in Module Pool Screens) in Standard Selection Screen??
If it is possible, let know with some code sample!!!!
And explain me how to capture the Control when this button is Clicked?
Many Thanks
Kam
10-20-2005 3:58 PM
Here's a quick sample.
report zrich_0001.
type-pools: icon.
selection-screen pushbutton 40(20) gocfg user-command gocfg.
at selection-screen .
case sy-ucomm.
when 'GOCFG'.
call transaction 'VA01'.
endcase.
start-of-selection.
at selection-screen output.
* Write pushbutton text
write icon_configuration as icon to gocfg.
concatenate gocfg 'Go to VA01' into gocfg
separated by space.
Regards,
Rich Heilman
10-20-2005 4:06 PM
Hi,
If you are talking about Push Button,here is the way you can have a push button in selection screen.
SELECTION-SCREEN PUSHBUTTON fmt name USER-COMMAND ucom.
handle the user command
at user-command event.
If this is not what you are looking for, please ignore.
Thanks,
ravi
10-20-2005 7:23 PM
REPORT ZR_ALV_RB1.
TABLES sscrfields.
SELECTION-SCREEN BEGIN OF BLOCK ONE WITH FRAME TITLE TEXT-001.
selection-screen: PUSHBUTTON 2(10) but1 USER-COMMAND cli1,
PUSHBUTTON /12(30) but2 USER-COMMAND cli2
VISIBLE LENGTH 10.
selection-screen end of block one.
AT SELECTION-SCREEN.
CASE sscrfields.
WHEN 'CLI1'.
message i000(zz) with 'Button 1 was pressed'.
WHEN 'CLI2'.
message i000(zz) with 'Button 2 was pressed'.
ENDCASE.
initialization.
but1 = 'Button 1'.
but2 = 'Button 2'.
START-OF-SELECTION.
Rest of your logic here.
Please reward points accordingly.