Skip to Content
0
Former Member
May 19, 2014 at 04:45 PM

Get the totals in abap with cl_salv_table

56 Views

Hi people,

i need yor help..


I need to obtain the TOTALS in abap and compare them with another ALV.

The totals is showing in the alv, but i need to see it in my debug or my program in save it in a variable.( lv_total)

DATA: lv_total TYPE REF TO CL_SALV_AGGREGATION.

TRY.

CALL METHOD lr_aggregations->add_aggregation

EXPORTING

columnname = 'DMBTR'

aggregation = if_salv_c_aggregation=>total

RECEIVING

value = lv_total.

.

CATCH cx_salv_data_error . "#EC NO_HANDLER

CATCH cx_salv_not_found . "#EC NO_HANDLER

CATCH cx_salv_existing . "#EC NO_HANDLER

ENDTRY.

Hope your helps

Thanks