Tuesday, September 16, 2008

SAP R/3 : Overcome ALV limitations...

As an alternative solution to make your icon in ALV to download xls file smoothly as a result of a few notes due to http://isskythelimittechnical.blogspot.com/2008/09/sap-r3-alv-limitation.html

I would normally recommend a few options:
1. IF your ALV is a list (not GRID), and your xls downloads are messy, most probably, the spool does not recognize the vertical lines from the list. Spool buffers often recognize ALV grid's vertical line as the optical border to help it separate the columns neatly. Solution: convert your report to grid.

2. IF your ALV GRID, present a problem during xls downloads, you might want to consult BASIS to enable the spool to collect more than its limited number of column. Or, you can go to SPAD and modify the spool column.

3. IF your ALV GRID, present a problem during xls downloads, and your BASIS does not want to modify it for fear of other situations - you can custom your standard ALV toolbar's xls icon to download using FM GUI_DOWNLOAD.

(Use SE41) Modifying ALV toolbar is not difficult. You can disable certain ICONS from the ALV toolbar which you do not want user to use it. You can even enable a custom ICON into the standard ALV toolbar so to fullfil user requirement. Thus there are two objects that you need to know in order to custom standard ALV toolbar:

Program : SAPLKKBL
Status : STANDARD*

Copy that status and re-paste it to your custom program. Copy button will popup a dialogue that allows you to transfer that copied ALV status to yours. From there you can edit the toolbar's icon you like.

You will know which icon to modify because xls button is easily recognized by its excels spreadsheet avatar. At the function portion for that xls button, change the function code to your own zXXX so you can use it during CALLBACK from your ALV report.

However, there are 2 things you need to do before you can use your custom xls icon. First, at your ALV function module, you call I_CALLBACK_PF_STATUS_SET to set your copied status so your custom ALV toolbar appears at the report. Second, use I_CALLBACK_USER_COMMAND to trigger your GUI_DOWNLOAD to download your excel files. I_CALLBACK_USER_COMMAND will throw your icon's function code to sy-ucomm.

There you are, in conclusion, a neat step to overcome your ALV problems. I hope there will be more solutions being handled by SAP ECC6.0. Any one who has other alternative solution or some steps I miss you can email to me personally.

is sky the limit... managing your excel download...

No comments: