Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

GUI_ Downlaod Error

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

7 REPLIES 7

Former Member
0 Kudos

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.

0 Kudos

Hi I am trying to use file name as .dat and the same is comming up?

Thanks

Kondal

former_member195698
Active Contributor
0 Kudos

Change the type of W_FILE to same as that present in the Interface of the Function module GUI_DOWNLOAD

Former Member
0 Kudos

Hi I am trying to use file name as .dat and the same is comming up?

Thanks

Kondal

0 Kudos

Please post your code that calls the FM.

Rob

Former Member
0 Kudos

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

0 Kudos

Make sure W_FILE is declared like this:

DATA: W_FILE TYPE STRING.

Rob