2006 Oct 19 12:59 PM
Can someone give an example of create a pushbuttom in a selection screen 1000? I draw the button with screen painter and i assign a function code.
Which event is triggered when i push the button??? AT-USER COMMAND ??? I think that isn't because is in the selection-screen.
thanks,
SILVIa
2006 Oct 19 1:06 PM
To create a pushbutton on the selection screen you use:
SELECTION SCREEN PUSHBUTTON [/]<pos(len)> <push>
USER-COMMAND <ucom> [MODIF ID <key>].
and the event is AT-SELECTION-SCREEN
2006 Oct 19 1:07 PM
Refer the demo example:
demo_sel_screen_pushbutton
The event that is triggered is the very familiar " at selection-screen."
REgards,
Ravi
2006 Oct 19 1:09 PM
Hi,
You can create buttons on the selection using the following.
SELECTION-SCREEN PUSHBUTTON <Name>
USER-COMMAND <fcode>.
You can get the fcode from sy-ucomm at the followng event.
AT SELECTION-SCREEN. (THIS IS PAI for selection screen).
Regards,
Sesh
2006 Oct 19 1:09 PM
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.
Regards,
Prakash.
2006 Oct 19 1:27 PM
Hi
TABLES: SSCRFIELDS.
If you need a pushbuttom on the screen:
SELECTION-SCREEN PUSHBUTTON X(Y) <NAME> USER-COMMAND <COMMAND>.
X is the distance from the left border and Y is the lenght.
INITIALIZATION.
<NAME> = 'My Buttom'.
If you need it on the status:
SELECTION-SCREEN FUNCTION KEY N.
with N is from 1 to 5.
INITIALIZATION.
MOVE 'My Buttom' TO SSCRFIELDS-FUNCTXT_0<N>.
Manage the ok-code in the AT SELECTION-SCREEN event
AT SELECTION-SCREEN.
IF SSCRFIELDS-UCOMM = <CODE>.
...
ENDIF.
Max