cancel
Showing results for 
Search instead for 
Did you mean: 

ABAP maping fails

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Check this threads

Code for handling exceptions

http://help.sap.com/saphelp_47x200/helpdata/en/a9/b8eef8fe9411d4b2ee0050dadfb92b/frameset.htm

Regards

Ramesh

former_member182503
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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