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

Regarding ALV using OOPS Concept

Former Member
0 Likes
596

Hi Experts,

Can abody explain to me how can i disable some settings in the tool bar of ALV Grid using oops concept??

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
563

Hi Alex,

You can perform this step, before you call set_table_for_first_display and pass that to this call.

**Exculude all unnecessary standard function in ALV

PERFORM exclude_tb_functions CHANGING lt_exclude.

CALL METHOD g_grid->set_table_for_first_display

EXPORTING

is_layout = gs_layout

is_variant = l_variant

i_save = 'A'

it_toolbar_excluding = lt_exclude

CHANGING

it_fieldcatalog = gt_fieldcat

it_sort = gt_sort[]

it_outtab = it_final[].

You can exclude all unwanted function in the subroutine.

FORM exclude_tb_functions CHANGING pt_exclude TYPE ui_functions.

DATA ls_exclude TYPE ui_func.

ls_exclude = cl_gui_alv_grid=>mc_fc_loc_copy_row.

APPEND ls_exclude TO pt_exclude.

ls_exclude = cl_gui_alv_grid=>mc_fc_loc_delete_row.

APPEND ls_exclude TO pt_exclude.

ls_exclude = cl_gui_alv_grid=>mc_fc_loc_append_row.

APPEND ls_exclude TO pt_exclude.

ENDFORM. " exclude_tb_functions

This will give you complete the solution for your query.

Thanks

Lakshmi

4 REPLIES 4
Read only

former_member225631
Active Contributor
0 Likes
563

Check BCALV_EDIT_03.

Read only

Former Member
0 Likes
563

hello friend i am too learing abap oops i found a oops alv demo program during search hope this will help you.

http://wiki.sdn.sap.com/wiki/display/Snippets/TutorialABAPALVThroughOOPS

regards

Chitta Ranjan Mahato

Read only

Former Member
0 Likes
564

Hi Alex,

You can perform this step, before you call set_table_for_first_display and pass that to this call.

**Exculude all unnecessary standard function in ALV

PERFORM exclude_tb_functions CHANGING lt_exclude.

CALL METHOD g_grid->set_table_for_first_display

EXPORTING

is_layout = gs_layout

is_variant = l_variant

i_save = 'A'

it_toolbar_excluding = lt_exclude

CHANGING

it_fieldcatalog = gt_fieldcat

it_sort = gt_sort[]

it_outtab = it_final[].

You can exclude all unwanted function in the subroutine.

FORM exclude_tb_functions CHANGING pt_exclude TYPE ui_functions.

DATA ls_exclude TYPE ui_func.

ls_exclude = cl_gui_alv_grid=>mc_fc_loc_copy_row.

APPEND ls_exclude TO pt_exclude.

ls_exclude = cl_gui_alv_grid=>mc_fc_loc_delete_row.

APPEND ls_exclude TO pt_exclude.

ls_exclude = cl_gui_alv_grid=>mc_fc_loc_append_row.

APPEND ls_exclude TO pt_exclude.

ENDFORM. " exclude_tb_functions

This will give you complete the solution for your query.

Thanks

Lakshmi

Read only

0 Likes
563

Dear Lakshmi,

Thanks for your answer.It was very helpful.

With Regards,

Alexander

Edited by: Alexander1 on Oct 21, 2010 7:50 AM