Application Development 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: 

merge records of one column in ALV?

Former Member
0 Kudos

Hi friends,

i am creating alv grid report(with out oops). i am calculating value for one field that value is common for all the records . so i want to display that as common value instead of displaying number of lines .

is there any possibility to merge records of one column. using it_sort i tried . but it is not coming. since it is a currency field and i need to do display in the subtotal field.

please let me know if u have the solution.

regards,

kani.

Edited by: Julius Bussche on Sep 8, 2008 7:31 AM

3 REPLIES 3

Former Member
0 Kudos

Hi,

If you are calculating the Sub-Total then try doing the same with the help of Fieldcatalogue.....

There are fields available for Total and Sub-total. When checked they automatically display the row with the totals...

Regards,

Kunjal...

former_member181995
Active Contributor
0 Kudos

kani,

refwer sample code.

DATA: gt_sort TYPE slis_t_sortinfo_alv,
gs_sort TYPE slis_sortinfo_alv.

CLEAR gs_sort.
gs_sort-fieldname = 'LDDAT'.
gs_sort-spos = 1.
gs_sort-up = 'X'.
gs_sort-subtot = 'X'.
APPEND gs_sort TO gt_sort.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = v_repid
i_callback_user_command = 'PROCESS_USER_COMMANDS'
is_layout = w_layout
it_fieldcat = i_fieldcat[]
it_sort = gt_sort[]
i_default = 'X'
i_save = 'A'
it_events = v_events
is_print = w_print
TABLES
t_outtab = i_final1

Former Member
0 Kudos

Please use meaningfull subject titles.