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: 

Probelm in total value in ALV grid

former_member182379
Contributor
0 Kudos

Hi,

I have made a sales report in which I am dispaying the total line item details along with amount break ups net value BED, ECES , VAT etc. also I have use sort in the report so after each billing document I am getting total amount of that billing document but I am facing problem in total value in Net value total of invocie is coming proper as per the addiiton of line item amount but for some field like BED and ECS that total value is showing as double

e,g NET value at item level 1000

then at end of billing sum is 1000 which is ok

BED : 100

but in total it is shwoing 200

what can be the problem.

regards,

zafar

8 REPLIES 8

Former Member
0 Kudos

Debug and check if you missed any clear statement .

Thx

0 Kudos

Hi,

Summation I have not done manully I have use std. wa_fieldcata-DO_SUM = 'X'. do sum at indiuidual line item amount is OK but at the end it is doing double .

regards,

zafar

0 Kudos

Hi Zafar,

I have worked on a similar requirement. In my program, I have used OOPS ALV.

CALL METHOD go_grid_rep->set_table_for_first_display

EXPORTING

i_structure_name = 'it_otab'

is_layout = w_layout_rep

is_variant = w_variant

i_save = w_save

CHANGING

it_outtab = it_outtab

it_fieldcatalog = w_lvc_t_fcat

it_sort = it_sort_rep.

Here, the table it_sort_rep is filled with every field that you want to sub total. This table has a field subtot which should be set to X.

Hope this will give you an idea.

Regards,

Sindhu.

0 Kudos

Hi,

I have already use that subtot = 'X'.

FORM it_sort.

DATA: wa_sort TYPE slis_sortinfo_alv.

wa_sort-fieldname = 'VBELN'.

wa_sort-tabname = 'IT_FINAL'.

wa_sort-up = 'X'.

wa_sort-subtot = 'X'.

APPEND wa_sort TO it_sort.

CLEAR wa_sort.

endform.

but still the value of subtot ic coming eaxctly docuble also it is not for al field I have six filed Net value, PF , BED, ECESS, SECESS etc. for two fields I am getting proper sub total for 4 fields it is giving subtot amoutn docuble.

regards,

zafar

0 Kudos

Hi,

Can you help on this issue.

regards,

zafar

0 Kudos

You must have missed the REFRESH internal table statement somewhere.

Check the same in debug mode.

0 Kudos

Hi Zafar,

YOu have already told that NET is working and BED is not working.

e,g NET value at item level 1000

then at end of billing sum is 1000 which is ok

BED : 100

but in total it is shwoing 200

So its clear nothing wrong with the standard code but its something you are missing in your custom code.

Plz compare your code with NET and It should be something which you can trace in debug.

Else please post your code to verify .not fully but some parts which may need to be looked upon.

Thx

former_member182379
Contributor
0 Kudos

Hi,

The problem solve, the problem was in the field catalog i have didsplay same field two times in the output and the field name was same becasue of this the problem was coming i habve create new fields with other name and pass value of old to that.

thanks all for your support.

regards,

zafar