Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Getting error while using cl_gui_frontend_services=>gui_download

Hi Experts,

I am using class method cl_gui_frontend_services=>gui_download for downloading a file and i getting an error that of type compatible of internal table with formal parameter DATA_TAB of class cl_gui_frontend_services. My code is as follow -

DATA: filename_string TYPE string VALUE 'c:\data\testdw.txt'.

TYPES : BEGIN OF y_citibank,

data(1028) TYPE c,

END OF y_citibank.

DATA : t_citibank TYPE STANDARD TABLE OF y_citibank.

CALL METHOD cl_gui_frontend_services=>gui_download

EXPORTING

filename = filename_string

FILETYPE = 'ASC'

changing

data_tab = t_citibank

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

NOT_SUPPORTED_BY_GUI = 22

ERROR_NO_GUI = 23

others = 24.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

Please let me know, how can i overcome this error.

Thanks in advance,

Akash Sawant

Tags:
Former Member
Former Member replied

Hi,

Pass t_citibank[] instead of t_citibank in the CALL METHOD.

CALL METHOD cl_gui_frontend_services=>gui_download

EXPORTING

filename = filename_string

FILETYPE = 'ASC'

changing

data_tab = <b>t_citibank[]</b>

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

NOT_SUPPORTED_BY_GUI = 22

ERROR_NO_GUI = 23

others = 24.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

Sri

Message was edited by:

Sri Tayi

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question