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
555

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

2) how to specify subtotal on column in ALV ?

4 REPLIES 4
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
508

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

Read only

Former Member
0 Likes
508

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.

Read only

0 Likes
508

and for subtotal ..

ls_sort-subtotal = 'x'.

Read only

anversha_s
Active Contributor
0 Likes
508

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