on 10-04-2007 9:49 AM
Requirement : From my webdynpro screen, I want to open a xml string in a browser.
I have some data in the form of an xml string in my program. On clicking a button in the webdynpro screen, I want to show this string in a separate window (in a browser), properly formatted like an xml document.
Any pointers on how to achieve this???
regards,
Priyank
Hello, Priyank,
Have you tried something like this:
DATA: xml_source TYPE string,
xml_xsource TYPE xstring,
lr_conv type ref to cl_abap_conv_out_ce.
xml_source = '<xml source here>'. " Your XML is inside xml_source variable
lr_conv = cl_abap_conv_out_ce=>create( ).
lr_conv->convert( exporting data = xml_source
importing buffer = xml_xsource ).
cl_wd_runtime_services=>attach_file_to_response( i_filename = 'File.xml'
i_content = xml_xsource
i_mime_type = 'application/xhtml+xml'
i_in_new_window = 'X'
i_inplace = 'X' ).
Hope this helps.
Regards,
Andre
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is throwing a "NULL Reference" shortdump at the following place in code.
method attach_file_to_response.
=> wdr_task=>client_window->client->attach_file_to_response(
i_filename = i_filename
i_content = i_content
i_mime_type = i_mime_type
i_in_new_window = i_in_new_window
i_inplace = i_inplace ).
endmethod.
Please suggest what to do..
i displayed it in another webdynpro screen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.