Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Upload any XML file to internal table

Former Member
0 Kudos

Hi,

I'm writing a FM to upload any XML file (Which means I don't know the structure) to a internal table.

I tried to use FM 'GUI_UPLOAD' and CALL TRANSFORMATION ('ID'). But the problem is that, the RESULT tab of CALL TRANSFORMATION ('ID') needs to define the structure of the table for the corresponding XML file, otherwise it will not work. For example, I want to get the result table like this:

CALL TRANSFORMATION ('ID')

SOURCE XML xmlupl

RESULT tab = <tab>.

Then it will give me a run time error 'CX_XSLT_FORMAT_ERROR' because I didn't give a specific structure for <tab>.

Any solution for my situation?

Thanks.

1 ACCEPTED SOLUTION

former_member194669
Active Contributor
0 Kudos

Where is your XLST file for the call transformation ID

From ABAP to XML you can do it as dynamic, but XML to ABAP you need a XLST to convert.

otherwise please look at this

2 REPLIES 2

former_member194669
Active Contributor
0 Kudos

Where is your XLST file for the call transformation ID

From ABAP to XML you can do it as dynamic, but XML to ABAP you need a XLST to convert.

otherwise please look at this

0 Kudos

Thanks a@s.

I've tried that one, it works for some of the XML files, but some of the XML files I tried encountered a type conversion error.