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 in Rpt

Former Member
0 Likes
885

How Can keep push buttons in the selection screen and also in list?

If so plz give me a sample code.

Thanks in Advance.

Mathan

7 REPLIES 7
Read only

Former Member
0 Likes
822

Hi,

selection-screen PUSHBUTTON 60(14) text-031 USER-COMMAND PUSH.

Regards

Sudheer

Read only

Former Member
0 Likes
822

Hello,

Check report DEMO_SEL_SCREEN_PUSHBUTTON

In case you donat have this report on oyur system I paste the code here

REPORT demo_sel_screen_pushbutton.

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.

MESSAGE i888(sabapdocu) WITH text-001 sscrfields-ucomm.
CASE sscrfields-ucomm.
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.

Also check this thread:

http://www.sapdevelopment.co.uk/reporting/selscr/selscrhome.htm

Vasanth

Read only

Former Member
0 Likes
822

Hi,

FYI...

TABLES SSCRFIELDS.

SELECTION-SCREEN PUSHBUTTON PUSH1 USER-COMMAND XYZ.

INITIALIZATION.

MOVE 'My Button' TO PUSH1.

AT SELECTION-SCREEN.

IF SSCRFIELDS-UCOMM = 'XYZ'.

<code goes here >

ENDIF.

Read only

Former Member
0 Likes
822
Read only

Former Member
0 Likes
822

Refer demo program: demo_sel_screen_pushbutton

Regards,

Ravi

Read only

Former Member
0 Likes
822

hi,

for none of them you have given points.

what type of answer do u expect.