on 12-09-2009 4:31 PM
Hello experts,
I've an ABAP mapping to convert flat data structure into a nested XML structure.
But while executing transaction SXI_MAPPING_TEST, I get an error.
Can you confirm that this code is correct:
node_collection = idocument->get_elements_by_tag_name( name = name of DataType here? ).
Also, when I access the first loop, I get an error.
This is the code:
DO t_node_list_length TIMES.
t_subnode = t_node_list_iterator->get_next( ).
t_subnode_name = t_subnode->get_name( ).
t_subnode_list = t_subnode->get_children( ).
t_subnode_list_length = t_subnode_list->get_length( ).
DO t_subnode_list_length TIMES.
w_index = sy-index - 1.
w_node = t_subnode_list->get_item( w_index ).
w_node_name = w_node->get_name( ).
w_node_value = w_node->get_value( ).
ENDDO.
ENDDO.
this is the error I get:
<?xml version="1.0" encoding="iso-8859-1" ?>
- <Top>
<First>BeginTrace</First>
<Trace level="1" type="B">CL_MAPPING_XMS_PLSRV3-ENTER_PLSRV</Trace>
<Trace level="2" type="T">......attachment XI_Context not found</Trace>
<Trace level="3" type="T">Mapping is determined</Trace>
<Trace level="1" type="T">Interface Mapping http://www.indexis.be/MF_REC_OUT_01/MasterDataSnapshot OM_X2E_MDSnapShot_to_UTILMD_UN_D07B_E5BE05_2</Trace>
<Trace level="3" type="T">Object ID of Interface Mapping 9536FA45215238A3950F215D38B95B21</Trace>
<Trace level="3" type="T">Version ID of Interface Mapping 41B85040D9C011DEB830C4D1C0A8A310</Trace>
<Trace level="3" type="T">Mapping Steps 1 R3_ABAP ZCL_BW_R1_CO_MDSNAPSHOT</Trace>
<Trace level="3" type="T">MTOM Attachments are Transferred to the Payload</Trace>
<Trace level="3" type="T">Dynamic Configuration Is Empty</Trace>
<Trace level="1" type="T">Create Instance of ABAP Mapping ClassZCL_BW_R1_CO_MDSNAPSHOT</Trace>
<Trace level="1" type="T">Instance created</Trace>
<Trace level="1" type="T">Application mapping is starting</Trace>
<Trace level="1" type="T">Error in mapping program ZCL_BW_R1_CO_MDSNAPSHOT (type SAP-ABAP, kernel error ID UNCAUGHT_EXCEPTION)</Trace>
</Top>
Thanks a lot
Dimitri
Hi,
Check this threads
Code for handling exceptions
http://help.sap.com/saphelp_47x200/helpdata/en/a9/b8eef8fe9411d4b2ee0050dadfb92b/frameset.htm
Regards
Ramesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Dimitri,
Yes, the get_elements_by_tag_name will get all elements by tag name. So if you want the Items tag, use this:
i_ele_items = idocument->get_elements_by_tag_name( 'Items' ).
Also, check t-code ST22 for the any dump related to this program
[]'s
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jose,
I made a printscreen of the input structure for the ABAP mapping: http://www.flickr.com/photos/45449397@N03/4184355216/
Can you confirm that I need to use this in my code:
node_collection = idocument->get_elements_by_tag_name( ' DataRow ' ).
Thanks
Dimitri
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.