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

alv

Former Member
0 Likes
660

Hi all,

I need to write out the sum of a particular column X at end of the list in ALV.

Like below,

Sum of the NETPR(column name) = ___

Could you people tell me how to do this in alv?

Thanx,

Raj

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
640

For that field X, in the field catalog you must set DO_SUM = 'X'.

fieldcat-do_sum = 'X'.

Regards,

Ravi

Hi all,

I need to write out the sum of a particular column X at end of the list in ALV.

Like below,

Sum of the NETPR(column name) = ___

Could you people tell me how to do this in alv?

Thanx,

Raj

5 REPLIES 5
Read only

Former Member
0 Likes
641

For that field X, in the field catalog you must set DO_SUM = 'X'.

fieldcat-do_sum = 'X'.

Regards,

Ravi

Read only

0 Likes
640

Hi Ravi,

Thanks for reply.

I want to show the serial number for the records in alv.

May I know how to do the above?

Expecting reply

Thanks

Raj

Read only

0 Likes
640

for serial numbers

. Add 1 more field to ur final itab of type i
2. in fieldcatalog
    CLEAR LS_FIELDCAT.
   LS_FIELDCAT-COL_POS = 1.
   LS_FIELDCAT-FIELDNAME = 'SLNO'.
    LS_FIELDCAT-SELTEXT_M = 'Serial No'.
   APPEND LS_FIELDCAT TO RT_FIELDCAT.
     CLEAR LS_FIELDCAT
 
3. loop at itab into wa_itab.      
       itab-slno = var.
       var = var + 1.
       modify itab from wa_itab.
   endloop.

Read only

Former Member
0 Likes
640

Hi,

Add one more field int the int. table that is being displayed and increment starting

with1 until all the records and display as first field

Regards

Read only

0 Likes
640

Hi,

Thanks for ur reply.