Application Development and Automation 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: 
Read only

GUI_ Downlaod Error

Former Member
0 Likes
937

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
Read only

Former Member
0 Likes
905

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
Read only

Former Member
0 Likes
905

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.

Read only

0 Likes
905

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

Thanks

Kondal

Read only

former_member195698
Active Contributor
0 Likes
905

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

Read only

Former Member
0 Likes
905

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

Thanks

Kondal

Read only

0 Likes
905

Please post your code that calls the FM.

Rob

Read only

Former Member
0 Likes
906

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

Read only

0 Likes
905

Make sure W_FILE is declared like this:

DATA: W_FILE TYPE STRING.

Rob