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

problem with xml table, please help

Former Member
0 Likes
418

hello everyone,

can you help me please , i need to read an xml file from the sap directory into an L_XML_TABLE declared as follow :

TYPES: BEGIN OF t_xml_line,

data(256) TYPE x,

END OF t_xml_line.

TYPE-POOLS: ixml.

DATA: l_ixml TYPE REF TO if_ixml,

l_streamfactory TYPE REF TO if_ixml_stream_factory,

l_parser TYPE REF TO if_ixml_parser,

l_istream TYPE REF TO if_ixml_istream,

l_document TYPE REF TO if_ixml_document,

l_node TYPE REF TO if_ixml_node,

l_xmldata TYPE string.

DATA: l_elem TYPE REF TO if_ixml_element,

l_root_node TYPE REF TO if_ixml_node,

l_next_node TYPE REF TO if_ixml_node,

l_name TYPE string,

l_iterator TYPE REF TO if_ixml_node_iterator.

DATA: l_xml_table TYPE TABLE OF t_xml_line,

l_xml_line TYPE t_xml_line,

l_xml_table_size TYPE i.

when i try the READ DATASET of my file into the table it gives me the error message

L_XML_TABLE cannot be a table,a reference, a string or contain any of this objects.

is there a solution , it's important.

thank you very much

3 REPLIES 3
Read only

matt
Active Contributor
0 Likes
399

You know that READ DATASET reads a line at a time, not the whole table?

What code do you have for actually reading the file?

Read only

Former Member
0 Likes
399

i can't excute my program fot the moment because the i still have the same error

Read only

Former Member
0 Likes
399

thank you for help