2006 Aug 07 10:40 AM
Hi All,
I need to know how to create specific XML schema output. i tried with FM available and classes available but i need the output in the following format.
<?xml version="1.0" encoding="UTF-8" ?>
- <ps:ProcessSet xmlns:ts="http://schemas.ariba.com/IS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xtc="http://schemas/ariba/xt/core" xmlns:xtd="http://schemas/ariba/xt/datatypes" xmlns:dts="http://schemas/ariba/xt/database" msgid="yw890-hplw47j-904gk4n-s3n4mzq2">
- <ProcessSetProperties null_representation="indirect" process_scope="Entity">
<DateTimeFormats dateTimeFormat="YYYY-MM-DD HH24:MI:SS" />
<Source>SG</Source>
<Message_Version>1.0.0</Message_Version>
I need ABAP code for the above format.
Thanks in Advance
Anney
Hi All,
I need to know how to create specific XML schema output. i tried with FM available and classes available but i need the output in the following format.
<?xml version="1.0" encoding="UTF-8" ?>
- <ps:ProcessSet xmlns:ts="http://schemas.ariba.com/IS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xtc="http://schemas/ariba/xt/core" xmlns:xtd="http://schemas/ariba/xt/datatypes" xmlns:dts="http://schemas/ariba/xt/database" msgid="yw890-hplw47j-904gk4n-s3n4mzq2">
- <ProcessSetProperties null_representation="indirect" process_scope="Entity">
<DateTimeFormats dateTimeFormat="YYYY-MM-DD HH24:MI:SS" />
<Source>SG</Source>
<Message_Version>1.0.0</Message_Version>
I need ABAP code for the above format.
Thanks in Advance
Anney
2006 Aug 07 11:02 AM
Hi,
This should also be possible to do via the ABAP iXML framework:
There is good documentation and example code at:
http://help.sap.com/saphelp_nw04/helpdata/en/86/8280ba12d511d5991b00508b6b8b11/content.htm.
Another simple option would be to copy the code from blog:
/people/r.eijpe/blog/2005/11/21/xml-dom-processing-in-abap-part-ii--convert-an-xml-file-into-an-abap-table-using-sap-dom-approach
And replace the file-upload code with a call to istream = streamfactory->create_istream_uri( URL_TO_SITE ).
which would let you read the XML data directly from a specified URI.
Refer this thread, u may get ur answer in it.
Regards,
Prakash
2006 Aug 07 11:08 AM
Welcome to SDN.
you can use class CL_XML_DOCUMENT for this.
to add the name spaces (xmlns:ts, xmlns:xsi, xmlns:xtc, etc)
use the method ADD_NAMESPACE_DEF of CL_XML_DOCUMENT class.
Regards
Raja
2006 Aug 07 11:26 AM
hi,
Try this code..
FORM xml_genr .
DATA: xml_DATA TYPE string,
fname type string,
it_xml_BKDATA TYPE STANDARD TABLE OF string.
CALL TRANSFORMATION id
SOURCE WEBCASH = it_XMLtemp
RESULT XML xml_DATA.
APPEND xml_DATA TO it_xml_BKDATA.
concatenate lv_file '.xml' into fname.
CALL METHOD cl_gui_frontend_services=>gui_download
EXPORTING
filename = fname
CHANGING
data_tab = it_xml_BKDATA
EXCEPTIONS
OTHERS = 24.
endform.
Regards,
Sailaja
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |