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 Subtotal

Former Member
0 Likes
2,076

Hei

In the ALV Report if two or more records have same Vendor no and same G/L account then i want amount in the amount field and LC field to be added up and display as one record.

how to do this.......

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,046

Hi,

send the code to my email address [email protected]

Thanks,

Naren

Hei

In the ALV Report if two or more records have same Vendor no and same G/L account then i want amount in the amount field and LC field to be added up and display as one record.

how to do this.......

17 REPLIES 17
Read only

sreeramkumar_madisetty
Active Contributor
0 Likes
2,046

Hi

Make the field

do_sum = 'X'.

For Field Catalog.

Regards,

Sreeram

Read only

suresh_datti
Active Contributor
0 Likes
2,046

set the <i>do_sum</i> attribute of the field catalog to 'X'.

~Suresh

Read only

0 Likes
2,046

does it do the grand total or subtotal based on vendor and G/L account?

I want subtotal.

Read only

0 Likes
2,046

Hi

It gives the subtotal.

Regards,

Sreeram

Read only

0 Likes
2,046

sub-total.

~Suresh

Read only

0 Likes
2,046

I am getting the Grand total but not the subtotal.

where do i have to set it...plz

Read only

0 Likes
2,046

are you passing the it_sort parameter to your ALV function call.. the sort order you maintain there should give you the break-up of subtotals..

~Suresh

Read only

0 Likes
2,046

can you give the function call name......so that i can check

Read only

Former Member
0 Likes
2,046

Hi,

1) For the amount field have DO_SUM = 'X' in the field catalog internal table.

2) Prepare a sort internal table with the customer field..

DATA: T_SORT TYPE SLIS_T_SORTINFO_ALV.

DATA: S_SORT LIKE LINE OF T_SORT.

S_SORT-SPOS = '1'.

<b>S_SORT-FIELDNAME = 'FIELD1'. "VENDOR field name</b>.

S_SORT-UP = 'X'.

S_SORT-SUBTOT = 'X'.

APPEND S_SORT TO T_SORT.

S_SORT-SPOS = '1'.

<b>S_SORT-FIELDNAME = 'GL ACCOUNT FIELD NAME'.</b>

S_SORT-UP = 'X'.

S_SORT-SUBTOT = 'X'.

APPEND S_SORT TO T_SORT.

3)

Pass the internal table T_SORT to the parameter IT_SORT when calling the Function module.

Thanks,

Naren

Read only

0 Likes
2,046

is the IT_sort in'REUSE_ALV_FIELDCATALOG_MERGE'

or any other....

Read only

Former Member
0 Likes
2,046

Hi,

You have to pass the IT_SORT in the ALV FM

REUSE_ALV_LIST_DISPLAY

or

REUSE_ALV_GRID_DISPLAY.

Are you using OO ALV??

Thanks,

Naren

Read only

0 Likes
2,046

actually this program is written by someone else.....

it has 10 includes........some much code.....one field is not getting displayed in offset though its already given in the program.....and this subtotal thing.....

there are heaps of ALV list display and ALV grid display 's in the program...

and i am not so experienced to catch it immediately as go thorugh this code....

getting confused

am trying very hard.......

Read only

Former Member
0 Likes
2,046

Hi,

Just debug the program to check which one of the FM is getting called..

Thanks,

Naren

Read only

0 Likes
2,046

I have this in one include program

GT_SORT_OFFSET TYPE SLIS_T_SORTINFO_ALV WITH HEADER LINE,

can i email u the code?

Read only

Former Member
0 Likes
2,047

Hi,

send the code to my email address [email protected]

Thanks,

Naren

Read only

0 Likes
2,046

I have emailed

Read only

Former Member
0 Likes
2,046

Hi,

I will check and get back up to you..

Thanks,

Naren