Skip to Content
0
Former Member
Sep 22, 2005 at 10:34 AM

Storing internal table from XML File into DDIC

56 Views

Hi everybody,

im trying to store an internal table <b>without</b> knowing the content - means the structure (fields)- into th DDIC, but i failed. The code is:

...

DATA xslt_error TYPE REF TO cx_xslt_exception.

TRY .

perform load_file using 'D:/usr/YTGVF_asXML.xml' changing itab_XMLResult.

refresh itab_tableA.

call transformation id

source xml itab_XMLResult

result GREATEST = itab_tableA.

CATCH cx_xslt_exception INTO xslt_error.

DATA: xslt_message type string .

xslt_message = xslt_error->get_text( ).

write xslt_message.

ENDTRY.

form load_file

using path type localfile

changing tab type table.

data: s type string,

filelength type i.

s = path.

refresh tab.

call function 'GUI_UPLOAD'

exporting filename = s

filetype = 'BIN'

importing filelength = filelength

tables data_tab = tab

exceptions others = 1.

endform. "load_file

...

So, how can i store itab_tableA, without knowing the content (fields) of the table? The XML-File is of type asXML - i guess there should be a solution.

Thanks for all replies!

BG, Jim