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: 

ALV

Former Member
0 Kudos
134

1) how to specify sorting order on column in ALV ?

2) how to specify subtotal on column in ALV ?

4 REPLIES 4

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos
87

1) You can simply fill the SORT parameter whening call the function module or the method(depending on which ALV you are using.

2) You will need to set the DO_SUM flag in the field catalog for that field, you also will need to add a sort to the SORT table and mark the flag for SUBTOTAL.

REgards,

Rich Heilman

Former Member
0 Kudos
87

Hi Sudarshan

Do like this ..

DATA: LS_SORT TYPE SLIS_SORTINFO_ALV.

CLEAR LS_SORT.

LS_SORT-FIELDNAME = 'MATNR'.

LS_SORT-SPOS = 1.

LS_SORT-UP = 'X'.

APPEND LS_SORT TO E06_LT_SORT.

0 Kudos
87

and for subtotal ..

ls_sort-subtotal = 'x'.

anversha_s
Active Contributor
0 Kudos
87

hi sudhrsan,

pls chk this link.

http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_enhanced.htm

its a good link for ALv. very hlpful.

rgds

anver

if hlped mark points