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: 

ALV Report

Former Member
0 Kudos

How to download ALV Report to Excel File in Sorted Order?

9 REPLIES 9

Former Member
0 Kudos

first sort the data and download to excel

Former Member
0 Kudos

hi sayatan,

Use FM GUI_DOWNLOAD

check these threads

hope this helps,

priya.

Former Member
0 Kudos

HI Das,

Sort the Fields and use <b>GUI_D0WNLOAD</b> FM

Check this out

http://www.sapdevelopment.co.uk/reporting/rep_capturerep.htm

former_member181962
Active Contributor
0 Kudos

1) Sort the data in the internal table itself before you display in the ALV.

2) Sort using the options available on the alv before you download(For this you need to fill the sort table and pass to the reusealvdisplay* function.

Regards,

Ravi

hymavathi_oruganti
Active Contributor
0 Kudos

there will be icons to sort and also down load to xcel. use them and do, its simple.

Former Member
0 Kudos

hi

first sort the table asper ur sorting order

then pass this table in ur FM reuse_alv_grid_display

then using ALV toolbar u can download ur table...

there is anpther option in the above FM i.e IT_SORT

u can check this if this can match ur reqmnt..

thanks....

former_member188685
Active Contributor
0 Kudos

Hi,

in sorted Order...,

You can sort it using the Standard ALV tool bar Buttons.

and Down load it to excel sheet , if you sort the data in ALV the same data will be transfered to Excel when you download. did you check it. check it. or if you are not convinced please let us know what you are looking for.

Regards

vijay

Former Member
0 Kudos

Hi satyan,

check these links:

https://weblogs.sdn.sap.com/weblogs/topic/29?x-o=50 - 64k -

sap.ittoolbox.com/groups/ technical-functional/sap-r3-dev/5/2004 - 45k -

regards,

keerthi.

rahulkavuri
Active Contributor
0 Kudos

Sort the fields using the code as below and then if u are using standard ALV display then u have an icon "SPREAD SHEET" for downloading ALV into an excel sheet


DATA: WA_SORT TYPE SLIS_SORTINFO_ALV,
      IT_SORT TYPE SLIS_T_SORTINFO_ALV,         "SORT ITAB

FORM SORT_LIST.

  WA_SORT-FIELDNAME = 'VBELN'.
  WA_SORT-TABNAME = 'IT_VBAK'.
  WA_SORT-SPOS = 1.
  WA_SORT-UP = 'X'.
  WA_SORT-SUBTOT = 'X'.
  APPEND WA_SORT TO IT_SORT.
  CLEAR WA_SORT.

  WA_SORT-FIELDNAME = 'NETWR'.
  WA_SORT-TABNAME = 'IT_VBAK'.
  WA_SORT-UP = 'X'.
  WA_SORT-SPOS = 2.
  WA_SORT-SUBTOT = 'X'.
  APPEND WA_SORT TO IT_SORT.
  CLEAR WA_SORT.

ENDFORM.                    "SORT_LIST