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

sort totals

Former Member
0 Likes
577

In my ALV report, customized from ME2N transaction, I want to perform sort and totaling with a button.

i.e There is a button 'sorttotal' which will perform sorting and summing just like ALV 'SUM'.

Can anyone help me here?....

In my ALV report, customized from ME2N transaction, I want to perform sort and totaling with a button.

i.e There is a button 'sorttotal' which will perform sorting and summing just like ALV 'SUM'.

Can anyone help me here?....

4 REPLIES 4
Read only

Former Member
0 Likes
546

Hi Sapian,

Is there any field of N, I and P type. It will appear automatically if you use do sum.

Reward if useful1

Read only

0 Likes
546

in my ALV report, I have removed all the ALV buttons(as per req) Instead I have given a butoon called 'sorttotals' which will perform the same functionality as in ALV 'Sum'.

Please help me

Read only

0 Likes
546

Hi Sapien,

In the user command for the grid write the code for sorting the data according to the field you want to sort.

after that call the function for dispalting grid with the sorted data.

All this u will write under user command .

In user command check for the function code for that button using the case statement.

The code for user command is as below.

FORM user_command USING r_ucomm LIKE sy-ucomm

rs_selfield TYPE slis_selfield.

CASE r_ucomm.

WHEN 'BUTTON1'.

sort itab by field.

PERFORM display_grid.

ENDCASE.

ENDFORM.

This will work try.

Read only

0 Likes
546

Hi

Just execute the any one of the Std ALV report in which the Complete MEnu Buttons are working and take the LOGIC of the SUBTOTALS/SUM button from the Std ALV report and copy it to your customized ALV and do little changes.it works fine.

Reward points for useful Answers

Regards

Anji