2009 Apr 13 9:40 PM
Hi Experts,
I would like to convert the csv file data into internal table based on the fieldnames. not with actual data.
Because some of the cells have data with commas. but this is not the field separated comma. So, we need to build internal table with column names. not with actual data.
Note: Any cell may have text with comm. like below..
col1 | col2 | col3 | col4
123 | test,abcd | sdkl,efheb | egjhfj,dfgeh
234,345 | dfue,ghf | fdhfdjfd | dfjkgfm,ede
I tried with the below fms but no use.
TEXT_CONVERT_CSV_TO_SAP
TEXT_CONVERT_XLS_TO_SAP
ALSM_EXCEL_TO_INTERNAL_TABLE
GUI_UPLOAD.
I know normally ... if CSV file will do like SPLIT record by separator.
But here ... the data may contains commas. So, it is not working with my case.
Pls help me .
Any FM to convert the csv file data to internal table with fieldnames not with data.
Thanks in advance.
Raghu
Hi Experts,
I would like to convert the csv file data into internal table based on the fieldnames. not with actual data.
Because some of the cells have data with commas. but this is not the field separated comma. So, we need to build internal table with column names. not with actual data.
Note: Any cell may have text with comm. like below..
col1 | col2 | col3 | col4
123 | test,abcd | sdkl,efheb | egjhfj,dfgeh
234,345 | dfue,ghf | fdhfdjfd | dfjkgfm,ede
I tried with the below fms but no use.
TEXT_CONVERT_CSV_TO_SAP
TEXT_CONVERT_XLS_TO_SAP
ALSM_EXCEL_TO_INTERNAL_TABLE
GUI_UPLOAD.
I know normally ... if CSV file will do like SPLIT record by separator.
But here ... the data may contains commas. So, it is not working with my case.
Pls help me .
Any FM to convert the csv file data to internal table with fieldnames not with data.
Thanks in advance.
Raghu
2009 Apr 13 9:48 PM
Hi,
It is difficult to read the data from the file it field data contains the comma in CSV file. If the length data in each field is fixed then you use the position and offset to read the data.
1,000 Test File 11-11-2009
200 Test Fun 12-11-2009
Field1 = itab(6).
Field2 = itab+6(9).
Field3 = itab+15(10).
If the value in the field is not fixed then you need to change the delimiter of the file.
2009 Apr 14 5:03 AM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |