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

gui_upload

Hi Everybody,

Could any one say me how could i find whether the file has a tabspace seprator or space as seprator.

i am using gui_upload where the parameter HAS_FIELD_SEPARATOR say's me splits with tab during ASCII,

whether i should give 9 as parameter value for tab or give '' empty?

Regards.

Add a comment
10|10000 characters needed characters exceeded

Related questions

6 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Nov 18, 2005 at 09:08 AM

    Hi Aima,

    Depending on your requirement you need to pass.

    If you have tab dilimited text file then give tab as

    separater.

    First checl the input file and depending on that pass the value.

    Thanks & Regards,

    Siri.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 18, 2005 at 09:10 AM

    Hi,

    Check this explanation for the parameter you asked and kindly reward points by clicking the star on the left of reply,if it helps.

    Description

    Specifies whether the fields in the file are separated by a TAB. This is recommended if the structure passed contains several components. CR/LF occurs instead of a tab after the last field of a row.

    Value range

    <b>'X': Fields are separated by tabs

    SPACE: Fields are not separated by tabs. In this case, the table must contain only one column or all columns must be contained in the file in their entire length.</b>

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 18, 2005 at 09:12 AM

    Hi Aima,

    There is now ay to find it in the program itself, whether or not the file is tab delimited or otherwise.

    One way is to declare a flat data type for the internal table and see in the debug mode for yourself.

    In whatever case, the HAS_FIELD_SEPARATOR value should be space or 'X'.

    if HAS_FIELD_SEPARATOR is space, then that doesn't mean that the field seperator is space. It means, we are telling the FM that the fields are not delimeited by tabs.

    If HAS_FIELD_SEPARATOR = 'x' then we are telling the FM that the file is tab delimited.

    Thanks,

    Ravi

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 18, 2005 at 09:17 AM

    Hi,

    You just pass X to the paramater HAS_FIELD_SEPARATOR of GUI_UPLOAD.

    THanks,

    Ramakrishna

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 18, 2005 at 09:21 AM

    Hi open the input file and check its contnets and format.

    if it has the field separator then pass 'X' to HAS_FIELD_SEPARATOR otherwise just pass a blank space '' to it. it should work fine.

    satish

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 18, 2005 at 09:35 AM

    Hi

    Give

    CALL FUNCTION 'GUI_UPLOAD'

    EXPORTING

    FILENAME =

    • FILETYPE = 'ASC'

    <b>* HAS_FIELD_SEPARATOR = 'X'</b>

    • HEADER_LENGTH = 0

    • READ_BY_LINE = 'X'

    • DAT_MODE = ' '

    • CODEPAGE = ' '

    • IGNORE_CERR = ABAP_TRUE

    • REPLACEMENT = '#'

    • CHECK_BOM = ' '

    • IMPORTING

    • FILELENGTH =

    • HEADER =

    TABLES

    DATA_TAB =

    • 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

    • OTHERS = 17

    .

    IF SY-SUBRC <> 0.

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

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

    ENDIF.

    Regards

    Vijay

    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.