Skip to Content
0
Former Member
Dec 07, 2009 at 03:08 AM

ALV report in OO concept

49 Views

hi all

I am working on ALV report in OO concept. and facing in some difficulties in sorting, subtotal, coloring etc.. so it would be great help if there some sample program which can handle all this..

***Create new instance ALV table object

TRY.

CALL METHOD cl_salv_table=>factory

IMPORTING

r_salv_table = o_alv

CHANGING

t_table = i_mara.

CATCH cx_salv_msg INTO lc_msg .

ENDTRY.

***.Enable Generic ALV functions

lo_functions = o_alv->get_functions( ).

lo_functions->set_all( ).

  • lo_functions->set_default( abap_true ).

***Sorting

lo_sorts = o_alv->get_sorts( ).

lo_sorts->add_sort( columnname = 'BRGEW' subtotal = abap_true ).

o_alv->display( ).

i tried this one but it is telling no column found and not doing subtotal..

pls giude

thanks

Edited by: JaiKarthik on Dec 7, 2009 4:17 AM