on 10-25-2010 7:55 AM
Hi,
I am using cl_wd_runtime_services=>attach_file_to_response method to download a tab delimited text file. Whenever a call to the method occurs, it runs into 'NULL' object reference error and points to the first statement within the method i.e. wdr_task=>client_window->client->attach_file_to_response.
The code snippet is as follows:
data: itstring TYPE string,
itxstring TYPE xstring.
itstring = 'test run'.
CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
EXPORTING
text = itstring
IMPORTING
BUFFER = itxstring.
CALL METHOD cl_wd_runtime_services=>attach_file_to_response
EXPORTING
i_filename = 'C:\temp\FILE01.txt'
i_content = itxstring
i_mime_type = 'text/xml'.
What do I do to rectify the code and get the file downloaded?
Best Regards,
Pankaj
I think you need topass MIME type correctly in CAPS.
Nabheet
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi SAP EXPERTS,
I am using the following code to download a file. Its downloading file to downloads folder by default.My requirement is to download a file to a specified folder without prompting a popup that is directly to a folder. can u tell me is there any other approach other than the below code,Its urgent please help me.Thanks in advance.
data: itstring TYPE string,
itxstring TYPE xstring.
itstring = 'test run'.
CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
EXPORTING
text = itstring
IMPORTING
BUFFER = itxstring.
CALL METHOD cl_wd_runtime_services=>attach_file_to_response
EXPORTING
i_filename = 'C:\Shipping\FILE01.txt'
i_content = itxstring
i_mime_type = 'text/xml'.
Thanks,
Manoj
Message was edited by: manojramkumar d
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.