Skip to Content

Downloading Excel file Grand totals.....

hi all...

iam having one requirement... that to get output with grandtotals for one field...

and

if i click the push button in output application tool bar of that report(EXCEL) , i need to get excel format file...into my presentation server...

for this i used gui_download function module...

but as we know iam not getting grandtotals of that field in excell output...

why?

because.... i can just down load the one populated internal table into files.. but not their looping activities...

and any way i got succeded apart of that...

*****************************************************

but..,

now my requirement is to get grand totals of that field in excel sheet also...at bottom of the same field (just like in report)..

so i went for the following syntax , just before down load the itab...

itab-f1 = ' ' .

itab-f2 = ' ' .

itab-f3 = ' ' .

itab-f4 = ' ' .

itab-f5 = tot_f5 .

itab-f6 = ' ' .

append itab.

here tot_f5 is the variable which is filled with the grand toatl value of that field.

so my my problem solved... because... iam getting grand totals in last row and just in down CELL of the same field...

😊

as you know technically this is the another record of the internal table...so al other fields of last row are also there but spaces...

😔

So...here i got another problem...that is with second fieldof itab,which is the date field..so at last line of my output file iam not only getting total value for field5 but also getting two slashes( / / ) for the field2

( because that date field i have to calulate and fulfill with concatenate taement with month adte year seperaters "/")

how can i rectify this....

my problem has to solve at this program level only..

thank you very much for valuble time..

Naveen i

Edited by: Naveen Inuganti on May 20, 2008 11:59 AM

Edited by: Naveen Inuganti on May 20, 2008 12:02 PM

Edited by: Naveen Inuganti on Jun 13, 2008 12:08 PM

Edited by: Naveen Inuganti on Jun 13, 2008 12:31 PM

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Jun 13, 2008 at 07:18 AM

    Hi Naveen,

    How u declared that date field in ur output internal table? Declare it with type as CHAR10. It will solve ur problem.

    Also instead of ' ' u can use key word SPACE for assigning space whick looks good. Logically both will work in the same way.

    Thanks,

    Vinod.

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Naveen,

      Keep the char 10 declaration as it is. Now u must be getting date from some data base tabel. What u have to do is use

      WRITE TO statement to write the date to ur final itab. This will write the date with seperators as per user settings.

      eg: U r getting date into final itab from dbtab-date.

      Now WRITE wa_dbtab-date TO wa_tab-date.

      Populate other fields.

      APPEND wa_tab TO i_tab.

      So the only change required is instead of assignment operator u have to use write to statement.

      In the grand total record u can assign space for date fields as usual.

      Thanks,

      Vinod.

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.