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

Sorting for ALV hierarchy

Former Member
0 Likes
672

Hi Experts,

I want sorting and subtotal on the item level in hierarchial alv. The report which iam using, when sorted on item level on hierarchy level, given a message like....subtotal not possible for item level field.

Is it possible to hve sort and subtotal on hierarchy alv..if so..could you tell me how?

Hi Experts,

I want sorting and subtotal on the item level in hierarchial alv. The report which iam using, when sorted on item level on hierarchy level, given a message like....subtotal not possible for item level field.

Is it possible to hve sort and subtotal on hierarchy alv..if so..could you tell me how?

3 REPLIES 3
Read only

Former Member
0 Likes
563

Subtotal is not possible in the itam level of hierarchal ALV.

Read only

Former Member
0 Likes
563

Subtotal is not possible for character fields like name etc. otherwise subtotal works. to explicitly defining subtotal u can define in ur coding like

  • DATA SORTING AND SUBTOTAL

data: gs_sort type slis_sortinfo_alv.

CLEAR GS_SORT.

GS_SORT-FIELDNAME = 'EBELN'.

  • GS_SORT-SPOS = 1.

GS_SORT-UP = 'X'.

GS_SORT-SUBTOT = 'X'.

APPEND GS_SORT TO GT_SORT.

CLEAR GS_SORT.

GS_SORT-FIELDNAME = 'LIFNR'.

  • GS_SORT-SPOS = 1.

GS_SORT-UP = 'X'.

GS_SORT-SUBTOT = 'X'.

APPEND GS_SORT TO GT_SORT.

like here subtotal on the basis ebeln & then lifnr.

anya

Read only

Former Member
0 Likes
563

Subtotals can be done using header fields . for item it is not possible.