2006 Jul 15 6:29 AM
can anybody tell me how to add pushbutton in reports as well as in alvs
can anybody tell me how to add pushbutton in reports as well as in alvs
2006 Jul 15 8:07 AM
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
2006 Jul 15 8:08 AM
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
2006 Jul 15 8:11 AM
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
2006 Jul 15 8:50 AM
2006 Jul 15 1:22 PM
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.
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |