Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Button in a selection screen

Former Member
0 Likes
718

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

5 REPLIES 5
Read only

Former Member
0 Likes
647

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

Read only

Former Member
0 Likes
647

Refer the demo example:

demo_sel_screen_pushbutton

The event that is triggered is the very familiar " at selection-screen."

REgards,

Ravi

Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
647

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

Read only

Former Member
0 Likes
647

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.

Read only

0 Likes
647

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