2006 Nov 13 10:48 AM
Hi All,
Just want to know abt selection-screen pushbutton,
am using one pushbutton in selection screen and given name as execute, if i click on this execute pushbutton one perform statement has to execute, i had written the code as AT Selection-Screen.
case sy-ucomm.
when 'pbutt1'. (pbutt1 is a pushbutton)
perform subroutine1.
when 'pbutt2'.
perform subroutine2.
endcase.
Frnds, but its not working, can any body send me Correct code ASAP.
BALU.
2006 Nov 13 10:52 AM
hi try this
tables sscrfields.
selection-screen pushbutton 5(5) push user-command push1.
selection-screen pushbutton 20(5) push1 user-command push2.
at selection-screen.
case sscrfields-ucomm.
when 'PUSH1'.
when 'PUSH2'.
endcase.
Hi All,
Just want to know abt selection-screen pushbutton,
am using one pushbutton in selection screen and given name as execute, if i click on this execute pushbutton one perform statement has to execute, i had written the code as AT Selection-Screen.
case sy-ucomm.
when 'pbutt1'. (pbutt1 is a pushbutton)
perform subroutine1.
when 'pbutt2'.
perform subroutine2.
endcase.
Frnds, but its not working, can any body send me Correct code ASAP.
BALU.
2006 Nov 13 10:52 AM
hi try this
tables sscrfields.
selection-screen pushbutton 5(5) push user-command push1.
selection-screen pushbutton 20(5) push1 user-command push2.
at selection-screen.
case sscrfields-ucomm.
when 'PUSH1'.
when 'PUSH2'.
endcase.
2006 Nov 13 10:52 AM
TABLES sscrfields.
SELECTION-SCREEN:
BEGIN OF SCREEN 500 AS WINDOW TITLE title,
PUSHBUTTON 2(10) but1 USER-COMMAND cli1,
PUSHBUTTON 12(30) but2 USER-COMMAND cli2
VISIBLE LENGTH 10,
END OF SCREEN 500.
AT SELECTION-SCREEN.
CASE sscrfields.
WHEN 'CLI1'.
your code......
WHEN 'CLI2'.
perform-----
ENDCASE.
2006 Nov 13 10:54 AM
Hi ,
I tried that one also, but its not coming, subroutines r not working, and even if i give the messages also its not working, plz give me the correct code
2006 Nov 13 10:54 AM
Hi Bala,
Refer standard program:
DEMO_SEL_SCREEN_FUNCTION_KEY
DEMO_SEL_SCREEN_PUSHBUTTON
Reward points if this helps.
Manish
2006 Nov 13 10:55 AM
Use this:
SELECTION-SCREEN PUSHBUTTON /15(20) button1 USER-COMMAND EXEC1.
SELECTION-SCREEN PUSHBUTTON /15(20) button2 USER-COMMAND EXEC2.
You can initialize the texts for the push-buttons at INITIALIZATION.
CONCATENATE icon_green_light
'Button 1'(029) INTO button1.You can select the icon if needed,
AT SELECTION SCREEN.
CASE sscrfields.
WHEN 'EXEC1'.
perform subroutine1.
WHEN 'EXCE2'.
perform subroutine2.
ENDCASE.Hope this helps
2006 Nov 13 11:02 AM
hi,
Refer the demo example:
<i>demo_sel_screen_pushbutton</i>
The event that is triggered is the very familiar " at selection-screen."
REPORT ypra_sample60. .
INCLUDE <icon>.
DATA: ls_icon(14).
SELECTION-SCREEN:
BEGIN OF BLOCK b3 WITH FRAME,
BEGIN OF LINE,
COMMENT 1(32) text-001,
PUSHBUTTON 33(10) pushy USER-COMMAND upload,
END OF LINE,
END OF BLOCK b3.
INITIALIZATION.
CONCATENATE icon_export text-002 INTO ls_icon.
MOVE ls_icon TO pushy.Here text-001 = Index and Quotations Upload,
text-002 = Upload
Whenever the user presses this button selection screen event will triggered.
rgds
Anver
2006 Nov 13 11:03 AM
hi
good
go through this example and use accordingly.
REPORT DEMO.
TABLES SSCRFIELDS.
DATA FLAG.
SELECTION-SCREEN:
BEGIN OF SCREEN 500 AS WINDOW TITLE TIT,
BEGIN OF LINE,
PUSHBUTTON 2(10) BUT1 USER-COMMAND CLI1,
PUSHBUTTON 12(10) TEXT-020 USER-COMMAND CLI2,
END OF LINE,
BEGIN OF LINE,
PUSHBUTTON 2(10) BUT3 USER-COMMAND CLI3,
PUSHBUTTON 12(10) TEXT-040 USER-COMMAND CLI4,
END OF LINE,
END OF SCREEN 500.
AT SELECTION-SCREEN.
CASE SSCRFIELDS.
WHEN 'CLI1'.
FLAG = '1'.
WHEN 'CLI2'.
FLAG = '2'.
WHEN 'CLI3'.
FLAG = '3'.
WHEN 'CLI4'.
FLAG = '4'.
ENDCASE.
START-OF-SELECTION.
TIT = 'Four Buttons'.
BUT1 = 'Button 1'.
BUT3 = 'Button 3'.
CALL SELECTION-SCREEN 500 STARTING AT 10 10.
CASE FLAG.
WHEN '1'.
WRITE / 'Button 1 was clicked'.
WHEN '2'.
WRITE / 'Button 2 was clicked'.
WHEN '3'.
WRITE / 'Button 3 was clicked'.
WHEN '4'.
WRITE / 'Button 4 was clicked'.
WHEN OTHERS.
WRITE / 'No Button was clicked'.
ENDCASE.
thanks
mrutyun^
2006 Nov 13 11:04 AM
check the capital letter and small letter also please use capital letter for defining user-command and case statement also.
selection-screen pushbutton 5(5) push user-command PUSH1
selection-screen pushbutton 20(5) push1 user-command PUSH2.
at selection-screen.
case sscrfields-ucomm.
when 'PUSH1'.
when 'PUSH2'.
endcase.
try this.
2006 Nov 13 11:08 AM
hi,
tables: sscrfields.
AT Selection-Screen.
case <b>sscrfields.</b>
when 'pbutt1'. (pbutt1 is a pushbutton)
perform subroutine1.
when 'pbutt2'.
perform subroutine2.
endcase.
hope this helps,
do reward if it helps,
Priya.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |