on 06-14-2007 2:25 PM
Hey folks,
I have to export internal table in to Excel.It is to be noted here i am not using ALV in WD4ABAP so i have to build functionality in method itself.When i Click button "Export" , in WD4A table wold be exported to excel.For this i used these statements
From ONACTIONONSUBMIT i exported internal table (method generates table)
export itab_sflight to MEMORY ID 'ZCA'.
In ONACTIONONEXPORT method i wrote this
import itab_sflight FROM MEMORY ID 'ZCA'.
ALL FUNCTION 'WS_EXCEL'
EXPORTING
FILENAME = 'C:Documents and SettingspachcnrDesktopSales release.xls'
* SYNCHRON = ' '
TABLES
DATA = itab_sflight
* EXCEPTIONS
* UNKNOWN_ERROR = 1
* OTHERS = 2
.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
But this is not working .Can anyone suggest wat is to be done here.Keep in mind i am not using ALV.Points will re awarded.
Nirad
I have solved the problem at my own.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nirad,
This is a strange scenario,
Here I am not sure hence i cannot check because i dont have access, but i beleive the file is stored in Application server hence the browser cannot work as sap GUI, as it made for different purpose.
but as per Application server restrictions (the existance of folder, or creation of folder if it does not exists). So you have to create a file in a specific network path with a unique name and you have to send the file to the browser as a word object or give a link to the file in the HTTP response (giving link you should be sure that the user who uses your page should have access to the folder you are refering to).
The solution i suggest is Create the file in the network path where everyone have access and give a link to the users so they can download from there by clicking it.
Please reward if it works. if questions on my answer please do mail me on senthilvel.murugesan@tcs.com
Thanks & Regards
Senthilvel Murugesan
I
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nirad
One basic understnding here is
Webdynpro Abap Applicaitons is a Web Technology, the Browser Understands
Only HTTP Response and sends HTTP Request .
Import/Export statements are for SAPGUI Applications not for WDA
Don't use such statements inside Webdynpro ABAP, it will not work
Instead use ALV Tables in Webdynpro ABAP which has inbuilt Export functionality
and use file upload control to read from client system
Regards
Abhimanyu L
Message was edited by:
Abhimanyu Lagishetti
Message was edited by:
Abhimanyu Lagishetti
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.