on 12-27-2006 5:30 AM
Hi,
Is there any way to upload an XML file into ABAP WD?
I just saw a blog for Java WD.
<a href="/people/johann.marty/blog/2006/10/03/create-a-web-dynpro-tree-from-an-xml-file:///people/johann.marty/blog/2006/10/03/create-a-web-dynpro-tree-from-an-xml-file
Is there a similar facility in ABAP WD?
Regards,
Haresh.
Hi Haresh,
The ui element FileUpload exists in WDA as well. You still need to implement the xml->tree structure conversion though. For parsing an xml file in ABAP you can use sXML, iXML or XSLT.
Best regards,
Thomas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Haresh,
Well, you could iterate through the DOM tree of the XML using sXML or iXML and created corresponding context nodes. With XSLT you could transform the XML file into one or more internal tables and then create the context nodes out of it. There is extensive documentation available regarding XML processing in ABAP. Specific questions should be posted to the ABAP forum as the true experts in this area have their home there.
Best regards,
Thomas
hey u can do this by using CALL Transformation id.. command..
here is the example code where i wrote this to convert it DATA to XML format...it may help u..
DATA : BEGIN OF l_xml_tab OCCURS 0,
a(100) TYPE c,
END OF l_xml_tab.
DATA : xml_out TYPE string .
DATA : lw_xml_tab LIKE LINE OF l_xml_tab.
*----
XML
CALL TRANSFORMATION id "('ID')
SOURCE tab = gt_outtab[]
RESULT XML xml_out.
*----
Convert to TABLE
CALL FUNCTION 'HR_EFI_CONVERT_STRING_TO_TABLE'
EXPORTING
i_string = xml_out
i_tabline_length = 100
TABLES
et_table = l_xml_tab.
OPEN DATASET p_lgfil1 FOR OUTPUT IN BINARY MODE.
LOOP AT l_xml_tab INTO lw_xml_tab.
TRANSFER lw_xml_tab TO p_lgfil1.
ENDLOOP.
CLOSE DATASET p_lgfil1.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.