01-15-2007 1:28 PM
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
01-15-2007 1:59 PM
01-15-2007 1: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.
01-15-2007 1:46 PM
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
01-15-2007 1:49 PM
Hello,
U can concatenate the the flat file data and then append to itab.
Vasanth
01-15-2007 1:59 PM
01-15-2007 2: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.