‎2008 Mar 25 1:54 PM
Hi Guys,
i am having adoubt reagrding CSV format file.
see the below code
READ DATASET p_file INTO g_string.
IF sy-subrc NE 0.
EXIT.
ENDIF.
REPLACE 'Zebith FOODSERVICE, INC'
IN g_string
WITH 'Zebith FOODSERVICE INC'.
IF sy-index LT p_first.
CONTINUE.
ENDIF.
CLEAR itab_split.
REFRESH itab_split.
SPLIT g_string AT ',' INTO TABLE itab_split.
My doubts suppose we have data in the g_string like this
'5774' , 'Zebith foodService inc' , 'xxxxx' , '23564' , '984560' , ' 2/15/2007' , '28' , '1,487'
How will the data will be stored in itab_split.Since we are using comma as a seperator suppose within the amount or Quanity field if we have "," comma then how the data will be stored in itab_split ?will it treT THE aMOUNT VALUE '1,487' AS A INDIVIDUAL VALUE IN ITAB_SPLIT AS 1,487 OR A SEPERATED VALUES "1" AND "487"?
Thanks,
Gopi.
‎2008 Mar 25 2:06 PM
Hi Guys,
can anybody tell me how to read CSV format File.?
Thanks ,
Gopi.
‎2008 Mar 25 2:06 PM
usually in interface files or in input files we won't put any commas in Amount field.if some comma is there it will seperate that amount and store it in 2 variables.
‎2008 Mar 25 2:15 PM
Hi Subas,
Do u think its like that if so is ther any other alternative to seperate the data in CSV format?
Thanks,
gopi.