Skip to Content

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

CSV -> Internal table -> CVS

Hi all,

type-pools: KCDE.

data: itab_csv type KCDE_INTERN.

DATA: i_text(9999) TYPE c OCCURS 0.

CONSTANTS c_delimiter(1) TYPE c VALUE ';'.

SELECTION-SCREEN BEGIN OF BLOCK 001.

PARAMETERS: p_file LIKE RLGRAP-FILENAME OBLIGATORY DEFAULT 'c:\temp\EBV\sap_input_without_header.csv'.

SELECTION-SCREEN END OF BLOCK 001.

CALL FUNCTION 'KCD_CSV_FILE_TO_INTERN_CONVERT'

EXPORTING

i_filename = p_file

i_separator = c_delimiter

tables

e_intern = itab_csv

EXCEPTIONS

UPLOAD_CSV = 1

UPLOAD_FILETYPE = 2

OTHERS = 3

.

This part of the coding works nice, all CSV content will be IMPORTED to internal table itab_csv.

Empty cells will be left empty in the internal table as well, so the structure of the itab is: ROW, COLUMN, VALUE.

Now that I have this information, I'm going to modify some of the values and want to EXPORT the modified itab to CSV format again.

Is there an appropriate function module available?

Ciao

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