Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

internal table

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

use fm F4_FILENAME...

5 REPLIES 5

Former Member
0 Kudos

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.

0 Kudos

Hi Ramesh,

Thank you very much for your valuble response.

But i am using SAP 4.6C.

Will your answer work in this version.

Regards,

Ratna

Former Member
0 Kudos

Hello,

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

Vasanth

Former Member
0 Kudos

use fm F4_FILENAME...

Former Member
0 Kudos

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.