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

friends probelm in bdc..any one help..plz..

friends i want to upload data using one tool which it accepts only .txt files..but on the presentation server i have only .csv...microsoft excel files...

so can u plz tell me how to convert .csv into .txt files after uploading..or how top upload and conver them..plz..any one..?

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 Dec 03, 2007 at 11:35 AM

    hi satish,

    before uploading it do convrsion.

    steps to convert csv file to txt file:

    -> open excel file.

    -> goto file menu-> select save as option .

    -> save that csv file as tab delimited file with .txt extention.

    -> now use that file in uploading.

    <b><i>Reward points if useful</i></b>

    Chandra

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 03, 2007 at 11:54 AM

    Hi,

    ALSM_EXCEL_TO_INTERNAL_TABLE- try this func. module to upload values from excel file. Now we have values in internal table it_table

    so at every new value of row move the values into an internal table with each value separated by tab( c_tab TYPE c VALUE cl_abap_char_utilities=>horizontal_tab)

    Now u have an internal table with the records tablimited..

    Reward if helpful.

    Regards,

    Karthick.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 03, 2007 at 11:56 AM

    Hi

    The CSV is a text file, so I believe your problem can be on how the information are written in the file:

    DATA: W_RECORD TYPE STRING,
               T_FILE          LIKE STANDARD TABLE OF W_RECORD.
    
    DATA: BEGIN OF ST_RECORD,
                  FIELD1,
                  FIELD2,
                  FIELD3,
                  ...........
                  FIELDN, 
               END   OF ST_RECORD.
    
    DATA: BEGIN OF T_VALUE OCCURS 0,
                  FIELD(100),
               END   OF T_VALUE.
    
    FIELD-SYMBOLS: <FIELD> TYPE ANY.
    
    * By FM GUI_UPOLAD import the file to T_FILE table:
    
    LOOP AT T_FILE INTO W_RECORD.
    
    * ; should be the symbol used as separator
       SPLIT W_RECORD AT ';' INTO TABLE T_VALUE.
    * Move the data from line of csv file to your structure
      LOOP AT T_VALUE.
         ASSIGN COMPONENT SY-TABIX OF STRUCTURE ST_RECORD TO <FIELD>.
         IF SY-SUBRC = 0.
            MOVE T_VALUE-FIELD TO <FIELD>.
         ENDIF.
      ENDLOOP.

    Max

    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.