0 pts.
 Reading in a XML File from Excel into SAP
Has anyone read an excel XML file into SAP. How did you do it? Function module? I don't want to read each line and extract the information. I'm on version 4.6C Thanks in advance. John Longo The Holland Group Inc

Software/Hardware used:
ASKED: February 16, 2005  7:38 AM
UPDATED: February 28, 2005  12:20 PM

Answer Wiki:
I did this with a flat file .csv from our IFS. These are the FMs you would need. You will have to do some research(not an easy task in SAP) but betting an XML file is possible too. CALL METHOD cl_gui_frontend_services=>file_open_dialog * EXPORTING * WINDOW_TITLE = * DEFAULT_EXTENSION = * DEFAULT_FILENAME = * FILE_FILTER = * INITIAL_DIRECTORY = * MULTISELECTION = CHANGING file_table = file_table rc = rc * USER_ACTION = * EXCEPTIONS * FILE_OPEN_DIALOG_FAILED = 1 * CNTL_ERROR = 2 * ERROR_NO_GUI = 3 * NOT_SUPPORTED_BY_GUI = 4 * others = 5 . LOOP AT file_table INTO sfilename. ENDLOOP. IF sy-subrc <> 0. EXIT. ENDIF. CALL METHOD cl_gui_frontend_services=>gui_upload EXPORTING filename = sfilename * FILETYPE = 'ASC' * HAS_FIELD_SEPARATOR = SPACE * HEADER_LENGTH = 0 * READ_BY_LINE = 'X' * IMPORTING * FILELENGTH = * HEADER = CHANGING data_tab = input EXCEPTIONS file_open_error = 1 file_read_error = 2 no_batch = 3 gui_refuse_filetransfer = 4 invalid_type = 5 no_authority = 6 unknown_error = 7 bad_data_format = 8 header_not_allowed = 9 separator_not_allowed = 10 header_too_long = 11 unknown_dp_error = 12 access_denied = 13 dp_out_of_memory = 14 disk_full = 15 dp_timeout = 16 not_supported_by_gui = 17 error_no_gui = 18 OTHERS = 19
Last Wiki Answer Submitted:  February 16, 2005  9:16 am  by  MrsBozo   0 pts.
All Answer Wiki Contributors:  MrsBozo   0 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

Hi,
Try FUNCTION KCD_EXCEL_OLE_TO_INT_CONVERT.

 0 pts.