12-09-2011 10:48 AM
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
12-09-2011 10:59 AM
12-09-2011 11:41 AM
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
12-09-2011 1:05 PM
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.
12-10-2011 4:35 AM
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
12-12-2011 6:40 AM
12-12-2011 7:10 AM
You must have missed the REFRESH internal table statement somewhere.
Check the same in debug mode.
12-12-2011 7:23 AM
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
12-13-2011 9:12 AM
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