Application Development and Automation 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: 
Read only

internal table

Former Member
0 Likes
541

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
Read only

Former Member
0 Likes
514

use fm F4_FILENAME...

5 REPLIES 5
Read only

Former Member
0 Likes
514

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.

Read only

0 Likes
514

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

Read only

Former Member
0 Likes
514

Hello,

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

Vasanth

Read only

Former Member
0 Likes
515

use fm F4_FILENAME...

Read only

Former Member
0 Likes
514

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.