‎2008 Mar 08 1:28 PM
HI Friends,
How to create pushbuttons in ALV Reports?.Rewards are helpful.
Thanks & Regards,
Narasimha Rao.
‎2008 Mar 10 6:04 AM
Hi,
If you want create pushbuttons in Apllication Tool bar in ALV Report.
First create PF Status with required buttons in Application ToolBar.
1. For ALV Function modules.
create a subroutine with name SET_PF_STATUS.
in that subroutine you declare the PF status.
-
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = gd_repid
i_callback_top_of_page = 'TOP-OF-PAGE'
i_callback_pf_status_set = 'SET_PF_STATUS' "see FORM
is_layout = gd_layout
it_fieldcat = fieldcatalog[]
i_save = 'X'
tables
t_outtab = it_ekko
exceptions
program_error = 1
others = 2.
-
FORM SET_PF_STATUS *
-
FORM set_pf_status USING rt_extab TYPE slis_t_extab.
SET PF-STATUS 'ZNEWSTATUS'.
"Copy of 'STANDARD' pf_status from fgroup SALV
ENDFORM.
2.For ALV Methods.
call screen 100.
in the process before output, call pf status
Process before output.
SET PF-STATUS 'ZNEWSTATUS'.
Hope this solve your problem.
Reward points .
‎2008 Mar 08 10:31 PM
If you mean within the report, have a look at
http://help.sap.com/saphelp_erp2004/helpdata/en/88/387f380c2f2e3ce10000009b38f8cf/frameset.htm
If you want buttons on the main menu toolbar, then the PF-STATUS needs to be defined.
Jonathan
‎2008 Mar 10 6:04 AM
Hi,
If you want create pushbuttons in Apllication Tool bar in ALV Report.
First create PF Status with required buttons in Application ToolBar.
1. For ALV Function modules.
create a subroutine with name SET_PF_STATUS.
in that subroutine you declare the PF status.
-
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = gd_repid
i_callback_top_of_page = 'TOP-OF-PAGE'
i_callback_pf_status_set = 'SET_PF_STATUS' "see FORM
is_layout = gd_layout
it_fieldcat = fieldcatalog[]
i_save = 'X'
tables
t_outtab = it_ekko
exceptions
program_error = 1
others = 2.
-
FORM SET_PF_STATUS *
-
FORM set_pf_status USING rt_extab TYPE slis_t_extab.
SET PF-STATUS 'ZNEWSTATUS'.
"Copy of 'STANDARD' pf_status from fgroup SALV
ENDFORM.
2.For ALV Methods.
call screen 100.
in the process before output, call pf status
Process before output.
SET PF-STATUS 'ZNEWSTATUS'.
Hope this solve your problem.
Reward points .
‎2008 Mar 10 9:57 AM
Hi,
ALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = ws_repid
i_callback_pf_status_set = 'GUI_STAT1'
i_callback_user_command = 'STAT'
is_layout = gs_layout
it_fieldcat = i_fieldcat[]
it_sort = wa_sort1
TABLES
t_outtab = i_zaw_pol_plan.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
FORM gui_stat1 USING rt_extab TYPE slis_t_extab.
SET PF-STATUS 'STANDARD1' EXCLUDING rt_extab.
SET TITLEBAR text-005.
ENDFORM.
double click on 'STANDARD1' expand the application toolbar add buuton Fcode ,Icon .
‎2008 Mar 10 10:30 AM
‎2008 Mar 11 11:23 AM
If you want create pushbuttons in Apllication Tool bar in ALV Report.
First create PF Status with required buttons in Application ToolBar.
1. For ALV Function modules.
create a subroutine with name SET_PF_STATUS.
in that subroutine you declare the PF status.
-
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = gd_repid
i_callback_top_of_page = 'TOP-OF-PAGE'
i_callback_pf_status_set = 'SET_PF_STATUS' "see FORM
is_layout = gd_layout
it_fieldcat = fieldcatalog[]
i_save = 'X'
tables
t_outtab = it_ekko
exceptions
program_error = 1
others = 2.
-
FORM SET_PF_STATUS *
-
FORM set_pf_status USING rt_extab TYPE slis_t_extab.
SET PF-STATUS 'ZNEWSTATUS'.
"Copy of 'STANDARD' pf_status from fgroup SALV
ENDFORM.
2.For ALV Methods.
call screen 100.
in the process before output, call pf status
Process before output.
SET PF-STATUS 'ZNEWSTATUS'.
Hope this solve your problem.
Reward points if useful.