05-19-2009 4:19 PM
Dear All,
I am using GUI_DOWNLOAD FM to download a file in PDF format to presentation server.
The code has been written in an enhancement spot in a class "/SCA/CL_SVORDER", method "Print" on an SNC server.
On execution I get the error "Error in Control Framework".
First I tht that this has something to do with the data table. But when I tried to pass a simple table of Integers in ASC format, it gave the same error.
Please assist.
*----Begin of Code Snippet
data: fullpath type STRING value 'D:\temp\PO.pdf',
bin_filesize type I,
filetype type char10 value 'BIN'.
bin_filesize = numbytes.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE = bin_filesize
filename = fullpath
FILETYPE = filetype
IMPORTING
FILELENGTH =
tables
data_tab = t_data
FIELDNAMES =
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*----End of Code Snippet
05-19-2009 4:42 PM
05-20-2009 7:33 AM
Dear Rob,
I am not running it in background.
The enhancement that I have coded this in, gets called on click of the Print PO button in SNC Web UI.
Regards
Ashwin
05-20-2009 1:06 PM
Hi All,
The enhancement that I was referring to (one in which I have written the code) gets called when the user clicks the Print PO button. The application is developed in WD ABAP.
I think it is impossible to call GUI_DOWNLOAD in WD ABAP application.
I tried this by developing a WDA application with a button.
On button click, caled GUI_DOWNLOAD and faced same result - ""Error in Control framework" !!!
Will start a new thread.
Cheers
Ashwin
07-29-2009 8:34 PM
Hi!
I have the same error, but i need to use CSV Format.
in another program, i used this with XML format.
lv_xml = lr_element->to_xml( ).
Converts the string to xstring
lv_xxml = wd_this->convert_file( lv_xml ).
Shows it in a new browser window
*cl_wd_runtime_services=>attach_file_to_response(*
*i_filename = lco_filename*
*i_content = lv_xxml*
*i_mime_type = lco_mime_type*
*i_in_new_window = abap_FALSE*
*i_inplace = abap_false ).*
Regards!