Application Development and Automation 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: 
Read only

ALV Report

Former Member
0 Likes
969

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

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

9 REPLIES 9
Read only

Former Member
0 Likes
933

first sort the data and download to excel

Read only

Former Member
0 Likes
933

hi sayatan,

Use FM GUI_DOWNLOAD

check these threads

hope this helps,

priya.

Read only

Former Member
0 Likes
933

HI Das,

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

Check this out

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

Read only

Former Member
0 Likes
933

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

Read only

hymavathi_oruganti
Active Contributor
0 Likes
933

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

Read only

Former Member
0 Likes
933

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....

Read only

Former Member
0 Likes
933

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

Read only

Former Member
0 Likes
933

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.

Read only

rahulkavuri
Active Contributor
0 Likes
933

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