Application Development 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: 

ALV

Former Member
0 Kudos

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.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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.

3 REPLIES 3

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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.