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

internal table

Hi,

I entered data in flat file like

$MAHI

$ANITHA

after 1st record i pressed ENTER key and then entered second record.

Then i read this flat file into ITAB.

Now the data is displayed as same as above.

But i want the data to be stored in ITAB as below, eliminating ENTER Key which we have done in flat file.

$MAHI$ANITHA

Regards,

Ratna

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 15, 2007 at 01:59 PM

    use fm F4_FILENAME...

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 15, 2007 at 01:32 PM

    write this code...

    itab has a string of 1000

    LOOP AT itab.

    replace all occurrences of CL_ABAP_CHAR_UTILITIES=>CR_LF

    in itab-string with space.

    modify itab index sy-tabix.

    ENDLOOP.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 15, 2007 at 01:49 PM

    Hello,

    U can concatenate the the flat file data and then append to itab.

    Vasanth

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 15, 2007 at 02:00 PM

    hi Retna,

    try the following logic, assuming itab2 has a field sstringtype char(1000) or appropriate.

    assuming itab-string has the value $MAHI in the first line and $ANITHA in the second line:

    clear <b>itab2</b>..

    LOOP AT itab.
           concatenate itab-string itab2-sstring into itab2-sstring
           at last.  " (or at some condition, as per the requirement)
                  append itab2.
           endat.. 
    ENDLOOP. 

    Hope this helps,

    Sajan Joseph.

    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.