Reading in a XML File from Excel into SAP

pts.
Tags:
SAP
SAP ABAP
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

Answer Wiki

Thanks. We'll let you know when a new response is added.

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

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Bhunter
    Hi, Try FUNCTION KCD_EXCEL_OLE_TO_INT_CONVERT.
    0 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following