Skip to Content
author's profile photo
Former Member

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

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Best Answer
    author's profile photo
    Former Member
    Oct 11, 2007 at 04:02 PM

    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

    Add comment
    10|10000 characters needed characters exceeded