cancel
Showing results for 
Search instead for 
Did you mean: 

How to create an xml file from context and download it?

Former Member
0 Kudos

Hi,

It's possible to generate an xml file from context and download it directly without saving the file to a repository?

I need to import data from the backend system using call RFC, then i want to download data , localy, with export in xml format?

How can I do this?

Thanks

Accepted Solutions (0)

Answers (2)

Answers (2)

siarhei_pisarenka3
Active Contributor
0 Kudos

Hi Mattia

If you call RFC using Webdynpro RFC Model you can export the RFC model class object to XML using one of the toXml(...) methods. Here is an example:

<input model class> input = new <input model class>();

// set input parameters

// execute BAPI

input.execute();

// trace BAPI output to XML

<output model class> output = input.getOutput();

String bapiOutXML = output.toXml(output.getClass().getName().replaceFirst(".*\\.", ""), "");

This works because the Webdynpro RFC model classes implement interface com.sap.aii.proxy.framework.core.BaseType which has these toXml methods.

Regards, Siarhei

Former Member
0 Kudos

Ok, thanks, I'll try

Regards, Mattia

junwu
Active Contributor
0 Kudos