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

reports

Former Member
0 Likes
637

can anybody tell me how to add pushbutton in reports as well as in alvs

5 REPLIES 5
Read only

dani_mn
Active Contributor
0 Likes
605

Hi,

check this report it have push button in its tool bar.

report zwa_test1.

TABLES: sscrfields,rlgrap .
INCLUDE <icon> .

SELECTION-SCREEN FUNCTION KEY 1 .
PARAMETERS: p_file LIKE rlgrap-filename DEFAULT 'C:test.txt' .

INITIALIZATION .

CONCATENATE icon_next_object 'Download into excel'
INTO sscrfields-functxt_01 .


AT SELECTION-SCREEN.
IF sscrfields-ucomm = 'FC01'.
message s000(su) with 'testing'.
ENDIF .

START-OF-SELECTION.
WRITE: 'TESTING'.

Regards,

Wasim Ahmed

Read only

dani_mn
Active Contributor
0 Likes
605

and

if you want buttons on selection screen the use this.

selection-screen pushbutton 10(20) text-003 user-command engl.
selection-screen pushbutton 50(20) text-004 user-command germ.

at selection-screen.
at user-command.
case sy-ucomm.
when 'engl'.
     lang-english = 'Y'.
when 'germ'.
     lang-german = 'Y'.
endcase.

Regards,

Wasim Ahmed

Read only

Former Member
0 Likes
605

Hi,

In the report program.

SET PF-STATUS `ZPFST`.

Double click on ZPFST. Goto Application toolbar. Type a button name. Double click on it. Enter the button text. Activate the pf-status.

Activate the program.

Best regards,

Prashant

Read only

Laxmana_Appana_
Active Contributor
0 Likes
605

Hi,

Check this link for adding buttons in ALV toolbar.

Regards

Appana

Read only

Former Member
0 Likes
605

Hi Pavan,

Use this for classes-

DATA: BTN_LS TYPE STB_BUTTON.

CLASS LCL_EVT_RECEIVER DEFINITION.

PUBLIC SECTION.

METHODS:

HANDLE_TOOLBAR

FOR EVENT TOOLBAR OF CL_GUI_ALV_GRID

IMPORTING E_OBJECT.

ENDCLASS.

CLASS LCL_EVT_RECEIVER IMPLEMENTATION.

METHOD HANDLE_TOOLBAR.

CLEAR : BTN_LS, BTN_TBL.

BTN_LS-BUTN_TYPE = 0.

BTN_LS-ICON = '@AU@'.

BTN_LS-FUNCTION = 'OPCH'.

BTN_LS-TEXT = 'Change Operation'.

APPEND BTN_LS TO E_OBJECT->MT_TOOLBAR.

ENDMETHOD.

ENDCLASS.

Hope this helps u.

Regards,

Seema.