11-11-2007 9:00 AM
Hi Guru's
I am trying to down load fields from different tables from SAP into XLS sheet
but the function module is not calling correctly.... when i execute program i got the following error pls can you help me out
Function Module called incorrectly .
The Call to the function module GUI_Download is Incorrect.
The function Module interface allows you to specify only fields of a particular type under FILENAME. The field W_FILE specified here is a different field type
Thanks
Yugi
11-11-2007 7:51 PM
Hi Rob Thanks for ur quick reply.
Attached code
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = W_FILE
TABLES
DATA_TAB = INT_W_FLAT_RECORD
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
11-11-2007 9:14 AM
Hey, Yugi.
Try the FM 'XXL_FULL_API', great one.
it allows you to menipulate data with excel's options.
It's easy to use.
If you want to use gui_download try the csv or txt format.
Best regards,
R.R.
11-11-2007 6:32 PM
Hi I am trying to use file name as .dat and the same is comming up?
Thanks
Kondal
11-11-2007 9:14 AM
Change the type of W_FILE to same as that present in the Interface of the Function module GUI_DOWNLOAD
11-11-2007 6:33 PM
Hi I am trying to use file name as .dat and the same is comming up?
Thanks
Kondal
11-11-2007 7:22 PM
11-11-2007 7:51 PM
Hi Rob Thanks for ur quick reply.
Attached code
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = W_FILE
TABLES
DATA_TAB = INT_W_FLAT_RECORD
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
11-11-2007 9:27 PM
Make sure W_FILE is declared like this:
DATA: W_FILE TYPE STRING.
Rob