Skip to Content
author's profile photo Former Member
Former Member

Wrong file name?

My program has a problem finding my file. Is the name wrong in some way?

CALL METHOD cl_gui_frontend_services=>gui_upload

EXPORTING

filename = 'G:\Test\Testfil_01_051004'

filetype = lc_filetype

CHANGING

data_tab = lt_transar

EXCEPTIONS

file_open_error = 1

file_read_error = 2

no_batch = 3

gui_refuse_filetransfer = 4

invalid_type = 5

no_authority = 6

unknown_error = 7

bad_data_format = 8

header_not_allowed = 9

separator_not_allowed = 10

header_too_long = 11

unknown_dp_error = 12

access_denied = 13

dp_out_of_memory = 14

disk_full = 15

dp_timeout = 16

not_supported_by_gui = 17

error_no_gui = 18

OTHERS = 19.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Oct 19, 2005 at 11:06 AM

    Can you tell what exactly is your error..

    Also what is the value of lc_filetype and file type of Testfil_01_051004

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 19, 2005 at 11:08 AM

    what is the error you are getting?

    try passing the filename in a <b>string</b> type variable

    example:::

    TYPES:

    ty_xline(1024) TYPE x.

    DATA:

    lf_file TYPE string,

    lf_filelength TYPE i,

    lt_datatab TYPE STANDARD TABLE OF ty_xline.

    lf_file = file.

    CALL METHOD cl_gui_frontend_services=>gui_upload

    EXPORTING

    filename = lf_file

    filetype = 'BIN'

    IMPORTING

    filelength = lf_filelength

    CHANGING

    data_tab = lt_datatab

    EXCEPTIONS

    OTHERS = 1.

    rgds,

    PJ

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 19, 2005 at 11:52 AM

    Hi,

    I think you did not give the extension of the file name,

    CALL METHOD cl_gui_frontend_services=>gui_upload

    EXPORTING

    <b>filename = 'G:\Test\Testfil_01_051004'</b>

    should be

    <b>filename = 'G:\Test\Testfil_01_051004.txt'</b>

    OR whatever the extension of that file..

    Hope this helps..

    Sri

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.