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

Read Application server file and upload into internal table

Another help needed guys,

My file in the application server is of format

Name Marks 1 Marks 2 Marks 3............

A 10 15 20

The only thing separating the columns is space.

Actually this file was downloaded from an internal table into the app server.

Now I want to load it back into the internal table.

How do I load this into internal table so that each column goes in separate internal table field.

Currently am using cl_abap_char_utilities=>HORIZONTAL_TAB but I can get only the first column name in my field1 of the internal table.

How should I applroach this?

Points will be awarded for useful answers.

Regards

Ankit

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jun 18, 2008 at 07:29 AM

    HI,

    Try using fn module GUI_UPLOAD

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 18, 2008 at 07:31 AM

    HI,

    after getting the data into a flat structure...use the 'SPLIT' command to move the data into internal table fields.

    Regards,

    Vamshi.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 18, 2008 at 07:32 AM

    Hi,

    You can use F4_DXFILENAME_4_DYNP to upload file from application server.

    Reward if useful.

    Regards

    Susheel

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 18, 2008 at 07:39 AM

    Hi,

    you just use open data set and read data set

    and once the data into itab ucan use split statmt(if required)

    Regds,

    Murali

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 18, 2008 at 07:45 AM

    Hi ankit,

    i think u have uploaded the tab delimited file in the application sever.

    then suppose see if u r file is in the format of name#marks1#marks2#marks3.

    then in the program u do like this..

    first declare one internal table with one filed.

    data:

    c_hextab(1) TYPE x VALUE '09'.

    data:

    begin of t_data occurs 0,

    line(256) type c,

    endof t_data.

    and declare one more intternal table

    data:

    begin of t_itab occurs 0,

    name(15) type c,

    marks1(4) type c,

    marks2(4) type c,

    marks3(4) type c,

    endof t_itab.

    then

    open the file with

    OPEN DATASET p_file FOR INPUT IN TEXT MODE.

    then between do and endo do like this..

    DO.

    clear t_data.

    READ DATASET p_file INTO t_data.

    if sy-subrc ne 0.

    exit.

    else.

    split t_data at c_hextab

    into t_itab-name

    t_itab-marks1

    t_itab-marks2

    t_itab-marks3.

    append t_itab.

    endif.

    enddo.

    i think it will be helpful to u

    Please let me know wht type of file has been uploaded into application server.(tab deleimted, comma separated or something else).

    Regards,

    Sunil Kumar Mutyala.

    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.