Skip to Content
author's profile photo Former Member
Former Member

ALV EXCEL custom template

Hi all SDNs,

I'm trying to do the following:

in a report I use FM REUSE_ALV_GRID_DISPLAY to display a table with char and numeric fields like this:

aaa 12 4 33%

bbb 20 5 25%

As you can see there is a column with percentage value. I want to summarize all the column but (obviously) the percentage column reach an incorrect value.

I try with excel custom template including a bit of VB to create the total line but I don't know where to put my code in the excel template.

Can u help me?

Thanks

Stefano

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Dec 31, 2004 at 04:23 AM

    Hi Stefano,

    When you say <i>summarize</i> do you mean <b>average</b> or <b>sum</b> ?

    Can you give us an example like the following or something like if this is the input, then the output should be like this?

     ---------------------------------
    |COLA  |  COLB  |  COLC  |  COLD  |
     ---------------------------------
    | aaa  |   12   |   4    |  33    |
    | bbb  |   20   |   5    |  25    |
     ---------------------------------
    | Total    32       9       58    |
    ----------------------------------
    

    Use [code ] and <b>[/code ]</b> for arranging your table in the above manner without the space before the end bracket <b>]</b>. If you do not use the above tags, table would appear distorted.

    Regards,

    Subramanian V.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Dear Subramanian,

      probably there was a misunderstanding. I already know that the functionality described previously is not possible with ALV, but I'm sure that it is possible with Excel to create a total line with a Formula in the field 'COL_D'.

      I want to do this in excel to keep the possibility of summarization by the user in ALV, and to get a total line as requested in the Excel export file.

      To do this I think that I have to put some code in the Excel template (to read the table's number of line and put the total line in the correct row of the excel sheet) but I don't know where exactly the code should be putted. In the Library documentation of ALV list SAP talk about these "template modifications" but how to make the modifications in the excel template is not explained! 😔

      Hope you can help me!

      thank you again,

      Stefano

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.