‎2006 Aug 28 7:46 AM
Hi
my code follows
CALL FUNCTION 'DOWNLOAD'
EXPORTING
FILENAME = 'C:\'
FILETYPE = 'WK1'
FILEMASK_MASK = '*.XLS'
FILETYPE_NO_CHANGE = '0'
TABLES
DATA_TAB = PEND_TAB
EXCEPTIONS
INVALID_TABLE_WIDTH = 2
INVALID_TYPE = 3
NO_BATCH = 4
UNKNOWN_ERROR = 5
GUI_REFUSE_FILETRANSFER = 6
OTHERS = 7 .
It is throwing dump in WS_DOWNLOAD program
What happened?
Error in ABAP application program.
The current ABAP program "SAPLGRAP" had to be terminated because one of the
statements could not be executed.
This is probably due to an error in the ABAP program.
Error analysis
The statement
"DESCRIBE"
contains an argument "<F>" in which only character-type data objects
and not strings (STRING or XSTRING) are allowed.
In this case, the operand "<F>" has the type "P".
383 ASSIGN COMPONENT SY-INDEX OF STRUCTURE DATA_TAB TO <F>
384 IF SY-SUBRC NE 0. EXIT. ENDIF.
385
386 IF SY-INDEX > WK1_MAX_COL. EXIT. ENDIF.
387
>>>>> DESCRIBE FIELD <F> LENGTH SIZE in character mode.
389 DESCRIBE FIELD <F> TYPE TYP.
390 CASE TYP.
391 WHEN 'C'. "// character
392 IF WK1_T_SIZE NE SPACE.
This is standard code. i can not edit, is there any thing
xtra parameters do i need to supply.
Thanks & Regards
Abhimanyu.L
‎2006 Aug 28 7:51 AM
HI,
I think in your internal table 'PEND_TAB' there is a field with type string which in not allowed.
Try using 'GUI_DOWNLOAD' which is new FM.
example
<b>
call method cl_gui_frontend_services=>gui_download
exporting filename = 'C:'
WRITE_FIELD_SEPARATOR = 'X'
changing data_tab = itab.</b>
Regards
‎2006 Aug 28 7:50 AM
Hi,
Pass File name & File type parameter and check, pass the File type parameter with value 'ASC',
Rgds,
‎2006 Aug 28 7:51 AM
HI,
I think in your internal table 'PEND_TAB' there is a field with type string which in not allowed.
Try using 'GUI_DOWNLOAD' which is new FM.
example
<b>
call method cl_gui_frontend_services=>gui_download
exporting filename = 'C:'
WRITE_FIELD_SEPARATOR = 'X'
changing data_tab = itab.</b>
Regards
‎2006 Aug 28 7:52 AM
FILETYPE = 'WK1'
just comment this line
or it is better that u use <b>gui_download</b> fm.
‎2006 Aug 28 7:51 AM
Hi,
The Error is not in DOWNLOAD function module. Chk the describe statment in your code line no 388.
Regards,
Senthil