Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Doubt while reading a CSV format file.

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.

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question