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

objects alv grid

Former Member
0 Likes
386

Hi,

I need to avoid the displaying the Crystal Report Functionality which is present in the drop down functionality of Excel Icon on ALV grid using object methods .

Am using

call method grid1->set_table_for_first_display

exporting

i_save = 'A'

is_variant = gs_variant

is_print = gs_print

is_layout = gs_layout

i_default = 'X'

changing it_fieldcatalog = gt_fieldcat

it_sort = gt_sort

it_outtab = itab_display[].

-


The below code will explain Using 'REUSE_ALV_GRID_DISPLAY'. I am looking for object oriented method to do the same as below code .

declare an internal table as below -

Data: t_exclude type SLIS_T_EXTAB with header line.

t_exclude-fcode = '&VCRYSTAL'.

append t_exclude.

clear t_exclude.

Now the function code of the crystal report functionality will be appended to this internal table. pass this parameter to the 'IT_EXCLUDING' parameter of the FM 'REUSE_ALV_GRID_DISPLAY.

below is a sample code.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_callback_program = w_repid

is_layout = fs_layout

it_fieldcat = i_fieldcat

it_excluding = t_exclude[]

i_save = 'A'

it_events = t_events

TABLES

t_outtab = t_iab

EXCEPTIONS

program_error = 1

OTHERS = 2.

Thanks,

Vind

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
361

DATA:

zlv_exclude TYPE ui_func,

zlt_functions TYPE ui_functions.

*-Exclude functions:

zlv_exclude = cl_gui_alv_grid=>MC_FC_EXPCRDATA

APPEND zlv_exclude

TO zlt_functions.

call method grid1->set_table_for_first_display

exporting

i_save = 'A'

is_variant = gs_variant

is_print = gs_print

is_layout = gs_layout

i_default = 'X'

it_toolbar_excluding = zlt_functions

changing it_fieldcatalog = gt_fieldcat

it_sort = gt_sort

it_outtab = itab_display[].

Regards,

John.

2 REPLIES 2
Read only

Former Member
0 Likes
362

DATA:

zlv_exclude TYPE ui_func,

zlt_functions TYPE ui_functions.

*-Exclude functions:

zlv_exclude = cl_gui_alv_grid=>MC_FC_EXPCRDATA

APPEND zlv_exclude

TO zlt_functions.

call method grid1->set_table_for_first_display

exporting

i_save = 'A'

is_variant = gs_variant

is_print = gs_print

is_layout = gs_layout

i_default = 'X'

it_toolbar_excluding = zlt_functions

changing it_fieldcatalog = gt_fieldcat

it_sort = gt_sort

it_outtab = itab_display[].

Regards,

John.

Read only

0 Likes
361

Hi John ,

Tried the code still not wroking , are there any more changes to include in the code please let me know am trying to exclude the option Crystal Report'.

-Exclude functions:

zlv_exclude = cl_gui_alv_grid=>MC_FC_EXPCRDATA.

append zlv_exclude to zlt_functions.

zlv_exclude = cl_gui_alv_grid=>mc_fc_view_crystal.

append zlv_exclude

to zlt_functions.

*****

call method grid1->set_table_for_first_display

exporting

i_save = 'A'

is_variant = gs_variant

is_print = gs_print

is_layout = gs_layout

i_default = 'X'

it_toolbar_excluding = zlt_functions

changing it_fieldcatalog = gt_fieldcat

it_sort = gt_sort

it_outtab = itab_display[].

Thanks,

Vind