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

external files

hai,

in gui_upload function module ,field separator has '#' used for tab space between records in flatfile. i need to know where they declared tab= '#' and what are the other way to give field separator.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Dec 18, 2008 at 04:05 AM

    Hi Muthu Raman,

    Try this alternative.

    First make entries into an excel file(without header line) and then save it as TEXT DELIMITED file type.

    This will result in a text file with fields separated by tabs and records in different lines.

    Make sure that you have the same order of field entries in flat file as in the internal table.

    You can now use this code for uploading data from a flat file into the internal table and use as per your requirements.

    TYPES : BEGIN OF VENDOR,
            LIFNR LIKE RF02K-LIFNR,
            BUKRS LIKE RF02K-BUKRS,
            EKORG LIKE RF02K-EKORG,
            KTOKK LIKE RF02K-KTOKK,
            ANRED LIKE LFA1-ANRED,
            NAME1 LIKE LFA1-NAME1,
            SORTL LIKE LFA1-SORTL,
            LAND1 LIKE LFA1-LAND1,
            SPRAS LIKE LFA1-SPRAS,
            WAERS LIKE LFM1-WAERS,
            END OF VENDOR.
     
    DATA : VENDOR_TAB TYPE STANDARD TABLE OF VENDOR INITIAL SIZE 10 WITH HEADER LINE.
     
    START-OF-SELECTION.
      CALL FUNCTION 'GUI_UPLOAD' "uploads the internal table from flat file
        EXPORTING
          FILENAME                     = 'c:\vendors.txt'
          FILETYPE                      = 'DAT'
        TABLES
          DATA_TAB                      = VENDOR_TAB "internal table
     

    This will populate the flat file records into the internal table.

    Hope this solves your problem.

    Thanks & Regards,

    Tarun Gambhir

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 18, 2008 at 04:30 AM

    hi,

    can i know your problem clearly.

    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.