Application Development and Automation 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: 
Read only

Creating file in App Server direct from XML object

Former Member
0 Likes
519

Hi,

I am looking for help to create a XML file directly from XML object that has already been populated with the data. Currently, I am facing a difficulty creating the file directly in app server as the XML class CL_XML_DOCUMENT's method export_to_file is only able to create localised file but not in app server. I have already check that I have write access to the app server.

Does anyone knows any functions that I can use to create the XML file in the app server directly without creating a localised file?

Pts will be awarded.

Appreciate the help. Thanks.

Lawrence

Hi,

I am looking for help to create a XML file directly from XML object that has already been populated with the data. Currently, I am facing a difficulty creating the file directly in app server as the XML class CL_XML_DOCUMENT's method export_to_file is only able to create localised file but not in app server. I have already check that I have write access to the app server.

Does anyone knows any functions that I can use to create the XML file in the app server directly without creating a localised file?

Pts will be awarded.

Appreciate the help. Thanks.

Lawrence

2 REPLIES 2
Read only

Former Member
0 Likes
464

hi Lawrence,

please try with these fms.

UA_UPLOAD_XMLFILE

JIT03_UPLOAD_XML

<b><i>Reward points if useful</i></b>

Read only

0 Likes
464

Hi Chandra,

Can you provide a bit more info on how can i use the UA_UPLOAD_XMLFILE?

The other fm cannot be used as it points to local file location...

Below is a segment of my codes

data: o_xml TYPE REF TO cl_xml_document.

:

CREATE OBJECT o_xml.

l_root_element = o_xml->create_simple_element( name = 'broadcast' ).

l_subroot_element = o_xml->create_simple_element( parent = l_root_element name = 'setpersinfo' ).

g_date = '123456789012345'.

:

CALL METHOD o_xml->create_simple_element( parent = l_subroot_element name = 'brdcast_id' value = g_date ).

CALL METHOD o_xml->create_simple_element( parent = l_subroot_element name = 'cnt_nric' value = g_tot_rec ).

CALL METHOD o_xml->insert_document_as_child( node = l_root_element document = d_xml ).

:

After the code above, how do I proceed to create the file in the app server, given just the above XML object and filepath: /INTERFACE/ABC/test.xml