05-02-2006 6:06 AM
hi im working on ALV report,i need a small help,in our standard alv report we do ger a toobar where we have a button called details,now i dont want that button ,i worked on alv using classes,plz help me out with some code.thank you.
05-02-2006 6:14 AM
Hi Babita,
To exclude standard buttons, you fill a table of type UI_FUNCTIONS and pass it to the parameter IT_TOOLBAR_EXCLUDING of the method set_table_for_first_display.
The function codes for the buttons may be acquired by inspecting the constant attributes of the class cl_gui_alv_grid or putting a break point into a method, like the event-handling method of the event after_user_command, which deals with the ALV command.
To hide the entire toolbar, you can set the field NO_TOOLBAR of the layout structure to X.
FORM exclude_tb_functions CHANGING pt_exclude TYPE ui_functions .
DATA ls_exclude TYPE ui_func.
ls_exclude = cl_gui_alv_grid=>mc_fc_maximum .
APPEND ls_exclude TO pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_minimum .
APPEND ls_exclude TO pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_subtot .
APPEND ls_exclude TO pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_sum .
APPEND ls_exclude TO pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_average .
APPEND ls_exclude TO pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_mb_sum .
APPEND ls_exclude TO pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_mb_subtot .
ENDFORM .
Regards,
Aniket
Please award points to useful posts.
05-02-2006 6:12 AM
Babita,
Add the function code of the DETAILS button to the IT_TOOLBAR_EXCLUDING table and pass that to the SET_TABLE method.
The attribute for the same is CL_GUI_ALV_GRID=>MC_FC_DETAIL and the function code is '&DETAIL'.
Regards,
Ravi
Note - Please mark the helpful answers
Message was edited by: Ravikumar Allampallam
05-02-2006 6:13 AM
HI
GOOD
AS PER YOUR REQUIREMENT SUGGEST I WANT TO KNOW THE STANDARD ALV THAT YOU ARE USING OTHERWISE IT WOULD TOUGH TO GIVE YOU THE APPROPRIATE ANSWER.
THANKS
MRUTYUN
05-02-2006 6:14 AM
Hi Babita,
To exclude standard buttons, you fill a table of type UI_FUNCTIONS and pass it to the parameter IT_TOOLBAR_EXCLUDING of the method set_table_for_first_display.
The function codes for the buttons may be acquired by inspecting the constant attributes of the class cl_gui_alv_grid or putting a break point into a method, like the event-handling method of the event after_user_command, which deals with the ALV command.
To hide the entire toolbar, you can set the field NO_TOOLBAR of the layout structure to X.
FORM exclude_tb_functions CHANGING pt_exclude TYPE ui_functions .
DATA ls_exclude TYPE ui_func.
ls_exclude = cl_gui_alv_grid=>mc_fc_maximum .
APPEND ls_exclude TO pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_minimum .
APPEND ls_exclude TO pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_subtot .
APPEND ls_exclude TO pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_sum .
APPEND ls_exclude TO pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_average .
APPEND ls_exclude TO pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_mb_sum .
APPEND ls_exclude TO pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_mb_subtot .
ENDFORM .
Regards,
Aniket
Please award points to useful posts.