cancel
Showing results for 
Search instead for 
Did you mean: 

ALV BLOCK DISPLAY TOTAL ISSUE

0 Kudos

Hi Folks,

I have an requirement I have to show multiple internal table.

I am using Reuse_Alv_Block_Display and it's working fine.

But I have to show total for some fields.

I am using DO_SUM statement in fieldcatalog but it's not working.

Can you please help me out here ???

Thanks in advance.

Sandra_Rossi
Active Contributor
0 Kudos

I don't have any problem.

SELECT * FROM sflight INTO TABLE @DATA(flights).
DATA(ls_layout) = VALUE slis_layout_alv( list_append = 'X' ).
DATA(lt_fieldcat) = VALUE slis_t_fieldcat_alv( ).
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
  EXPORTING
    i_structure_name       = 'SFLIGHT'
  CHANGING
    ct_fieldcat            = lt_fieldcat    " Field catalog with field descriptions
  EXCEPTIONS
    inconsistent_interface = 1
    program_error          = 2.
lt_fieldcat[ fieldname = 'PRICE' ]-do_sum = 'X'.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
  EXPORTING
    is_layout     = ls_layout    " List layout specifications
    it_fieldcat   = lt_fieldcat    " Field catalog with field descriptions
  TABLES
    t_outtab      = flights
  EXCEPTIONS
    program_error = 1.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
  EXPORTING
    is_layout     = ls_layout    " List layout specifications
    it_fieldcat   = lt_fieldcat    " Field catalog with field descriptions
  TABLES
    t_outtab      = flights
  EXCEPTIONS
    program_error = 1.

Accepted Solutions (0)

Answers (0)