Application Development 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: 

Selection Screen With a Control Button

Former Member
0 Kudos

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

3 REPLIES 3

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

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

former_member181962
Active Contributor
0 Kudos

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

0 Kudos

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.