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

push button on selection screen

Former Member
0 Likes
810

How can we provide Push Button on Selection screen .?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
570

Hi,

TABLES sscrfields.

TYPE-POOLS icon.

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'.

...

WHEN 'CLI2'.

...

ENDCASE.

START-OF-SELECTION.

title = 'Push button'.

but1 = 'Button 1'.

CALL FUNCTION 'ICON_CREATE'

EXPORTING

name = icon_information

text = 'Button 2'

info = 'My Quickinfo'

IMPORTING

RESULT = but2

EXCEPTIONS

OTHERS = 0.

CALL SELECTION-SCREEN '0500' STARTING AT 10 10.

check this link

http://www.planetsap.com/howdo_a.htm#PBUTTON

Reward all helpfull answers

Regards,

4 REPLIES 4
Read only

Former Member
0 Likes
571

Hi,

TABLES sscrfields.

TYPE-POOLS icon.

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'.

...

WHEN 'CLI2'.

...

ENDCASE.

START-OF-SELECTION.

title = 'Push button'.

but1 = 'Button 1'.

CALL FUNCTION 'ICON_CREATE'

EXPORTING

name = icon_information

text = 'Button 2'

info = 'My Quickinfo'

IMPORTING

RESULT = but2

EXCEPTIONS

OTHERS = 0.

CALL SELECTION-SCREEN '0500' STARTING AT 10 10.

check this link

http://www.planetsap.com/howdo_a.htm#PBUTTON

Reward all helpfull answers

Regards,

Read only

Former Member
0 Likes
570

TABLES sscrfields.

TYPE-POOLS icon.

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'.

...

WHEN 'CLI2'.

...

ENDCASE.

START-OF-SELECTION.

title = 'Push button'.

but1 = 'Button 1'.

CALL FUNCTION 'ICON_CREATE'

EXPORTING

name = icon_information

text = 'Button 2'

info = 'My Quickinfo'

IMPORTING

RESULT = but2

EXCEPTIONS

OTHERS = 0.

CALL SELECTION-SCREEN '0500' STARTING AT 10 10.

check this link

http://www.planetsap.com/howdo_a.htm#PBUTTON

ashish

Read only

ferry_lianto
Active Contributor
0 Likes
570

Hi,

Please check these demo program (SE38).

DEMO_SEL_SCREEN_PUSHBUTTON

DEMO_SEL_SCREEN_FUNCTION_KEY

Regards,

Ferry Lianto

Read only

Former Member
0 Likes
570

Hi Avi,

You can create Push Buttons in the Slection Screen by assigning a User commnand to it.

Below is the stynax

SELECTION-SCREEN BEGIN OF SCREEN 1000.

SELECTION-SCREEN PUSHBUTTON 15(25) PUBU

USER-COMMAND CODE1.

SELECT-OPTIONS SEL2 FOR SPFLI_WA-CONNID.

PARAMETERS PAR2 TYPE I.

SELECTION-SCREEN END OF SCREEN 1000.

then you need to write the code for the User command ( here CODE1) at the Selection screen event.

You can also check the Program demo_sel_screen_pushbutton in any Sap Server. this is a demo program.

Reward if helpful.

Regards,

Harini.S