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

pushbutton

Former Member
0 Likes
461

i am inserting a push button inm y selection screen , if i press the push button i am not getting the basic list

any suggestions plz

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
439

Hi,

Capture its comm code in AT USER-COMMAND.

Write like this,

AT USER-COMMAND.

clear: ucomm.

ucomm = sy-ucomm.

Case ucomm.

case 'BUTTON'. Take Action.

endcase.

Reward if useful!

3 REPLIES 3
Read only

Former Member
0 Likes
440

Hi,

Capture its comm code in AT USER-COMMAND.

Write like this,

AT USER-COMMAND.

clear: ucomm.

ucomm = sy-ucomm.

Case ucomm.

case 'BUTTON'. Take Action.

endcase.

Reward if useful!

Read only

Former Member
0 Likes
439

Hi

Try like thi s

TABLES sscrfields.

DATA flag(1) TYPE c.

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.

Reward all helpfull answers

Regards

Pavan

Read only

Former Member
0 Likes
439

Hi,

Try this,

...

selection-screen: PUSHBUTTON 2(5) ENT1 USER-COMMAND button.

.....

initialization.

ent1 = 'Button'.

At selection screen.

Case sy-ucomm.

when ' button'.

.....

......

endcase.

Don't forget to give User command as 'Button' for tha Push Button.

Regards,

Padmam.