01-16-2012 5:45 AM
Hi all,
I have manipulated the Total of ALV Grid by using GET_SUBTOTALS and REFRESH method of CL_GUI_ALV_GRID. The ALV Output is also correct. When i export to Excel,only the Original total is displaying not the calculated one. How to download the exact output which is displaying in the ALV Grid to Excel.
Please help me out to solve this.
Thanks,
Ramesh
01-16-2012 6:31 AM
HI,
Download in html format and see .How it it appearing.
Regards,
Madhu.
01-16-2012 6:25 AM
Hi,
You can calculate total manually by loop internal table and pass your final internal table to ALV.
Thanks & regards,
Kiran.
01-16-2012 6:29 AM
Hi Kiran,
I think you misunderstood my post. The ALV Output is correct but when i export to Local File, the calculated(Custom) Total are not exported, only the Original Summing is exported.
01-16-2012 6:37 AM
Hi,
Check in your field catalog. If you use do_sum = 'X' . comment it and try.. Also convert to list using preview and check.
Hope this helps u.,
Thanks & regards,
Kiran.
01-16-2012 6:31 AM
HI,
Download in html format and see .How it it appearing.
Regards,
Madhu.
01-16-2012 7:33 AM
Hi Madhu,
In HTML is working fine. But i need to export to Excel.
@ Kiran,
I have to do it because after DO_SUM = 'X' only i will get the Total
Thanks,
Ramesh
01-16-2012 8:59 AM
Not sure,
But best way you can do is, calculate your total before passing to alv.
and pass total also as a data to internal table to alv.
01-16-2012 11:22 AM
> I have to do it because after DO_SUM = 'X' only i will get the Total
Hi Ramesh,
This is what I mentioned in first post. Normally if you do total and export it has to come when export to excel also. If not try that as alternative. Comment do_sum = 'X' and calculate total manually by looping your internal table and append total line to your final internal table and then pass final internal table to ALV.
If you bother about color of total line, you can set the color also manually to the total line.
Hope this helps u.,
Thanks & Regards,
Kiran.
01-19-2012 6:45 AM
DEAR,
AS U WANT UPLOAD WITH THE SUB TOTAL YOU TRY THIS.
FIRST to get subtotal in ALV output you select at least one column of total and then press ctrl + F6 . u will see the sub total .
and now how to download it so press ctrl + shift + F9 .
now screen appears and select second option ie spreadsheet and press enter
now a screen appear in wich u have to give file name.
so double click on search button of file name . click on desktop give ur file name as u want suppose zreport u have given.
and save type = excel file.
now save it and then generate it your output bytes will be transmitted .
now u can see in your desktop in your file name . ur output with subtotal.
regards
navin